Add explicit --sdk argument to xcrun calls#9371
Closed
keith wants to merge 1 commit intobazelbuild:masterfrom
Closed
Add explicit --sdk argument to xcrun calls#9371keith wants to merge 1 commit intobazelbuild:masterfrom
keith wants to merge 1 commit intobazelbuild:masterfrom
Conversation
Contributor
|
Since this affects cache, can it be picked into the next release (1.0)? |
Contributor
|
Should the flags be |
Member
Author
|
@DavidGoldman updated! |
Contributor
|
And then I think we should also update this |
Xcode 11 (and possibly earlier versions) has a bug where, when you don't pass `-sdk macosx`, it can either pick the global `/Library/Developer/CommandLineTools` SDK path, or the SDK path bundled within Xcode itself. This seems to depend on if you have other versions of Xcode installed, and which versions of the command line tools you have installed. Passing `-sdk macosx` seems to always force it to pick the Xcode bundled version, which is what we prefer. This fixes issues with remote cache misses caused by these tools not being the same because of this difference. You can see which path it's picking by running: ``` env -i xcrun -l -n clang ```
Member
Author
|
Updated and re-checked all the others, I don't think I missed anymore. There is this one that I think could be improved but it's not hit by this issue https://github.com/keith/bazel/blob/dcbd30ee9788231fc410848d7ad10da5bfca156f/src/tools/xcode/stdredirect/BUILD#L10-L12 |
dslomov
pushed a commit
that referenced
this pull request
Sep 16, 2019
Xcode 11 (and possibly earlier versions) has a bug where, when you don't pass `-sdk macosx`, it can either pick the global `/Library/Developer/CommandLineTools` SDK path, or the SDK path bundled within Xcode itself. This seems to depend on if you have other versions of Xcode installed, and which versions of the command line tools you have installed. Passing `-sdk macosx` seems to always force it to pick the Xcode bundled version, which is what we prefer. This fixes issues with remote cache misses caused by these tools not being the same because of this difference. At least 2 apple bugs have been filed about this FB7147521 FB7253366 You can see which path it's picking by running: ``` env -i xcrun -l -n clang ``` Closes #9371. PiperOrigin-RevId: 268906772
keith
added a commit
to keith/bazel
that referenced
this pull request
Sep 18, 2019
This is a follow up to bazelbuild#9371 which helps maintain cache hits across different macOS versions. By default when you compile something on macOS with clang the minimum OS version is set to the current OS version. This means if you have developers on multiple OS versions they may not get cache hits.
bazel-io
pushed a commit
that referenced
this pull request
Sep 18, 2019
This is a follow up to #9371 which helps maintain cache hits across different macOS versions. By default when you compile something on macOS with clang the minimum OS version is set to the current OS version. This means if you have developers on multiple OS versions they may not get cache hits. 10.9 was chosen to match rules_apple bazelbuild/rules_apple@86ce425 Closes #9403. PiperOrigin-RevId: 269817249
dslomov
pushed a commit
that referenced
this pull request
Sep 30, 2019
Xcode 11 (and possibly earlier versions) has a bug where, when you don't pass `-sdk macosx`, it can either pick the global `/Library/Developer/CommandLineTools` SDK path, or the SDK path bundled within Xcode itself. This seems to depend on if you have other versions of Xcode installed, and which versions of the command line tools you have installed. Passing `-sdk macosx` seems to always force it to pick the Xcode bundled version, which is what we prefer. This fixes issues with remote cache misses caused by these tools not being the same because of this difference. At least 2 apple bugs have been filed about this FB7147521 FB7253366 You can see which path it's picking by running: ``` env -i xcrun -l -n clang ``` Closes #9371. PiperOrigin-RevId: 268906772
dslomov
pushed a commit
that referenced
this pull request
Oct 2, 2019
Xcode 11 (and possibly earlier versions) has a bug where, when you don't pass `-sdk macosx`, it can either pick the global `/Library/Developer/CommandLineTools` SDK path, or the SDK path bundled within Xcode itself. This seems to depend on if you have other versions of Xcode installed, and which versions of the command line tools you have installed. Passing `-sdk macosx` seems to always force it to pick the Xcode bundled version, which is what we prefer. This fixes issues with remote cache misses caused by these tools not being the same because of this difference. At least 2 apple bugs have been filed about this FB7147521 FB7253366 You can see which path it's picking by running: ``` env -i xcrun -l -n clang ``` Closes #9371. PiperOrigin-RevId: 268906772
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Xcode 11 (and possibly earlier versions) has a bug where, when you don't
pass
-sdk macosx, it can either pick the global/Library/Developer/CommandLineToolsSDK path, or the SDK path bundledwithin Xcode itself. This seems to depend on if you have other versions
of Xcode installed, and which versions of the command line tools you
have installed. Passing
-sdk macosxseems to always force it to pickthe Xcode bundled version, which is what we prefer. This fixes issues
with remote cache misses caused by these tools not being the same
because of this difference. At least 2 apple bugs have been filed
about this FB7147521 FB7253366
You can see which path it's picking by running: