Author: Haowei Date: 2026-01-21T22:50:09-08:00 New Revision: a581ceb3e3953e690af53fa8f64e84edbcde29dd
URL: https://github.com/llvm/llvm-project/commit/a581ceb3e3953e690af53fa8f64e84edbcde29dd DIFF: https://github.com/llvm/llvm-project/commit/a581ceb3e3953e690af53fa8f64e84edbcde29dd.diff LOG: [clang][cmake] Use llvm-libtool-darwin in clang multi-stage build (#177277) We are seeing the build system uses the XCode's libtool when building the 2nd stage of the clang on mac. We should use the llvm-libtool-darwin from the previous stage clang build instead. This patch makes multi-stage clang build to use llvm-libtool-darwin from the previous stage when targeting mac. Added: Modified: clang/CMakeLists.txt Removed: ################################################################################ diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt index e4cb1a359620d..f0d10603374b9 100644 --- a/clang/CMakeLists.txt +++ b/clang/CMakeLists.txt @@ -645,6 +645,7 @@ if (CLANG_ENABLE_BOOTSTRAP) # variable, and have LLVM's CMake append the envar to the archiver calls. set(LTO_LIBRARY -DDARWIN_LTO_LIBRARY=${LLVM_SHLIB_OUTPUT_INTDIR}/libLTO.dylib -DDYLD_LIBRARY_PATH=${LLVM_LIBRARY_OUTPUT_INTDIR}) + set(${CLANG_STAGE}_LIBTOOL -DCMAKE_LIBTOOL=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-libtool-darwin) elseif(MSVC) add_dependencies(clang-bootstrap-deps llvm-lib) set(${CLANG_STAGE}_AR -DCMAKE_AR=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-lib) @@ -845,6 +846,7 @@ if (CLANG_ENABLE_BOOTSTRAP) ${${CLANG_STAGE}_RANLIB} ${${CLANG_STAGE}_OBJCOPY} ${${CLANG_STAGE}_STRIP} + ${${CLANG_STAGE}_LIBTOOL} BUILD_COMMAND ${CMAKE_COMMAND} --build ${BINARY_DIR} --config ${build_configuration} ${build_tool_args} _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
