Merge branch 'android-link-exe' into release

This commit is contained in:
Brad King 2016-10-21 13:26:56 -04:00
commit 6bc03a285f
4 changed files with 16 additions and 0 deletions

View File

@ -107,6 +107,7 @@ set(_ANDROID_ABI_INIT_CFLAGS "")
set(_ANDROID_ABI_INIT_CFLAGS_DEBUG "") set(_ANDROID_ABI_INIT_CFLAGS_DEBUG "")
set(_ANDROID_ABI_INIT_CFLAGS_RELEASE "") set(_ANDROID_ABI_INIT_CFLAGS_RELEASE "")
set(_ANDROID_ABI_INIT_LDFLAGS "") set(_ANDROID_ABI_INIT_LDFLAGS "")
set(_ANDROID_ABI_INIT_EXE_LDFLAGS "")
macro(__android_compiler_common lang) macro(__android_compiler_common lang)
if(_ANDROID_ABI_INIT_CFLAGS) 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}") string(APPEND CMAKE_${t}_LINKER_FLAGS_INIT " ${_ANDROID_ABI_INIT_LDFLAGS}")
endforeach() endforeach()
endif() 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(DEFINED _ANDROID_STL_EXCEPTIONS)
if(_ANDROID_STL_EXCEPTIONS) if(_ANDROID_STL_EXCEPTIONS)

View File

@ -5,4 +5,7 @@ string(APPEND _ANDROID_ABI_INIT_CFLAGS
" -fpic" " -fpic"
) )
# Suppress -Wl,-z,nocopyreloc flag on arm64-v8a
set(_ANDROID_ABI_INIT_EXE_LDFLAGS_NO_nocopyreloc 1)
include(Platform/Android/abi-common-Clang) include(Platform/Android/abi-common-Clang)

View File

@ -3,4 +3,7 @@ string(APPEND _ANDROID_ABI_INIT_CFLAGS
" -fpic" " -fpic"
) )
# Suppress -Wl,-z,nocopyreloc flag on arm64-v8a
set(_ANDROID_ABI_INIT_EXE_LDFLAGS_NO_nocopyreloc 1)
include(Platform/Android/abi-common-GNU) include(Platform/Android/abi-common-GNU)

View File

@ -2,3 +2,9 @@ string(APPEND _ANDROID_ABI_INIT_CFLAGS
" -funwind-tables" " -funwind-tables"
" -no-canonical-prefixes" " -no-canonical-prefixes"
) )
string(APPEND _ANDROID_ABI_INIT_EXE_LDFLAGS " -Wl,--gc-sections")
if(NOT _ANDROID_ABI_INIT_EXE_LDFLAGS_NO_nocopyreloc)
string(APPEND _ANDROID_ABI_INIT_EXE_LDFLAGS " -Wl,-z,nocopyreloc")
endif()