[PATCH] D57521: [CMake] External compiler-rt-configure requires LLVMTestingSupport when including tests
Stefan Gränitz via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 31 09:21:13 PST 2019
sgraenitz created this revision.
sgraenitz added reviewers: ab, beanz.
Herald added subscribers: erik.pilkington, mgorny, dberris.
Apparently `LLVMTestingSupport` must be built before `llvm-config` can be asked for it. Symptom with `LLVM_INCLUDE_TESTS=ON` is:
$ ./path/to/llvm-build/bin/llvm-config --ldflags --libs testingsupport
-L/path/to/llvm-build/lib -Wl,-search_paths_first -Wl,-headerpad_max_install_names
llvm-config: error: component libraries and shared library
llvm-config: error: missing: /path/to/llvm-build/lib/libLLVMTestingSupport.a
With `LLVMTestingSupport` as dependency of `compiler-rt-configure` we get the expected behavior:
$ ./path/to/llvm-build/bin/llvm-config --ldflags --libs testingsupport
-L/path/to/llvm-build/lib -Wl,-search_paths_first -Wl,-headerpad_max_install_names
-lLLVMTestingSupport -lLLVMSupport -lLLVMDemangle
Repository:
rC Clang
https://reviews.llvm.org/D57521
Files:
runtime/CMakeLists.txt
Index: runtime/CMakeLists.txt
===================================================================
--- runtime/CMakeLists.txt
+++ runtime/CMakeLists.txt
@@ -62,6 +62,10 @@
set(COMPILER_RT_LIBCXX_DEPENDENCY "cxx-headers")
endif()
+ if(LLVM_INCLUDE_TESTS)
+ list(APPEND COMPILER_RT_LIBCXX_DEPENDENCY LLVMTestingSupport)
+ endif()
+
ExternalProject_Add(compiler-rt
DEPENDS llvm-config clang ${COMPILER_RT_LIBCXX_DEPENDENCY}
PREFIX ${COMPILER_RT_PREFIX}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57521.184527.patch
Type: text/x-patch
Size: 477 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190131/55d4761b/attachment.bin>
More information about the llvm-commits
mailing list