If the toolchain file or cache does not set this, enable it automatically based on the Android API version. Versions 16 and above expect position independent code. Use the main `CMAKE_POSITION_INDEPENDENT_CODE` setting in favor of hard-coding `-fpic` or `-fPIC` in the compiler flags for each ABI. This allows CMake to use `-fpie` or `-fPIE` as needed when sources are meant for executables, and `-fpic` or `-fPIC` for other sources.
7 lines
208 B
CMake
7 lines
208 B
CMake
# <ndk>/build/core/toolchains/aarch64-linux-android-4.9/setup.mk
|
|
|
|
# Suppress -Wl,-z,nocopyreloc flag on arm64-v8a
|
|
set(_ANDROID_ABI_INIT_EXE_LDFLAGS_NO_nocopyreloc 1)
|
|
|
|
include(Platform/Android/abi-common-GNU)
|