[PATCH] D62410: [CMake] [Runtimes] Set *_STANDALONE_BUILD
Chris Bieneman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 24 10:28:29 PDT 2019
beanz created this revision.
beanz added reviewers: smeenai, phosek, compnerd.
Herald added a subscriber: mgorny.
Herald added a project: LLVM.
The runtimes use `*_STANDALONE_BUILD=OFF` to signify that clang is an in-tree target. This is not the case with the runtime builds, so we really need this set to `ON`.
In order to resolve the issues phosek was having with checks, we should use checks that don't link. We can use compiler-rt's `try_compile_only` as a basis for that.
This patch is *required* to be able to run the runtime libraries check-* targets.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D62410
Files:
llvm/runtimes/CMakeLists.txt
Index: llvm/runtimes/CMakeLists.txt
===================================================================
--- llvm/runtimes/CMakeLists.txt
+++ llvm/runtimes/CMakeLists.txt
@@ -128,6 +128,12 @@
string(REPLACE "-" "_" canon_name ${projName})
string(TOUPPER ${canon_name} canon_name)
+ # The subdirectories need to treat this as standalone builds. D57992 tried
+ # to get rid of this, but the runtimes treat *_STANDALONE_BUILD=OFF as if
+ # llvm & clang are configured in the same CMake, and setup dependencies
+ # against their targets.
+ set(${canon_name}_STANDALONE_BUILD ON)
+
if(LLVM_RUNTIMES_LIBDIR_SUBDIR)
set(${canon_name}_LIBDIR_SUBDIR "${LLVM_RUNTIMES_LIBDIR_SUBDIR}" CACHE STRING "" FORCE)
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62410.201283.patch
Type: text/x-patch
Size: 748 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190524/6becc341/attachment.bin>
More information about the llvm-commits
mailing list