[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.
This commit is contained in:
parent
1b37911f1a
commit
a581ceb3e3
1 changed files with 2 additions and 0 deletions
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Reference in a new issue