summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--cmake/config-ix.cmake1
2 files changed, 2 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 50d0eb0ed..f8925ab2d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -497,7 +497,7 @@ else()
if(EXISTS ${COMPILER_RT_LLD_PATH}/ AND LLVM_TOOL_LLD_BUILD)
set(COMPILER_RT_HAS_LLD TRUE)
else()
- set(COMPILER_RT_HAS_LLD FALSE)
+ set(COMPILER_RT_HAS_LLD ${COMPILER_RT_HAS_FUSE_LD_LLD_FLAG})
endif()
endif()
pythonize_bool(COMPILER_RT_HAS_LLD)
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake
index 875acc83b..bc81a7b9d 100644
--- a/cmake/config-ix.cmake
+++ b/cmake/config-ix.cmake
@@ -146,6 +146,7 @@ check_library_exists(stdc++ __cxa_throw "" COMPILER_RT_HAS_LIBSTDCXX)
# Linker flags.
check_linker_flag("-Wl,-z,text" COMPILER_RT_HAS_Z_TEXT)
+check_linker_flag("-fuse-ld=lld" COMPILER_RT_HAS_FUSE_LD_LLD_FLAG)
if(ANDROID)
check_linker_flag("-Wl,-z,global" COMPILER_RT_HAS_Z_GLOBAL)