forked from OSchip/llvm-project
[libc++] Allow running CI on macOS when Ninja isn't installed outside of Xcode
Xcode does bundle Ninja, so we can use that Ninja if there's no system-wide Ninja installed. This is useful on some CI bots we have that don't come with Ninja pre-installed.
This commit is contained in:
parent
a00f7dc2d5
commit
f8e810c359
|
@ -67,9 +67,13 @@ function clean() {
|
|||
|
||||
function generate-cmake() {
|
||||
echo "--- Generating CMake"
|
||||
# On macOS, fall back to using the Ninja provided with Xcode if no other
|
||||
# Ninja can be found.
|
||||
if which ninja &>/dev/null; then ninja_path="$(which ninja)"; else ninja_path="$(xcrun --find ninja)"; fi
|
||||
cmake -S "${MONOREPO_ROOT}/llvm" \
|
||||
-B "${BUILD_DIR}" \
|
||||
-GNinja \
|
||||
-DCMAKE_MAKE_PROGRAM="${ninja_path}" \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \
|
||||
-DLLVM_ENABLE_PROJECTS="libcxx;libunwind;libcxxabi" \
|
||||
|
|
Loading…
Reference in New Issue