mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-22 14:23:10 -05:00
6205f1797e
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.
18 lines
398 B
CMake
18 lines
398 B
CMake
# <ndk>/build/core/toolchains/arm-linux-androideabi-4.9/setup.mk
|
|
string(APPEND _ANDROID_ABI_INIT_CFLAGS
|
|
" -march=armv5te"
|
|
)
|
|
|
|
if(CMAKE_ANDROID_ARM_MODE)
|
|
string(APPEND _ANDROID_ABI_INIT_CFLAGS " -marm")
|
|
else()
|
|
string(APPEND _ANDROID_ABI_INIT_CFLAGS " -mthumb")
|
|
endif()
|
|
|
|
string(APPEND _ANDROID_ABI_INIT_CFLAGS
|
|
" -msoft-float"
|
|
" -mtune=xscale"
|
|
)
|
|
|
|
include(Platform/Android/abi-common-GNU)
|