[llvm] r362007 - [CMake] [Runtimes] Set *_STANDALONE_BUILD
Chris Bieneman via llvm-commits
llvm-commits at lists.llvm.org
Wed May 29 11:37:49 PDT 2019
Author: cbieneman
Date: Wed May 29 11:37:49 2019
New Revision: 362007
URL: http://llvm.org/viewvc/llvm-project?rev=362007&view=rev
Log:
[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
Modified:
llvm/trunk/runtimes/CMakeLists.txt
Modified: llvm/trunk/runtimes/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/runtimes/CMakeLists.txt?rev=362007&r1=362006&r2=362007&view=diff
==============================================================================
--- llvm/trunk/runtimes/CMakeLists.txt (original)
+++ llvm/trunk/runtimes/CMakeLists.txt Wed May 29 11:37:49 2019
@@ -128,6 +128,12 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_
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()
More information about the llvm-commits
mailing list