[Interest] Compiler optimisation flags on Android
Thiago Macieira
thiago.macieira at intel.com
Tue May 3 07:27:22 CEST 2016
On segunda-feira, 2 de maio de 2016 22:07:03 PDT Nuno Santos wrote:
> Hi,
>
> Below are the CFLAGS for Android
> (Qt/5.6/android_armv7/mkspecs/android-g++/qmake.conf)
>
> I’m wondering why there are no optimisation settings for arm rather than
> size. Is there any specific reason?
Why should there be?
> } else { # arm
> QMAKE_CFLAGS_RELEASE = -Os -fomit-frame-pointer
> -fno-strict-aliasing -finline-limit=64
> QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO = -g -Os -fomit-frame-pointer
> -fno-strict-aliasing -finline-limit=64
> QMAKE_CFLAGS_DEBUG = -g -marm -O0 -fno-omit-frame-
> pointer
> equals(ANDROID_TARGET_ARCH, armeabi):if(equals(NDK_TOOLCHAIN_VERSION,
> 4.8)|equals(NDK_TOOLCHAIN_VERSION, 4.9)) {
> DEFINES += QT_OS_ANDROID_GCC_48_WORKAROUND
> } else {
> QMAKE_CFLAGS_RELEASE += -mthumb
> QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -mthumb
> }
> }
This section you pasted contradicts your statement. There are more
optimisation flags besides -Os.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Interest
mailing list