Skip to content

Commit 0266f41

Browse files
authored
[compiler-rt] Drop COMPILER_RT_BUILD_CRT workaround (llvm#78331)
This variable was explicitly removed from the cache to ease transition from existing build directories but that breaks passing COMPILER_RT_BUILD_CRT=OFF on the command line. I was surprised to see the CRT builds being run for my builtins-only build config (I noticed because one of the tests was failing despite having `REQUIRES: crt`). If I pass `-DCOMPILER_RT_BUILD_CRT=OFF` to cmake and add some prints around the `unset` statement it shows the following: ``` -- before unset(): COMPILER_RT_BUILD_CRT=OFF -- after unset: COMPILER_RT_BUILD_CRT= -- after cmake_dependent_option COMPILER_RT_BUILD_CRT=ON ``` Drop this temporary workaround now that over 6 months have passed.
1 parent b6f922f commit 0266f41

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

compiler-rt/lib/builtins/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -910,11 +910,6 @@ if(COMPILER_RT_BUILD_STANDALONE_LIBATOMIC)
910910
add_dependencies(compiler-rt builtins-standalone-atomic)
911911
endif()
912912

913-
# TODO: COMPILER_RT_BUILD_CRT used to be a cached variable so we need to unset
914-
# it first so cmake_dependent_option can set the local variable of the same
915-
# name. This statement can be removed in the future.
916-
unset(COMPILER_RT_BUILD_CRT CACHE)
917-
918913
cmake_dependent_option(COMPILER_RT_BUILD_CRT "Build crtbegin.o/crtend.o" ON "COMPILER_RT_HAS_CRT" OFF)
919914

920915
if (COMPILER_RT_BUILD_CRT)

0 commit comments

Comments
 (0)