forked from OSchip/llvm-project
[compiler-rt] Fix COMPILER_RT_OS_DIR for Android
Android has its own CMAKE_SYSTEM_NAME, but the OS is Linux (Android target triples look like aarch64-none-linux-android21). The driver will therefore search for compiler-rt libraries in the "linux" directory and not the "android" directory, so the default placement of Android compiler-rt libraries was incorrect. You could fix it by specifying COMPILER_RT_OS_DIR manually, but it also makes sense to fix the default, to save others from having to discover and fix the issue for themselves.
This commit is contained in:
parent
cc238a6e03
commit
a68ccba77a
|
@ -100,7 +100,13 @@ function(extend_install_path joined_path current_segment)
|
|||
endfunction()
|
||||
|
||||
if(NOT DEFINED COMPILER_RT_OS_DIR)
|
||||
string(TOLOWER ${CMAKE_SYSTEM_NAME} COMPILER_RT_OS_DIR)
|
||||
if(ANDROID)
|
||||
# The CMAKE_SYSTEM_NAME for Android is Android, but the OS is Linux and the
|
||||
# driver will search for compiler-rt libraries in the "linux" directory.
|
||||
set(COMPILER_RT_OS_DIR linux)
|
||||
else()
|
||||
string(TOLOWER ${CMAKE_SYSTEM_NAME} COMPILER_RT_OS_DIR)
|
||||
endif()
|
||||
endif()
|
||||
if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
|
||||
set(COMPILER_RT_OUTPUT_LIBRARY_DIR
|
||||
|
|
Loading…
Reference in New Issue