Skip to content

Commit

Permalink
[CMake][Fuchsia] Switch to lld on Apple platforms
Browse files Browse the repository at this point in the history
lld Mach-O backend supports all our use cases now.

Differential Revision: https://reviews.llvm.org/D122047
  • Loading branch information
petrhosek committed Mar 22, 2022
1 parent 6902734 commit abe997b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
12 changes: 3 additions & 9 deletions clang/cmake/caches/Fuchsia-stage2.cmake
Expand Up @@ -9,10 +9,7 @@ set(LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx;libcxxabi;libunwind" CACHE STRING "

set(LLVM_ENABLE_BACKTRACES OFF CACHE BOOL "")
set(LLVM_ENABLE_DIA_SDK OFF CACHE BOOL "")
if(NOT APPLE)
# TODO: Remove this once we switch to ld64.lld.
set(LLVM_ENABLE_LLD ON CACHE BOOL "")
endif()
set(LLVM_ENABLE_LLD ON CACHE BOOL "")
set(LLVM_ENABLE_LTO ON CACHE BOOL "")
set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR ON CACHE BOOL "")
set(LLVM_ENABLE_LIBCXX ON CACHE BOOL "")
Expand All @@ -31,11 +28,8 @@ if(WIN32)
endif()

set(CLANG_DEFAULT_CXX_STDLIB libc++ CACHE STRING "")
if(NOT APPLE)
# TODO: Remove this once we switch to ld64.lld.
set(CLANG_DEFAULT_LINKER lld CACHE STRING "")
set(CLANG_DEFAULT_OBJCOPY llvm-objcopy CACHE STRING "")
endif()
set(CLANG_DEFAULT_LINKER lld CACHE STRING "")
set(CLANG_DEFAULT_OBJCOPY llvm-objcopy CACHE STRING "")
set(CLANG_DEFAULT_RTLIB compiler-rt CACHE STRING "")
set(CLANG_ENABLE_ARCMT OFF CACHE BOOL "")
set(CLANG_ENABLE_STATIC_ANALYZER ON CACHE BOOL "")
Expand Down
12 changes: 3 additions & 9 deletions clang/cmake/caches/Fuchsia.cmake
Expand Up @@ -22,11 +22,8 @@ if(WIN32)
endif()

set(CLANG_DEFAULT_CXX_STDLIB libc++ CACHE STRING "")
if(NOT APPLE)
# TODO: Remove this once we switch to ld64.lld.
set(CLANG_DEFAULT_LINKER lld CACHE STRING "")
set(CLANG_DEFAULT_OBJCOPY llvm-objcopy CACHE STRING "")
endif()
set(CLANG_DEFAULT_LINKER lld CACHE STRING "")
set(CLANG_DEFAULT_OBJCOPY llvm-objcopy CACHE STRING "")
set(CLANG_DEFAULT_RTLIB compiler-rt CACHE STRING "")
set(CLANG_ENABLE_ARCMT OFF CACHE BOOL "")
set(CLANG_ENABLE_STATIC_ANALYZER OFF CACHE BOOL "")
Expand Down Expand Up @@ -112,11 +109,8 @@ if(UNIX)
set(BOOTSTRAP_CMAKE_EXE_LINKER_FLAGS "-ldl -lpthread" CACHE STRING "")
endif()

set(BOOTSTRAP_LLVM_ENABLE_LLD ON CACHE BOOL "")
set(BOOTSTRAP_LLVM_ENABLE_LTO ON CACHE BOOL "")
if(NOT APPLE)
# TODO: Remove this once we switch to ld64.lld.
set(BOOTSTRAP_LLVM_ENABLE_LLD ON CACHE BOOL "")
endif()

set(CLANG_BOOTSTRAP_TARGETS
check-all
Expand Down

0 comments on commit abe997b

Please sign in to comment.