2016-06-02 22:11:42 +03:00
|
|
|
string(APPEND _ANDROID_ABI_INIT_CFLAGS
|
|
|
|
" -funwind-tables"
|
|
|
|
" -no-canonical-prefixes"
|
|
|
|
)
|
2016-10-21 16:12:34 +03:00
|
|
|
|
2016-10-24 18:40:53 +03:00
|
|
|
if(NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE
|
|
|
|
AND NOT CMAKE_SYSTEM_VERSION VERSION_LESS 16)
|
|
|
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
|
|
|
endif()
|
|
|
|
|
2016-10-24 18:45:18 +03:00
|
|
|
if(CMAKE_POSITION_INDEPENDENT_CODE)
|
|
|
|
string(APPEND _ANDROID_ABI_INIT_EXE_LDFLAGS " -fPIE -pie")
|
|
|
|
endif()
|
|
|
|
|
2016-10-21 16:12:34 +03:00
|
|
|
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()
|