This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGde98da2eced7: [CMake] Only include LTO on Apple targets (authored by phosek).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103916/new/ https://reviews.llvm.org/D103916 Files: clang/cmake/caches/Fuchsia-stage2.cmake clang/cmake/caches/Fuchsia.cmake Index: clang/cmake/caches/Fuchsia.cmake =================================================================== --- clang/cmake/caches/Fuchsia.cmake +++ clang/cmake/caches/Fuchsia.cmake @@ -9,7 +9,10 @@ set(LLVM_ENABLE_BACKTRACES OFF CACHE BOOL "") set(LLVM_ENABLE_DIA_SDK OFF CACHE BOOL "") set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR ON CACHE BOOL "") -set(LLVM_ENABLE_PIC OFF CACHE BOOL "") +if(NOT APPLE) + # TODO: Remove this once we switch to ld64.lld. + set(LLVM_ENABLE_PIC OFF CACHE BOOL "") +endif() set(LLVM_ENABLE_TERMINFO OFF CACHE BOOL "") set(LLVM_ENABLE_UNWIND_TABLES OFF CACHE BOOL "") set(LLVM_ENABLE_Z3_SOLVER OFF CACHE BOOL "") @@ -24,6 +27,7 @@ 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() @@ -114,6 +118,7 @@ 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() Index: clang/cmake/caches/Fuchsia-stage2.cmake =================================================================== --- clang/cmake/caches/Fuchsia-stage2.cmake +++ clang/cmake/caches/Fuchsia-stage2.cmake @@ -10,11 +10,15 @@ 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_LTO ON CACHE BOOL "") set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR ON CACHE BOOL "") -set(LLVM_ENABLE_PIC OFF CACHE BOOL "") +if(NOT APPLE) + # TODO: Remove this once we switch to ld64.lld. + set(LLVM_ENABLE_PIC OFF CACHE BOOL "") +endif() set(LLVM_ENABLE_LIBCXX ON CACHE BOOL "") set(LLVM_ENABLE_TERMINFO OFF CACHE BOOL "") set(LLVM_ENABLE_UNWIND_TABLES OFF CACHE BOOL "") @@ -32,6 +36,7 @@ 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() @@ -292,10 +297,14 @@ sancov CACHE STRING "") +if(APPLE) + # TODO: Remove this once we switch to ld64.lld. + set(target_components LTO) +endif() + set(LLVM_DISTRIBUTION_COMPONENTS clang lld - LTO clang-apply-replacements clang-doc clang-format @@ -307,5 +316,6 @@ clangd builtins runtimes + ${target_components} ${LLVM_TOOLCHAIN_TOOLS} CACHE STRING "")
Index: clang/cmake/caches/Fuchsia.cmake =================================================================== --- clang/cmake/caches/Fuchsia.cmake +++ clang/cmake/caches/Fuchsia.cmake @@ -9,7 +9,10 @@ set(LLVM_ENABLE_BACKTRACES OFF CACHE BOOL "") set(LLVM_ENABLE_DIA_SDK OFF CACHE BOOL "") set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR ON CACHE BOOL "") -set(LLVM_ENABLE_PIC OFF CACHE BOOL "") +if(NOT APPLE) + # TODO: Remove this once we switch to ld64.lld. + set(LLVM_ENABLE_PIC OFF CACHE BOOL "") +endif() set(LLVM_ENABLE_TERMINFO OFF CACHE BOOL "") set(LLVM_ENABLE_UNWIND_TABLES OFF CACHE BOOL "") set(LLVM_ENABLE_Z3_SOLVER OFF CACHE BOOL "") @@ -24,6 +27,7 @@ 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() @@ -114,6 +118,7 @@ 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() Index: clang/cmake/caches/Fuchsia-stage2.cmake =================================================================== --- clang/cmake/caches/Fuchsia-stage2.cmake +++ clang/cmake/caches/Fuchsia-stage2.cmake @@ -10,11 +10,15 @@ 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_LTO ON CACHE BOOL "") set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR ON CACHE BOOL "") -set(LLVM_ENABLE_PIC OFF CACHE BOOL "") +if(NOT APPLE) + # TODO: Remove this once we switch to ld64.lld. + set(LLVM_ENABLE_PIC OFF CACHE BOOL "") +endif() set(LLVM_ENABLE_LIBCXX ON CACHE BOOL "") set(LLVM_ENABLE_TERMINFO OFF CACHE BOOL "") set(LLVM_ENABLE_UNWIND_TABLES OFF CACHE BOOL "") @@ -32,6 +36,7 @@ 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() @@ -292,10 +297,14 @@ sancov CACHE STRING "") +if(APPLE) + # TODO: Remove this once we switch to ld64.lld. + set(target_components LTO) +endif() + set(LLVM_DISTRIBUTION_COMPONENTS clang lld - LTO clang-apply-replacements clang-doc clang-format @@ -307,5 +316,6 @@ clangd builtins runtimes + ${target_components} ${LLVM_TOOLCHAIN_TOOLS} CACHE STRING "")
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits