[vlc-commits] Contribs: add an option to optimize a bit for the size

Jean-Baptiste Kempf git at videolan.org
Mon Feb 20 01:12:06 CET 2012


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Feb  9 00:07:16 2012 +0100| [55295e3dcef97dc06659a58aeb7cf97022e92dfb] | committer: Jean-Baptiste Kempf

Contribs: add an option to optimize a bit for the size

Notably for libavcodec

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=55295e3dcef97dc06659a58aeb7cf97022e92dfb
---

 contrib/bootstrap            |    5 +++++
 contrib/src/ffmpeg/rules.mak |    5 ++++-
 2 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/contrib/bootstrap b/contrib/bootstrap
index a4b5410..32db642 100755
--- a/contrib/bootstrap
+++ b/contrib/bootstrap
@@ -28,6 +28,7 @@ usage()
 	echo "  --enable-FOO     configure to build package FOO"
 	echo "  --disable-disc   configure to not build optical discs packages"
 	echo "  --disable-sout   configure to not build stream output packages"
+	echo "  --enable-small   optimize libraries for size with slight speed decrease [DANGEROUS]"
 }
 
 BUILD=
@@ -66,6 +67,9 @@ do
 		--disable-sout)
 			BUILD_ENCODERS=
 			;;
+		--enable-small)
+			ENABLE_SMALL=1
+			;;
 		--disable-*)
 			PKGS_DISABLE="${PKGS_DISABLE} ${1#--disable-}"
 			;;
@@ -161,6 +165,7 @@ check_android_sdk()
 test -z "$PREFIX" || add_make "PREFIX := $PREFIX"
 test -z "$BUILD_DISCS" || add_make_enabled "BUILD_DISCS"
 test -z "$BUILD_ENCODERS" || add_make_enabled "BUILD_ENCODERS"
+test -z "$ENABLE_SMALL" || add_make_enabled "ENABLE_SMALL"
 
 #
 # Checks
diff --git a/contrib/src/ffmpeg/rules.mak b/contrib/src/ffmpeg/rules.mak
index 98ce743..7a326bd 100644
--- a/contrib/src/ffmpeg/rules.mak
+++ b/contrib/src/ffmpeg/rules.mak
@@ -30,7 +30,10 @@ FFMPEGCONF += --enable-libmp3lame --enable-libvpx
 DEPS_ffmpeg += lame $(DEPS_lame) vpx $(DEPS_vpx)
 else
 FFMPEGCONF += --disable-encoders --disable-muxers
-# XXX: REVISIT --enable-small ?
+endif
+
+ifdef ENABLE_SMALL
+FFMPEGCONF += --enable-small --optflags=-O2
 endif
 
 # XXX: REVISIT



More information about the vlc-commits mailing list