-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a flag to allow tools to be compiled as universal binaries (#712)
This adds a new boolean flag `--@build_bazel_rules_swift//swift:universal_tools` that when used will force all the tools used in this repository to be compiled into universal binaries. This allows execution running on different macOS platforms (`arm64` and `x86_64`) to be compatible with each other and can run natively on both.
- Loading branch information
Showing
7 changed files
with
87 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
load("@build_bazel_apple_support//rules:universal_binary.bzl", "universal_binary") | ||
|
||
package(default_visibility = ["//visibility:public"]) | ||
|
||
universal_binary( | ||
name = "universal_protoc", | ||
binary = "@com_google_protobuf//:protoc", | ||
) | ||
|
||
alias( | ||
name = "protoc_wrapper", | ||
actual = select({ | ||
"//swift:universal_tools_config": ":universal_protoc", | ||
"//conditions:default": "@com_google_protobuf//:protoc", | ||
}), | ||
) |
This file contains 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