diff --git a/mkspecs/common/android-base-tail.conf b/mkspecs/common/android-base-tail.conf index 2610918c4e..3f1b414d3f 100644 --- a/mkspecs/common/android-base-tail.conf +++ b/mkspecs/common/android-base-tail.conf @@ -15,8 +15,14 @@ QMAKE_CFLAGS += --sysroot=$$ANDROID_PLATFORM_ROOT_PATH QMAKE_CFLAGS_WARN_ON = -Wall -W QMAKE_CFLAGS_WARN_OFF = equals(ANDROID_TARGET_ARCH, armeabi-v7a) | equals(ANDROID_TARGET_ARCH, armeabi) { - QMAKE_CFLAGS_RELEASE = -Os - QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO = -g -Os + contains(QMAKE_COMPILER, clang) { + QMAKE_CFLAGS_RELEASE = -Oz + QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO = -g -Oz + } else { + QMAKE_CFLAGS_RELEASE = -Os + QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO = -g -Os + } + QMAKE_CFLAGS_DEBUG = -g -marm -O0 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