Skip to content

Commit

Permalink
[CMake][Fuchsia] Enable standalone libatomic
Browse files Browse the repository at this point in the history
BUILTINS_${target}_COMPILER_RT_BUILD_STANDALONE_LIBATOMIC
actually builds libatomic, and
RUNTIMES_${target}_COMPILER_RT_BUILD_STANDALONE_LIBATOMIC
tells the compiler-rt tests that we built it and it is
safe to use in tests.

Differential Revision: https://reviews.llvm.org/D151681
  • Loading branch information
abrachet committed Jun 26, 2023
1 parent 0c11478 commit 1be27bd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions clang/cmake/caches/Fuchsia-stage2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ foreach(target aarch64-unknown-linux-gnu;armv7-unknown-linux-gnueabihf;i386-unkn
set(BUILTINS_${target}_CMAKE_SHARED_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "")
set(BUILTINS_${target}_CMAKE_MODULE_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "")
set(BUILTINS_${target}_CMAKE_EXE_LINKER_FLAG "-fuse-ld=lld" CACHE STRING "")
set(BUILTINS_${target}_COMPILER_RT_BUILD_STANDALONE_LIBATOMIC ON CACHE BOOL "")

# Set the per-target runtimes options.
list(APPEND RUNTIME_TARGETS "${target}")
Expand All @@ -159,6 +160,7 @@ foreach(target aarch64-unknown-linux-gnu;armv7-unknown-linux-gnueabihf;i386-unkn
set(RUNTIMES_${target}_COMPILER_RT_USE_BUILTINS_LIBRARY ON CACHE BOOL "")
set(RUNTIMES_${target}_COMPILER_RT_USE_LLVM_UNWINDER ON CACHE BOOL "")
set(RUNTIMES_${target}_COMPILER_RT_CAN_EXECUTE_TESTS ON CACHE BOOL "")
set(RUNTIMES_${target}_COMPILER_RT_BUILD_STANDALONE_LIBATOMIC ON CACHE BOOL "")
set(RUNTIMES_${target}_LIBUNWIND_ENABLE_SHARED OFF CACHE BOOL "")
set(RUNTIMES_${target}_LIBUNWIND_USE_COMPILER_RT ON CACHE BOOL "")
set(RUNTIMES_${target}_LIBCXXABI_USE_COMPILER_RT ON CACHE BOOL "")
Expand Down

0 comments on commit 1be27bd

Please sign in to comment.