| # Platforms that rules_python's release artifacts are built for, named after | |
| # their Rust target triples; see dev/release_artifacts/build.sh. Linux x86_64 | |
| # hosts cross-compile for the musl one with the musl Rust toolchain in | |
| # MODULE.bazel. The others are built on hosts that match them. | |
| package(default_visibility = ["//:__subpackages__"]) | |
| platform( | |
| name = "aarch64-apple-darwin", | |
| constraint_values = [ | |
| "@platforms//cpu:aarch64", | |
| "@platforms//os:macos", | |
| ], | |
| ) | |
| platform( | |
| name = "aarch64-pc-windows-msvc", | |
| constraint_values = [ | |
| "@platforms//cpu:aarch64", | |
| "@platforms//os:windows", | |
| ], | |
| ) | |
| platform( | |
| name = "aarch64-unknown-linux-musl", | |
| constraint_values = [ | |
| "@platforms//cpu:aarch64", | |
| "@platforms//os:linux", | |
| ":musl", | |
| ], | |
| ) | |
| platform( | |
| name = "x86_64-apple-darwin", | |
| constraint_values = [ | |
| "@platforms//cpu:x86_64", | |
| "@platforms//os:macos", | |
| ], | |
| ) | |
| platform( | |
| name = "x86_64-pc-windows-msvc", | |
| constraint_values = [ | |
| "@platforms//cpu:x86_64", | |
| "@platforms//os:windows", | |
| ], | |
| ) | |
| platform( | |
| name = "x86_64-unknown-linux-gnu", | |
| constraint_values = [ | |
| "@platforms//cpu:x86_64", | |
| "@platforms//os:linux", | |
| ], | |
| ) | |
| # The libc of Linux platforms. Only musl is a constraint value: platforms | |
| # without it, like the host, use glibc. It also keeps the musl Rust toolchain | |
| # in MODULE.bazel from being used for glibc platforms. | |
| constraint_setting(name = "libc") | |
| constraint_value( | |
| name = "musl", | |
| constraint_setting = ":libc", | |
| # The musl Rust toolchain's repo, generated by rules_rust, refers to it. | |
| visibility = ["//visibility:public"], | |
| ) |