From 6f9d4fdf99ea5c1ac1b0c9c9b637961b2c032195 Mon Sep 17 00:00:00 2001 From: Kwangsub Kim Date: Tue, 20 Feb 2018 21:04:33 +0900 Subject: 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 Signed-off-by: Martin Jansa --- recipes-qt/qt5/qtbase_git.bb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'recipes-qt') 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" -- cgit v1.2.3-54-g00ecf