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++
|
|
|
|
|
|
|
|
equals(ANDROID_TARGET_ARCH, armeabi-v7a): \
|
2017-07-28 13:52:31 +00:00
|
|
|
QMAKE_CFLAGS += -target armv7-none-linux-androideabi
|
2016-07-20 07:12:59 +00:00
|
|
|
else: equals(ANDROID_TARGET_ARCH, armeabi): \
|
2017-07-28 13:52:31 +00:00
|
|
|
QMAKE_CFLAGS += -target armv5te-none-linux-androideabi
|
2016-07-20 07:12:59 +00:00
|
|
|
else: equals(ANDROID_TARGET_ARCH, arm64-v8a): \
|
2017-07-28 13:52:31 +00:00
|
|
|
QMAKE_CFLAGS += -target aarch64-none-linux-android
|
2016-07-20 07:12:59 +00:00
|
|
|
else: equals(ANDROID_TARGET_ARCH, x86): \
|
2018-03-01 10:46:10 +00:00
|
|
|
QMAKE_CFLAGS += -target i686-none-linux-android -mstackrealign
|
2016-07-20 07:12:59 +00:00
|
|
|
else: equals(ANDROID_TARGET_ARCH, x86_64): \
|
2017-07-28 13:52:31 +00:00
|
|
|
QMAKE_CFLAGS += -target x86_64-none-linux-android
|
2016-07-20 07:12:59 +00:00
|
|
|
else: equals(ANDROID_TARGET_ARCH, mips): \
|
|
|
|
QMAKE_CFLAGS += -target mipsel-none-linux-android
|
|
|
|
else: equals(ANDROID_TARGET_ARCH, mips64): \
|
2017-07-28 13:52:31 +00:00
|
|
|
QMAKE_CFLAGS += -target mips64el-none-linux-android
|
2016-07-20 07:12:59 +00:00
|
|
|
|
2017-07-28 13:52:31 +00:00
|
|
|
QMAKE_CFLAGS += -gcc-toolchain $$NDK_TOOLCHAIN_PATH
|
|
|
|
QMAKE_LINK = $$QMAKE_CXX $$QMAKE_CFLAGS -Wl,--exclude-libs,libgcc.a
|
|
|
|
QMAKE_CFLAGS += -DANDROID_HAS_WSTRING --sysroot=$$NDK_ROOT/sysroot \
|
|
|
|
-isystem $$NDK_ROOT/sysroot/usr/include/$$NDK_TOOLS_PREFIX \
|
|
|
|
-isystem $$NDK_ROOT/sources/cxx-stl/llvm-libc++/include \
|
|
|
|
-isystem $$NDK_ROOT/sources/android/support/include \
|
|
|
|
-isystem $$NDK_ROOT/sources/cxx-stl/llvm-libc++abi/include
|
|
|
|
|
|
|
|
ANDROID_SOURCES_CXX_STL_LIBDIR = $$NDK_ROOT/sources/cxx-stl/llvm-libc++/libs/$$ANDROID_TARGET_ARCH
|
|
|
|
|
|
|
|
ANDROID_STDCPP_PATH = $$ANDROID_SOURCES_CXX_STL_LIBDIR/libc++_shared.so
|
|
|
|
ANDROID_CXX_STL_LIBS = -lc++
|
|
|
|
|
2018-03-20 09:15:23 +00:00
|
|
|
QMAKE_CFLAGS_OPTIMIZE_SIZE = -Oz
|
2016-08-15 13:29:19 +00:00
|
|
|
|
2016-07-20 07:12:59 +00:00
|
|
|
include(../common/android-base-tail.conf)
|