@@ -9,6 +9,10 @@ def triple_to_constraint_set(target_triple):
99 t = triple (target_triple )
1010
1111 if t .system in ("linux" , "nixos" ):
12+ # TODO: Add LLVM constraint support for libc-less Linux builds.
13+ # if t.abi == "none":
14+ # constraints.append("@llvm//constraints/libc:unconstrained")
15+ # elif t.abi == "musl" or "musl" in target_triple:
1216 if t .abi == "musl" or "musl" in target_triple :
1317 # Rustc passes `-no-pie` on musl so make sure we align.
1418 constraints .append ("@llvm//constraints/libc:musl" )
@@ -36,7 +40,7 @@ SUPPORTED_EXEC_TRIPLES = [
3640]
3741
3842# See https://doc.rust-lang.org/beta/rustc/platform-support.html
39- SUPPORTED_TARGET_TRIPLES = [
43+ SUPPORTED_TIER_1_AND_2_TRIPLES = [
4044 # Tier 1
4145 "aarch64-apple-darwin" , # ARM64 macOS (11.0+, Big Sur+)
4246 "aarch64-pc-windows-msvc" , # ARM64 Windows MSVC
@@ -142,6 +146,42 @@ SUPPORTED_TARGET_TRIPLES = [
142146 "x86_64-unknown-none" , # * Freestanding/bare-metal x86_64, softfloat
143147 #"x86_64-unknown-redox", # ✓ Redox OS
144148 "x86_64-unknown-uefi" , # ? 64-bit UEFI
149+ ]
145150
146- # No Tier3 support.
151+ SUPPORTED_TIER_3_TRIPLES = [
152+ "aarch64-unknown-freebsd" ,
153+ "aarch64-unknown-netbsd" ,
154+ "aarch64-unknown-nto-qnx710" ,
155+ "aarch64-unknown-openbsd" ,
156+ "arm64e-apple-darwin" ,
157+ "arm64e-apple-ios" ,
158+ "armv7-unknown-freebsd" ,
159+ "armv7-unknown-netbsd-eabihf" ,
160+ "bpfeb-unknown-none" ,
161+ "bpfel-unknown-none" ,
162+ "i386-apple-ios" ,
163+ "i686-apple-darwin" ,
164+ "i686-unknown-netbsd" ,
165+ "i686-unknown-openbsd" ,
166+ "powerpc-unknown-freebsd" ,
167+ "powerpc-unknown-linux-musl" ,
168+ "powerpc-unknown-netbsd" ,
169+ "powerpc-unknown-openbsd" ,
170+ "powerpc64-unknown-freebsd" ,
171+ "powerpc64-unknown-openbsd" ,
172+ "powerpc64le-unknown-freebsd" ,
173+ "riscv64-linux-android" ,
174+ "riscv64gc-unknown-freebsd" ,
175+ "riscv64gc-unknown-fuchsia" ,
176+ "riscv64gc-unknown-netbsd" ,
177+ "riscv64gc-unknown-openbsd" ,
178+ "s390x-unknown-linux-musl" ,
179+ "sparc64-unknown-netbsd" ,
180+ "sparc64-unknown-openbsd" ,
181+ "wasm64-unknown-unknown" ,
182+ # TODO: Enable once @llvm has constraint support for libc-less Linux builds.
183+ # "x86_64-unknown-linux-none",
184+ "x86_64-unknown-openbsd" ,
147185]
186+
187+ ALL_TARGET_TRIPLES = SUPPORTED_TIER_1_AND_2_TRIPLES + SUPPORTED_TIER_3_TRIPLES
0 commit comments