aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKwangsub Kim <kwangsub.kim@qt.io>2018-02-20 21:04:33 +0900
committerMartin Jansa <Martin.Jansa@gmail.com>2018-02-26 16:51:55 +0000
commit6f9d4fdf99ea5c1ac1b0c9c9b637961b2c032195 (patch)
tree1b8394704c36e6461c834d942c419b378422edff
parent1ad923abbff0d749a137aad19a1e6795dbe7e32a (diff)
qtbase: add a config option to optimize for size
The '-optimize-size' option would enable the compiler to optimize for size instead of speed. If the global compiler option already included '-Os', this option would be enabled by default. It would affect the whole Qt libraries and Qt applications as well. This feature is available in Qt 5.9+. Signed-off-by: Kwangsub Kim <kwangsub.kim@qt.io> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--recipes-qt/qt5/qtbase_git.bb5
1 files changed, 4 insertions, 1 deletions
diff --git a/recipes-qt/qt5/qtbase_git.bb b/recipes-qt/qt5/qtbase_git.bb
index 522e2615..4df7a767 100644
--- a/recipes-qt/qt5/qtbase_git.bb
+++ b/recipes-qt/qt5/qtbase_git.bb
@@ -70,7 +70,9 @@ PACKAGECONFIG_DISTRO ?= ""
PACKAGECONFIG_RELEASE ?= "release"
# This is in qt5.inc, because qtwebkit-examples are using it to enable ca-certificates dependency
# PACKAGECONFIG_OPENSSL ?= "openssl"
-PACKAGECONFIG_DEFAULT ?= "dbus udev evdev widgets tools libs freetype tests"
+PACKAGECONFIG_DEFAULT ?= "dbus udev evdev widgets tools libs freetype tests \
+ ${@bb.utils.contains('SELECTED_OPTIMIZATION', '-Os', 'optimize-size', '', d)} \
+"
PACKAGECONFIG ?= " \
${PACKAGECONFIG_RELEASE} \
@@ -88,6 +90,7 @@ PACKAGECONFIG[release] = "-release,-debug"
PACKAGECONFIG[debug] = ""
PACKAGECONFIG[developer] = "-developer-build"
PACKAGECONFIG[qml-debug] = "-qml-debug,-no-qml-debug"
+PACKAGECONFIG[optimize-size] = "-optimize-size"
PACKAGECONFIG[sm] = "-sm,-no-sm"
PACKAGECONFIG[tests] = "-make tests,-nomake tests"
PACKAGECONFIG[examples] = "-make examples -compile-examples,-nomake examples"