Skip to content

Commit

Permalink
Disable Swift sandbox when on Swift 5.10+ / Xcode 15.3+
Browse files Browse the repository at this point in the history
Signed-off-by: Adin Cebic <[email protected]>
  • Loading branch information
adincebic committed May 22, 2024
1 parent 4cc4c95 commit 7db5d24
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions swift/internal/xcode_swift_toolchain.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,10 @@ def _xcode_swift_toolchain_impl(ctx):
else:
swiftcopts.extend(ctx.attr._copts[BuildSettingInfo].value)

# We pass '-disable-sandbox' to allow compiling targets with Swift compiler plugins in Bazel sandbox on Xcode 15.3+
if _is_xcode_at_least_version(xcode_config, "15.3"):
swiftcopts.append("-disable-sandbox")

# `--define=SWIFT_USE_TOOLCHAIN_ROOT=<path>` is a rapid development feature
# that lets you build *just* a custom `swift` driver (and `swiftc`
# symlink), rather than a full toolchain, and point compilation actions at
Expand Down

0 comments on commit 7db5d24

Please sign in to comment.