Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Commit

Permalink
[compiler-rt] Drop COMPILER_RT_BUILD_CRT workaround (#78331)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
arichardson authored Jan 17, 2024
1 parent b6f922f commit 0266f41
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions compiler-rt/lib/builtins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0266f41

Please sign in to comment.