summaryrefslogtreecommitdiffstats
path: root/Modules/Platform/Android-Common.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-10-21 13:12:34 (GMT)
committerBrad King <brad.king@kitware.com>2016-10-21 14:43:45 (GMT)
commit295c8efa359cbee22e45e6e9358990209b35aa39 (patch)
treeae83f951612f72fe2fade6e083ff31b3d68ca9de /Modules/Platform/Android-Common.cmake
parent43f4326ece5035a5a028a7bb90a67c193804c997 (diff)
downloadCMake-295c8efa359cbee22e45e6e9358990209b35aa39.zip
CMake-295c8efa359cbee22e45e6e9358990209b35aa39.tar.gz
CMake-295c8efa359cbee22e45e6e9358990209b35aa39.tar.bz2
Android: Add missing link flags for device executables
See `${ndk}/build/core/default-build-commands.mk` for link flags the NDK uses for executables. Add them to our default executable link flags. Suppress `nocopyreloc` on `arm64-v8a` because it does not work with some STL types. Closes: #16380
Diffstat (limited to 'Modules/Platform/Android-Common.cmake')
-rw-r--r--Modules/Platform/Android-Common.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/Platform/Android-Common.cmake b/Modules/Platform/Android-Common.cmake
index 6544696..8755d4f 100644
--- a/Modules/Platform/Android-Common.cmake
+++ b/Modules/Platform/Android-Common.cmake
@@ -107,6 +107,7 @@ set(_ANDROID_ABI_INIT_CFLAGS "")
set(_ANDROID_ABI_INIT_CFLAGS_DEBUG "")
set(_ANDROID_ABI_INIT_CFLAGS_RELEASE "")
set(_ANDROID_ABI_INIT_LDFLAGS "")
+set(_ANDROID_ABI_INIT_EXE_LDFLAGS "")
macro(__android_compiler_common lang)
if(_ANDROID_ABI_INIT_CFLAGS)
@@ -125,6 +126,9 @@ macro(__android_compiler_common lang)
string(APPEND CMAKE_${t}_LINKER_FLAGS_INIT " ${_ANDROID_ABI_INIT_LDFLAGS}")
endforeach()
endif()
+ if(_ANDROID_ABI_INIT_EXE_LDFLAGS)
+ string(APPEND CMAKE_EXE_LINKER_FLAGS_INIT " ${_ANDROID_ABI_INIT_EXE_LDFLAGS}")
+ endif()
if(DEFINED _ANDROID_STL_EXCEPTIONS)
if(_ANDROID_STL_EXCEPTIONS)