diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-02-16 16:03:30 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-02-16 15:51:02 +0000 |
commit | f3aaa7531e7b429d958e7002e642f4b59568ff74 (patch) | |
tree | dcf7ffc3b5771009d169cb3ed7025350caa96974 /src | |
parent | 3abab86a7dc3116eaabff7c32a3dff3de50e58b6 (diff) |
Reduce size of embedded binaries
Adds a WEBENGINE_CONFIG option that greatly reduces the size of the core
library (from 80Mbyte to 45Mbyte on Linux), and enable it on embedded
linux by default.
Change-Id: Ieb7afdbc160984fe5952be16dfbc96aa8c5f35ef
Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/config/embedded_linux.pri | 2 | ||||
-rw-r--r-- | src/core/gyp_run.pro | 4 | ||||
-rw-r--r-- | src/core/qtwebengine.gypi | 4 |
3 files changed, 6 insertions, 4 deletions
diff --git a/src/core/config/embedded_linux.pri b/src/core/config/embedded_linux.pri index 7cabf52ac..3a58e0e4b 100644 --- a/src/core/config/embedded_linux.pri +++ b/src/core/config/embedded_linux.pri @@ -39,3 +39,5 @@ GYP_CONFIG += \ use_x11=0 \ v8_use_snapshot=false \ want_separate_host_toolset=1 \ + +WEBENGINE_CONFIG *= reduce_binary_size diff --git a/src/core/gyp_run.pro b/src/core/gyp_run.pro index dea1a2225..c34bc9a47 100644 --- a/src/core/gyp_run.pro +++ b/src/core/gyp_run.pro @@ -89,6 +89,10 @@ contains(QT_ARCH, "arm64"): GYP_CONFIG += target_arch=arm64 contains(WEBENGINE_CONFIG, use_proprietary_codecs): GYP_CONFIG += proprietary_codecs=1 ffmpeg_branding=Chrome +# Compiling with -Os makes a huge difference in binary size, and the unwind tables is another big part, +# but the latter are necessary for useful debug binaries. +contains(WEBENGINE_CONFIG, reduce_binary_size): GYP_CONFIG += release_optimize=s debug_optimize=s release_unwind_tables=0 + !contains(QT_CONFIG, qt_framework): contains(QT_CONFIG, private_tests) { GYP_CONFIG += qt_install_data=\"$$[QT_INSTALL_DATA/get]\" GYP_CONFIG += qt_install_translations=\"$$[QT_INSTALL_TRANSLATIONS/get]\" diff --git a/src/core/qtwebengine.gypi b/src/core/qtwebengine.gypi index 42bf43822..2ee0f3586 100644 --- a/src/core/qtwebengine.gypi +++ b/src/core/qtwebengine.gypi @@ -68,10 +68,6 @@ ['qt_os=="embedded_linux"', { 'configurations': { 'Debug_Base': { - # Reduce the binary size. - 'variables': { - 'debug_optimize%': 's', - }, 'ldflags': [ # Only link with needed input sections. '-Wl,--gc-sections', |