Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add explicit --sdk argument to xcrun calls #9371

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/bootstrap/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ cp $OUTPUT_DIR/libblaze.jar ${ARCHIVE_DIR}
# TODO(b/28965185): Remove when xcode-locator is no longer required in embedded_binaries.
log "Compiling xcode-locator..."
if [[ $PLATFORM == "darwin" ]]; then
run /usr/bin/xcrun clang -fobjc-arc -framework CoreServices -framework Foundation -o ${ARCHIVE_DIR}/_embedded_binaries/xcode-locator tools/osx/xcode_locator.m
run /usr/bin/xcrun --sdk macosx clang -fobjc-arc -framework CoreServices -framework Foundation -o ${ARCHIVE_DIR}/_embedded_binaries/xcode-locator tools/osx/xcode_locator.m
else
cp tools/osx/xcode_locator_stub.sh ${ARCHIVE_DIR}/_embedded_binaries/xcode-locator
fi
Expand Down
2 changes: 1 addition & 1 deletion src/tools/xcode/realpath/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ genrule(
name = "realpath_genrule",
srcs = ["realpath.c"],
outs = ["realpath"],
cmd = "/usr/bin/xcrun clang -o $@ $<",
cmd = "/usr/bin/xcrun --sdk macosx clang -o $@ $<",
output_to_bindir = 1,
visibility = ["//visibility:public"],
)
Expand Down
2 changes: 2 additions & 0 deletions tools/cpp/osx_cc_configure.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ def configure_osx_toolchain(repository_ctx, overriden_tools):
"env",
"-i",
"xcrun",
"--sdk",
"macosx",
"clang",
"-std=c++11",
"-lc++",
Expand Down
2 changes: 1 addition & 1 deletion tools/osx/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ exports_files([
])

DARWIN_XCODE_LOCATOR_COMPILE_COMMAND = """
/usr/bin/xcrun clang -fobjc-arc -framework CoreServices \
/usr/bin/xcrun --sdk macosx clang -fobjc-arc -framework CoreServices \
-framework Foundation -o $@ $<
"""

Expand Down
2 changes: 2 additions & 0 deletions tools/osx/xcode_configure.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ def run_xcode_locator(repository_ctx, xcode_locator_src_label):
"env",
"-i",
"xcrun",
"--sdk",
"macosx",
"clang",
"-fobjc-arc",
"-framework",
Expand Down