2016-11-21 06:17:47 +00:00
|
|
|
# qmake configuration for building with android-clang
|
2016-07-20 07:12:59 +00:00
|
|
|
MAKEFILE_GENERATOR = UNIX
|
|
|
|
QMAKE_PLATFORM = android
|
|
|
|
QMAKE_COMPILER = gcc clang llvm
|
|
|
|
|
2016-10-04 12:36:58 +00:00
|
|
|
CONFIG += android_install unversioned_soname unversioned_libname plugin_with_soname android_deployment_settings
|
2016-07-20 07:12:59 +00:00
|
|
|
|
|
|
|
include(../common/linux.conf)
|
2016-11-19 06:55:33 +00:00
|
|
|
include(../common/gcc-base-unix.conf)
|
2016-07-20 07:12:59 +00:00
|
|
|
include(../common/clang.conf)
|
|
|
|
include(../common/android-base-head.conf)
|
|
|
|
|
|
|
|
NDK_LLVM_PATH = $$NDK_ROOT/toolchains/llvm/prebuilt/$$NDK_HOST
|
|
|
|
QMAKE_CC = $$NDK_LLVM_PATH/bin/clang
|
|
|
|
QMAKE_CXX = $$NDK_LLVM_PATH/bin/clang++
|
|
|
|
|
2019-07-09 07:34:31 +00:00
|
|
|
# Follow https://android.googlesource.com/platform/ndk/+/ndk-release-r20/docs/BuildSystemMaintainers.md
|
|
|
|
|
2016-07-20 07:12:59 +00:00
|
|
|
equals(ANDROID_TARGET_ARCH, armeabi-v7a): \
|
2019-07-09 07:34:31 +00:00
|
|
|
QMAKE_CFLAGS = -target armv7a-linux-androideabi$$replace(ANDROID_PLATFORM, "android-", "")
|
2016-07-20 07:12:59 +00:00
|
|
|
else: equals(ANDROID_TARGET_ARCH, arm64-v8a): \
|
2019-07-09 07:34:31 +00:00
|
|
|
QMAKE_CFLAGS = -target aarch64-linux-android$$replace(ANDROID_PLATFORM, "android-", "")
|
2016-07-20 07:12:59 +00:00
|
|
|
else: equals(ANDROID_TARGET_ARCH, x86): \
|
2019-07-09 07:34:31 +00:00
|
|
|
QMAKE_CFLAGS = -target i686-linux-android$$replace(ANDROID_PLATFORM, "android-", "") -mstackrealign
|
2016-07-20 07:12:59 +00:00
|
|
|
else: equals(ANDROID_TARGET_ARCH, x86_64): \
|
2019-07-09 07:34:31 +00:00
|
|
|
QMAKE_CFLAGS = -target x86_64-linux-android$$replace(ANDROID_PLATFORM, "android-", "")
|
2019-01-28 15:04:21 +00:00
|
|
|
|
2019-07-09 07:34:31 +00:00
|
|
|
QMAKE_CFLAGS += -fno-limit-debug-info
|
2017-07-28 13:52:31 +00:00
|
|
|
|
2019-07-09 07:34:31 +00:00
|
|
|
QMAKE_LINK = $$QMAKE_CXX $$QMAKE_CFLAGS
|
2017-07-28 13:52:31 +00:00
|
|
|
|
2019-07-09 07:34:31 +00:00
|
|
|
ANDROID_STDCPP_PATH = $$NDK_LLVM_PATH/sysroot/usr/lib/$$NDK_TOOLS_PREFIX/libc++_shared.so
|
2018-10-01 12:46:46 +00:00
|
|
|
|
2018-11-02 09:41:32 +00:00
|
|
|
ANDROID_USE_LLVM = true
|
|
|
|
|
2019-07-09 07:34:31 +00:00
|
|
|
QMAKE_CFLAGS_OPTIMIZE_SIZE = -Oz
|
|
|
|
QMAKE_LIBDIR_POST =
|
|
|
|
QMAKE_LFLAGS =
|
|
|
|
QMAKE_LIBS_PRIVATE =
|
|
|
|
ANDROID_CXX_STL_LIBS =
|
2017-07-28 13:52:31 +00:00
|
|
|
|
2016-07-20 07:12:59 +00:00
|
|
|
include(../common/android-base-tail.conf)
|