From f8e810c359b51c911dfb3be1f8c48f28356c09ec Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Fri, 26 Feb 2021 12:13:51 -0500 Subject: [PATCH] [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. --- libcxx/utils/ci/run-buildbot | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot index 56ece02..09ddd65 100755 --- a/libcxx/utils/ci/run-buildbot +++ b/libcxx/utils/ci/run-buildbot @@ -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" \ -- 2.7.4