[compiler-rt] [compiler-rt] Drop COMPILER_RT_BUILD_CRT workaround (PR #78331)
Alexander Richardson via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 16 11:33:00 PST 2024
https://github.com/arichardson created https://github.com/llvm/llvm-project/pull/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.
>From 1c020c20b5c3c7e62cd1e5a80a2e09bd9b43f98a Mon Sep 17 00:00:00 2001
From: Alex Richardson <alexrichardson at google.com>
Date: Tue, 16 Jan 2024 11:30:59 -0800
Subject: [PATCH] [compiler-rt] Drop COMPILER_RT_BUILD_CRT workaround
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 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.
---
compiler-rt/lib/builtins/CMakeLists.txt | 5 -----
1 file changed, 5 deletions(-)
diff --git a/compiler-rt/lib/builtins/CMakeLists.txt b/compiler-rt/lib/builtins/CMakeLists.txt
index e5b52db175d960..378884bcaf2e52 100644
--- a/compiler-rt/lib/builtins/CMakeLists.txt
+++ b/compiler-rt/lib/builtins/CMakeLists.txt
@@ -910,11 +910,6 @@ if(COMPILER_RT_BUILD_STANDALONE_LIBATOMIC)
add_dependencies(compiler-rt builtins-standalone-atomic)
endif()
-# TODO: COMPILER_RT_BUILD_CRT used to be a cached variable so we need to unset
-# it first so cmake_dependent_option can set the local variable of the same
-# name. This statement can be removed in the future.
-unset(COMPILER_RT_BUILD_CRT CACHE)
-
cmake_dependent_option(COMPILER_RT_BUILD_CRT "Build crtbegin.o/crtend.o" ON "COMPILER_RT_HAS_CRT" OFF)
if (COMPILER_RT_BUILD_CRT)
More information about the llvm-commits
mailing list