diff options
author | Brad King <brad.king@kitware.com> | 2016-10-24 15:40:53 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-10-24 15:40:53 (GMT) |
commit | 6205f1797e33c22ab1f9cda8598d02b24497b806 (patch) | |
tree | 3ad0be2392d010b061cd3cbe6753715c97ba741c /Modules/Platform/Android/abi-armeabi-Clang.cmake | |
parent | 295c8efa359cbee22e45e6e9358990209b35aa39 (diff) | |
download | CMake-6205f1797e33c22ab1f9cda8598d02b24497b806.zip CMake-6205f1797e33c22ab1f9cda8598d02b24497b806.tar.gz CMake-6205f1797e33c22ab1f9cda8598d02b24497b806.tar.bz2 |
Android: Set CMAKE_POSITION_INDEPENDENT_CODE automatically
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.
Diffstat (limited to 'Modules/Platform/Android/abi-armeabi-Clang.cmake')
-rw-r--r-- | Modules/Platform/Android/abi-armeabi-Clang.cmake | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/Modules/Platform/Android/abi-armeabi-Clang.cmake b/Modules/Platform/Android/abi-armeabi-Clang.cmake index 4fc3009..b857bd3 100644 --- a/Modules/Platform/Android/abi-armeabi-Clang.cmake +++ b/Modules/Platform/Android/abi-armeabi-Clang.cmake @@ -14,7 +14,6 @@ endif() string(APPEND _ANDROID_ABI_INIT_CFLAGS " -msoft-float" " -mtune=xscale" - " -fpic" ) include(Platform/Android/abi-common-Clang) |