mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
build: support android aarch64
This adds the needed support to enable building the standard library for android aarch64 assuming that the appropriate parameters are passed to CMake.
This commit is contained in:
@@ -10,14 +10,18 @@ function(swift_android_include_for_arch arch var)
|
||||
endfunction()
|
||||
|
||||
function(swift_android_lib_for_arch arch var)
|
||||
set(_prebuilt "${SWIFT_SDK_ANDROID_ARCH_${arch}_NDK_PREBUILT_PATH}")
|
||||
set(_host "${SWIFT_SDK_ANDROID_ARCH_${arch}_NDK_TRIPLE}")
|
||||
|
||||
set(paths)
|
||||
|
||||
if(arch STREQUAL armv7)
|
||||
list(APPEND paths
|
||||
"${SWIFT_SDK_ANDROID_ARCH_${arch}_NDK_PREBUILT_PATH}/${SWIFT_SDK_ANDROID_ARCH_${arch}_NDK_TRIPLE}/lib/armv7-a")
|
||||
if(arch STREQUAL armv7)
|
||||
list(APPEND paths "${_prebuilt}/${_host}/lib/armv7-a")
|
||||
elseif(arch STREQUAL aarch64)
|
||||
list(APPEND paths "${_prebuilt}/${_host}/lib64")
|
||||
else()
|
||||
message(SEND_ERROR "unknown architecture (${arch}) for android")
|
||||
endif()
|
||||
list(APPEND paths "${_prebuilt}/lib/gcc/${_host}/${SWIFT_ANDROID_NDK_GCC_VERSION}.x")
|
||||
|
||||
list(APPEND paths
|
||||
"${SWIFT_SDK_ANDROID_ARCH_${arch}_NDK_PREBUILT_PATH}/lib/gcc/${SWIFT_SDK_ANDROID_ARCH_${arch}_NDK_TRIPLE}/${SWIFT_ANDROID_NDK_GCC_VERSION}.x")
|
||||
set(${var} ${paths} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
Reference in New Issue
Block a user