Skip to content

Commit 69d3b20

Browse files
committed
Use OS X SDK for Darwin Ninja bootstrap builds
Contributors may not have the Xcode command line tools installed, so pass along the SDK for standard C headers when bootstrapping the Ninja build.
1 parent 106bf80 commit 69d3b20

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

utils/build-script-impl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1260,8 +1260,13 @@ if [[ "${BUILD_NINJA}" ]] ; then
12601260
set -x
12611261
rm -rf "${build_dir}"
12621262
cp -r "${NINJA_SOURCE_DIR}" "${build_dir}"
1263-
(cd "${build_dir}" && python ./configure.py --bootstrap)
1264-
{ set +x; } 2>/dev/null
1263+
if [[ $(uname -s) == "Darwin" ]]; then
1264+
(cd "${build_dir}" && env CXX=$(xcrun --sdk macosx -find clang++) CFLAGS="-isysroot $(xcrun --sdk macosx --show-sdk-path)" python ./configure.py --bootstrap)
1265+
{ set +x; } 2>/dev/null
1266+
else
1267+
(cd "${build_dir}" && python ./configure.py --bootstrap)
1268+
{ set +x; } 2>/dev/null
1269+
fi
12651270
fi
12661271
export PATH="${build_dir}:${PATH}"
12671272
fi

0 commit comments

Comments
 (0)