Skip to content

Commit

Permalink
Use OS X SDK for Darwin Ninja bootstrap builds
Browse files Browse the repository at this point in the history
Contributors may not have the Xcode command line tools installed,
so pass along the SDK for standard C headers when bootstrapping
the Ninja build.
  • Loading branch information
bitjammer committed Nov 17, 2015
1 parent 106bf80 commit 69d3b20
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions utils/build-script-impl
Original file line number Diff line number Diff line change
Expand Up @@ -1260,8 +1260,13 @@ if [[ "${BUILD_NINJA}" ]] ; then
set -x
rm -rf "${build_dir}"
cp -r "${NINJA_SOURCE_DIR}" "${build_dir}"
(cd "${build_dir}" && python ./configure.py --bootstrap)
{ set +x; } 2>/dev/null
if [[ $(uname -s) == "Darwin" ]]; then
(cd "${build_dir}" && env CXX=$(xcrun --sdk macosx -find clang++) CFLAGS="-isysroot $(xcrun --sdk macosx --show-sdk-path)" python ./configure.py --bootstrap)
{ set +x; } 2>/dev/null
else
(cd "${build_dir}" && python ./configure.py --bootstrap)
{ set +x; } 2>/dev/null
fi
fi
export PATH="${build_dir}:${PATH}"
fi
Expand Down

0 comments on commit 69d3b20

Please sign in to comment.