[llvm] 2b9b7b5 - [runtimes] Do not set XXX_STANDALONE_BUILD for libc++/abi/unwind
Louis Dionne via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 22 22:09:54 PDT 2020
Author: Louis Dionne
Date: 2020-10-23T01:09:23-04:00
New Revision: 2b9b7b5775a1d8fcd7aa5abaa8fc0bc303434f1a
URL: https://github.com/llvm/llvm-project/commit/2b9b7b5775a1d8fcd7aa5abaa8fc0bc303434f1a
DIFF: https://github.com/llvm/llvm-project/commit/2b9b7b5775a1d8fcd7aa5abaa8fc0bc303434f1a.diff
LOG: [runtimes] Do not set XXX_STANDALONE_BUILD for libc++/abi/unwind
The runtimes build was lying to the various runtimes builds by setting
XXX_STANDALONE_BUILD=ON when they are really not being built standalone.
Only COMPILER_RT_STANDALONE_BUILD appears to be necessary, but setting it
for the other runtimes actually breaks everything.
Differential Revision: https://reviews.llvm.org/D90005
Added:
Modified:
llvm/runtimes/CMakeLists.txt
Removed:
################################################################################
diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt
index 598daa4502e1..9d8222b14991 100644
--- a/llvm/runtimes/CMakeLists.txt
+++ b/llvm/runtimes/CMakeLists.txt
@@ -133,11 +133,13 @@ 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
+ # compiler-rt needs to treat this as standalone builds. D57992 tried
+ # to get rid of it for compiler-rt, but it treats *_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 ("${canon_name}" STREQUAL "COMPILER_RT")
+ set(${canon_name}_STANDALONE_BUILD ON)
+ endif()
if(LLVM_RUNTIMES_LIBDIR_SUBDIR)
set(${canon_name}_LIBDIR_SUBDIR "${LLVM_RUNTIMES_LIBDIR_SUBDIR}" CACHE STRING "" FORCE)
More information about the llvm-commits
mailing list