[FFmpeg-devel] configure: clang -Oz for small size build to reduce size further

Wang Bin wbsecg1 at gmail.com
Mon Mar 13 04:16:14 EET 2017


How to benchmark codecs?
Here is my configuration and result size.  The total size of -Oz static or
dynamic libraries is about 1M smaller.

configure --disable-debug --enable-shared --enable-runtime-cpudetect
--enable-hwaccels --enable-avresample --disable-postproc
--install_name_dir=@rpath --enable-pic
--extra-cflags="-mmacosx-version-min=10.7"
--extra-ldflags="-mmacosx-version-min=10.7 -Wl,-rpath, at loader_path
-Wl,-rpath, at loader_path/../Frameworks -Wl,-rpath, at loader_path/lib
-Wl,-rpath, at loader_path/../lib" --enable-small

-Os
-rwxr-xr-x  1 501  20  10545284  3 10 11:11 ./libavcodec.57.64.101.dylib
-rw-r--r--  1 501  20  13434432  3 10 11:11 ./libavcodec.a
-rwxr-xr-x  1 501  20  57784  3 10 11:11 ./libavdevice.57.1.100.dylib
-rw-r--r--  1 501  20  53464  3 10 11:11 ./libavdevice.a
-rwxr-xr-x  1 501  20  1564396  3 10 11:11 ./libavfilter.6.65.100.dylib
-rw-r--r--  1 501  20  2268040  3 10 11:11 ./libavfilter.a
-rwxr-xr-x  1 501  20  1774664  3 10 11:11 ./libavformat.57.56.101.dylib
-rw-r--r--  1 501  20  2823792  3 10 11:11 ./libavformat.a
-rwxr-xr-x  1 501  20  117700  3 10 11:11 ./libavresample.3.1.0.dylib
-rw-r--r--  1 501  20  162760  3 10 11:11 ./libavresample.a
-rwxr-xr-x  1 501  20  298520  3 10 11:11 ./libavutil.55.34.101.dylib
-rw-r--r--  1 501  20  395512  3 10 11:11 ./libavutil.a
-rwxr-xr-x  1 501  20  106968  3 10 11:11 ./libswresample.2.3.100.dylib
-rw-r--r--  1 501  20  153400  3 10 11:11 ./libswresample.a
-rwxr-xr-x  1 501  20  497460  3 10 11:11 ./libswscale.4.2.100.dylib
-rw-r--r--  1 501  20  614184  3 10 11:11 ./libswscale.a

-Oz
-rwxr-xr-x  1 501  20  9665732  3 10 11:39 ./libavcodec.57.64.101.dylib
-rw-r--r--  1 501  20  12597816  3 10 11:39 ./libavcodec.a
-rwxr-xr-x  1 501  20  57736  3 10 11:39 ./libavdevice.57.1.100.dylib
-rw-r--r--  1 501  20  53376  3 10 11:39 ./libavdevice.a
-rwxr-xr-x  1 501  20  1515268  3 10 11:39 ./libavfilter.6.65.100.dylib
-rw-r--r--  1 501  20  2223024  3 10 11:39 ./libavfilter.a
-rwxr-xr-x  1 501  20  1733824  3 10 11:39 ./libavformat.57.56.101.dylib
-rw-r--r--  1 501  20  2787728  3 10 11:39 ./libavformat.a
-rwxr-xr-x  1 501  20  113652  3 10 11:39 ./libavresample.3.1.0.dylib
-rw-r--r--  1 501  20  160920  3 10 11:39 ./libavresample.a
-rwxr-xr-x  1 501  20  294424  3 10 11:39 ./libavutil.55.34.101.dylib
-rw-r--r--  1 501  20  390624  3 10 11:39 ./libavutil.a
-rwxr-xr-x  1 501  20  102864  3 10 11:39 ./libswresample.2.3.100.dylib
-rw-r--r--  1 501  20  148336  3 10 11:39 ./libswresample.a
-rwxr-xr-x  1 501  20  481020  3 10 11:39 ./libswscale.4.2.100.dylib
-rw-r--r--  1 501  20  599000  3 10 11:39 ./libswscale.a


More information about the ffmpeg-devel mailing list