Skip to content

Commit

Permalink
Add troubleshooting for Xcode locator problems in Bazel docs.
Browse files Browse the repository at this point in the history
bazelbuild#4615

RELNOTES: None.
PiperOrigin-RevId: 334512179
  • Loading branch information
susinmotion authored and Yannic committed Oct 5, 2020
1 parent f817d13 commit 92500c5
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions site/docs/migrate-xcode.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,3 +270,25 @@ bazel build //:my-target
When building with Bazel, the `WORKSPACE` and `BUILD` files become the source
of truth about the build. To make Xcode aware of this, you must generate a
Bazel-compatible Xcode project using [Tulsi](http://tulsi.bazel.build/).

### Troubleshooting

Bazel errors can arise when it gets out of sync with the selected Xcode version,
like when you apply an update. Here are some things to try if you're
experiencing errors with Xcode, for example "Xcode version must be specified to
use an Apple CROSSTOOL".

* Manually run Xcode and accept any terms and conditions.

* Use Xcode select to indicate the correct version, accept the license, and
clear Bazel's state.
```
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -license
bazel sync --configure
```

* If this does not work, you may also try running `bazel clean --expunge`.

Note: If you've saved your Xcode to a different path, you can use `xcode-select
-s` to point to that path.

0 comments on commit 92500c5

Please sign in to comment.