diff options
author | Reid Kleckner <rnk@google.com> | 2017-05-09 15:54:57 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2017-05-09 15:54:57 +0000 |
commit | 5a934669af71790533036d143eb26355e2b4e253 (patch) | |
tree | 204c3d6ee3b905bdd8cf4e2f2f361573a367067f /CMakeLists.txt | |
parent | b5a980955aabf4d683d37ebbc9d48a724428786b (diff) |
Allow compiler-rt to find lld and libc++ parallel to LLVM, as in the monorepo
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@302541 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 32358a126..4247b40dc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -239,14 +239,24 @@ set(COMPILER_RT_LIBCXX_PATH ${LLVM_MAIN_SRC_DIR}/projects/libcxx) if(EXISTS ${COMPILER_RT_LIBCXX_PATH}/) set(COMPILER_RT_HAS_LIBCXX_SOURCES TRUE) else() - set(COMPILER_RT_HAS_LIBCXX_SOURCES FALSE) + set(COMPILER_RT_LIBCXX_PATH ${LLVM_MAIN_SRC_DIR}/../libcxx) + if(EXISTS ${COMPILER_RT_LIBCXX_PATH}/) + set(COMPILER_RT_HAS_LIBCXX_SOURCES TRUE) + else() + set(COMPILER_RT_HAS_LIBCXX_SOURCES FALSE) + endif() endif() set(COMPILER_RT_LLD_PATH ${LLVM_MAIN_SRC_DIR}/tools/lld) 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_LLD_PATH ${LLVM_MAIN_SRC_DIR}/../lld) + if(EXISTS ${COMPILER_RT_LLD_PATH}/) + set(COMPILER_RT_HAS_LLD TRUE) + else() + set(COMPILER_RT_HAS_LLD FALSE) + endif() endif() pythonize_bool(COMPILER_RT_HAS_LLD) |