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

Kwangsub Kim kwangsub.kim at qt.io
Mon Feb 19 07:18:52 UTC 2018


Hi Khem,

That’s a good point. Thanks for your review.
I will put the updated patch that checks SELECTED_OPTIMIZATION and determines the default option. Please have a look if it’s acceptable.

BR,
Kwangsub

On 18/02/2018, 11:11 AM, Khem Raj wrote:

    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"
    > 
    -- 
    _______________________________________________
    Openembedded-devel mailing list
    Openembedded-devel at lists.openembedded.org
    http://lists.openembedded.org/mailman/listinfo/openembedded-devel
    



More information about the Openembedded-devel mailing list