summaryrefslogtreecommitdiff
path: root/runtimes/CMakeLists.txt
diff options
context:
space:
mode:
authorChris Bieneman <chris.bieneman@me.com>2019-05-29 18:37:49 +0000
committerChris Bieneman <chris.bieneman@me.com>2019-05-29 18:37:49 +0000
commit0c5b5c7d5f3f68a3258ff0aa804d36cb52183ac8 (patch)
treedf47cdf59a919ace20d0a72f34d229d7e76bb128 /runtimes/CMakeLists.txt
parent2a507f15555c34ea28b5c5d2c505034e09a9465f (diff)
downloadllvm-0c5b5c7d5f3f68a3258ff0aa804d36cb52183ac8.tar.gz
[CMake] [Runtimes] Set *_STANDALONE_BUILD
Summary: 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. Reviewers: smeenai, phosek, compnerd Reviewed By: phosek Subscribers: mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62410 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362007 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'runtimes/CMakeLists.txt')
-rw-r--r--runtimes/CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/runtimes/CMakeLists.txt b/runtimes/CMakeLists.txt
index acf4f3e3e57a..51ad2371f44f 100644
--- a/runtimes/CMakeLists.txt
+++ b/runtimes/CMakeLists.txt
@@ -128,6 +128,12 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
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()