[PATCH] D71950: [CMake] Fix lld detection after D69685
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 27 16:08:47 PST 2019
MaskRay created this revision.
MaskRay added reviewers: anhtuyen, eugenis, pcc, rnk.
Herald added subscribers: llvm-commits, Sanitizers, mgorny.
Herald added projects: Sanitizers, LLVM.
D69685 <https://reviews.llvm.org/D69685> actually broke lld detection for my build (probably due to CMake
processing order).
Before:
build projects/compiler-rt/lib/sanitizer_common/tests/Sanitizer-x86_64-Test-Nolibc: ... bin/clang || ...
After:
build projects/compiler-rt/lib/sanitizer_common/tests/Sanitizer-x86_64-Test-Nolibc: ... bin/clang bin/lld || ...
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D71950
Files:
compiler-rt/cmake/Modules/AddCompilerRT.cmake
Index: compiler-rt/cmake/Modules/AddCompilerRT.cmake
===================================================================
--- compiler-rt/cmake/Modules/AddCompilerRT.cmake
+++ compiler-rt/cmake/Modules/AddCompilerRT.cmake
@@ -465,7 +465,7 @@
set(TEST_LINK_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${TEST_LINK_FLAGS}")
separate_arguments(TEST_LINK_FLAGS)
endif()
- if(NOT COMPILER_RT_STANDALONE_BUILD AND COMPILER_RT_HAS_LLD AND TARGET lld)
+ if(NOT COMPILER_RT_STANDALONE_BUILD AND COMPILER_RT_HAS_LLD AND "lld" IN_LIST LLVM_ENABLE_PROJECTS)
# CMAKE_EXE_LINKER_FLAGS may contain -fuse=lld
# FIXME: -DLLVM_ENABLE_LLD=ON and -DLLVM_ENABLE_PROJECTS without lld case.
list(APPEND TEST_DEPS lld)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71950.235452.patch
Type: text/x-patch
Size: 712 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191228/8527d16c/attachment.bin>
More information about the llvm-commits
mailing list