Skip to content

Commit a473cf3

Browse files
authored
Register more common target triples (#3718)
1 parent 0b94800 commit a473cf3

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

rust/private/repository_utils.bzl

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,19 @@ load(":semver.bzl", "semver")
2020
DEFAULT_TOOLCHAIN_NAME_PREFIX = "toolchain_for"
2121
DEFAULT_STATIC_RUST_URL_TEMPLATES = ["https://static.rust-lang.org/dist/{}.tar.xz"]
2222
DEFAULT_NIGHTLY_VERSION = "nightly/{}".format(DEFAULT_NIGHTLY_ISO_DATE)
23-
DEFAULT_EXTRA_TARGET_TRIPLES = ["wasm32-unknown-unknown", "wasm32-wasip1", "wasm32-wasip2"]
23+
24+
# Toolchains are cheap to declare so we can add common target platforms here
25+
# to make cross-compilation likelier to work out of the box.
26+
# TODO(zbarsky): Should we register even more?
27+
DEFAULT_EXTRA_TARGET_TRIPLES = [
28+
"aarch64-apple-darwin",
29+
"aarch64-unknown-linux-gnu",
30+
"x86_64-apple-darwin",
31+
"x86_64-unknown-linux-gnu",
32+
"wasm32-unknown-unknown",
33+
"wasm32-wasip1",
34+
"wasm32-wasip2",
35+
]
2436

2537
TINYJSON_KWARGS = dict(
2638
name = "rules_rust_tinyjson",

0 commit comments

Comments
 (0)