Use optimize_size instead of duplicating similar logic
The android mkspecs had their own way of doing the same as optimize_size Change-Id: Id05822df6bdeb8b3aafada2901bd61530c490fe9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: BogDan Vatra <bogdan@kdab.com>
This commit is contained in:
parent
d5ac11891d
commit
9f54745362
@ -42,7 +42,6 @@ ANDROID_SOURCES_CXX_STL_LIBDIR = $$NDK_ROOT/sources/cxx-stl/llvm-libc++/libs/$$A
|
||||
ANDROID_STDCPP_PATH = $$ANDROID_SOURCES_CXX_STL_LIBDIR/libc++_shared.so
|
||||
ANDROID_CXX_STL_LIBS = -lc++
|
||||
|
||||
QMAKE_ARM_CFLAGS_RELEASE = -Oz
|
||||
QMAKE_ARM_CFLAGS_RELEASE_WITH_DEBUGINFO = -g -Oz
|
||||
QMAKE_CFLAGS_OPTIMIZE_SIZE = -Oz
|
||||
|
||||
include(../common/android-base-tail.conf)
|
||||
|
@ -31,7 +31,4 @@ else: \
|
||||
LIBGCC_PATH_FULL = $$system("$$QMAKE_CXX -print-libgcc-file-name")
|
||||
ANDROID_SOURCES_CXX_STL_LIBDIR += $$dirname(LIBGCC_PATH_FULL)
|
||||
|
||||
QMAKE_ARM_CFLAGS_RELEASE = -Os
|
||||
QMAKE_ARM_CFLAGS_RELEASE_WITH_DEBUGINFO = -g -Os
|
||||
|
||||
include(../common/android-base-tail.conf)
|
||||
|
@ -14,8 +14,7 @@ else: equals(ANDROID_TARGET_ARCH, armeabi): \
|
||||
QMAKE_CFLAGS_WARN_ON = -Wall -W
|
||||
QMAKE_CFLAGS_WARN_OFF =
|
||||
equals(ANDROID_TARGET_ARCH, armeabi-v7a) | equals(ANDROID_TARGET_ARCH, armeabi) {
|
||||
QMAKE_CFLAGS_RELEASE = $$QMAKE_ARM_CFLAGS_RELEASE
|
||||
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO = $$QMAKE_ARM_CFLAGS_RELEASE_WITH_DEBUGINFO
|
||||
CONFIG += optimize_size
|
||||
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
|
||||
@ -23,13 +22,6 @@ equals(ANDROID_TARGET_ARCH, armeabi-v7a) | equals(ANDROID_TARGET_ARCH, armeabi)
|
||||
QMAKE_CFLAGS_RELEASE += -mthumb
|
||||
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -mthumb
|
||||
}
|
||||
|
||||
# Don't override our options with -O3
|
||||
QMAKE_CFLAGS_OPTIMIZE_FULL =
|
||||
} else {
|
||||
QMAKE_CFLAGS_RELEASE = -O2
|
||||
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO = -g -O2
|
||||
QMAKE_CFLAGS_DEBUG = -g
|
||||
}
|
||||
|
||||
QMAKE_CFLAGS_SHLIB = -fPIC
|
||||
|
Loading…
Reference in New Issue
Block a user