Skip to content

Commit 1cbd67e

Browse files
authored
Revert "[Fuchsia][cmake] Allow using FatLTO when building runtimes" (#119252)
Reverts #112277 This broke something on Fuchsia's Mac builders, so there's still something in the CMake that needs to be updated before we reland. Failed build: https://ci.chromium.org/ui/p/fuchsia/builders/toolchain.ci/clang-mac-xarm64/b8729005878443108801/overview
1 parent 511e84f commit 1cbd67e

File tree

2 files changed

+1
-17
lines changed

2 files changed

+1
-17
lines changed

clang/cmake/caches/Fuchsia-stage2.cmake

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,6 @@ foreach(target aarch64-unknown-linux-gnu;armv7-unknown-linux-gnueabihf;i386-unkn
190190
set(RUNTIMES_${target}_LLVM_TOOLS_DIR "${CMAKE_BINARY_DIR}/bin" CACHE BOOL "")
191191
set(RUNTIMES_${target}_LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx;libcxxabi;libunwind" CACHE STRING "")
192192

193-
# Enable FatLTO for Linux and baremetal runtimes
194-
set(RUNTIMES_${target}_LLVM_ENABLE_LTO ON CACHE BOOL "")
195-
set(RUNTIMES_${target}_LLVM_ENABLE_FATLTO ON CACHE BOOL "")
196-
197193
# Use .build-id link.
198194
list(APPEND RUNTIME_BUILD_ID_LINK "${target}")
199195
endif()
@@ -276,10 +272,6 @@ if(FUCHSIA_SDK)
276272
set(RUNTIMES_${target}+asan+noexcept_LIBCXXABI_ENABLE_EXCEPTIONS OFF CACHE BOOL "")
277273
set(RUNTIMES_${target}+asan+noexcept_LIBCXX_ENABLE_EXCEPTIONS OFF CACHE BOOL "")
278274

279-
# Enable FatLTO for Fuchsia runtimes
280-
set(RUNTIMES_${target}_LLVM_ENABLE_LTO ON CACHE BOOL "")
281-
set(RUNTIMES_${target}_LLVM_ENABLE_FATLTO ON CACHE BOOL "")
282-
283275
# Use .build-id link.
284276
list(APPEND RUNTIME_BUILD_ID_LINK "${target}")
285277
endforeach()
@@ -371,10 +363,6 @@ foreach(target armv6m-none-eabi;armv7m-none-eabi;armv8m.main-none-eabi;armv8.1m.
371363
set(RUNTIMES_${target}_LLVM_INCLUDE_TESTS OFF CACHE BOOL "")
372364
set(RUNTIMES_${target}_LLVM_ENABLE_ASSERTIONS OFF CACHE BOOL "")
373365
set(RUNTIMES_${target}_LLVM_ENABLE_RUNTIMES "libc;libcxx" CACHE STRING "")
374-
375-
# Enable FatLTO for baremetal runtimes
376-
set(RUNTIMES_${target}_LLVM_ENABLE_LTO ON CACHE BOOL "")
377-
set(RUNTIMES_${target}_LLVM_ENABLE_FATLTO ON CACHE BOOL "")
378366
endforeach()
379367

380368
foreach(target riscv32-unknown-elf)
@@ -426,10 +414,6 @@ foreach(target riscv32-unknown-elf)
426414
set(RUNTIMES_${target}_LLVM_INCLUDE_TESTS OFF CACHE BOOL "")
427415
set(RUNTIMES_${target}_LLVM_ENABLE_ASSERTIONS OFF CACHE BOOL "")
428416
set(RUNTIMES_${target}_LLVM_ENABLE_RUNTIMES "libc;libcxx" CACHE STRING "")
429-
430-
# Enable FatLTO for baremetal runtimes
431-
set(RUNTIMES_${target}_LLVM_ENABLE_LTO ON CACHE BOOL "")
432-
set(RUNTIMES_${target}_LLVM_ENABLE_FATLTO ON CACHE BOOL "")
433417
endforeach()
434418

435419
set(LLVM_BUILTIN_TARGETS "${BUILTIN_TARGETS}" CACHE STRING "")

llvm/cmake/modules/HandleLLVMOptions.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1285,7 +1285,7 @@ elseif(LLVM_ENABLE_LTO)
12851285
endif()
12861286
endif()
12871287

1288-
if(LLVM_ENABLE_FATLTO AND ((UNIX AND NOT APPLE) OR FUCHSIA))
1288+
if(LLVM_ENABLE_FATLTO AND UNIX AND NOT APPLE)
12891289
append("-ffat-lto-objects" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
12901290
if(NOT LINKER_IS_LLD_LINK)
12911291
append("-ffat-lto-objects" CMAKE_EXE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS)

0 commit comments

Comments
 (0)