[oe] [meta-qt5][PATCH] qtbase: add a config option to optimize for size

Khem Raj raj.khem at gmail.com
Sun Feb 18 01:47:35 UTC 2018



On 2/17/18 5:37 AM, Kwangsub Kim wrote:
> The '-optimize-size' option would enable the compiler to optimize
> for size instead of speed. 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 at qt.io>
> ---
>   recipes-qt/qt5/qtbase_git.bb | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/recipes-qt/qt5/qtbase_git.bb b/recipes-qt/qt5/qtbase_git.bb
> index 4f3ade2..8dda6a2 100644
> --- a/recipes-qt/qt5/qtbase_git.bb
> +++ b/recipes-qt/qt5/qtbase_git.bb
> @@ -90,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"

We also have global compiler options which will be passed in. So perhaps 
it should check for -Os in SELECTED_OPTIMIZATION and enable this 
packageconfig by default if found.

>   PACKAGECONFIG[sm] = "-sm,-no-sm"
>   PACKAGECONFIG[tests] = "-make tests,-nomake tests"
>   PACKAGECONFIG[examples] = "-make examples -compile-examples,-nomake examples"
> 



More information about the Openembedded-devel mailing list