-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Conversation
Since this affects cache, can it be picked into the next release (1.0)? |
Should the flags be |
@DavidGoldman updated! |
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 ```
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 |
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 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.
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
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
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
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 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 macosx
seems 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: