diff --git a/WORKSPACE b/WORKSPACE index 12d94b0..ebc85a8 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -53,7 +53,7 @@ register_coreutils_toolchains() load("@musl_toolchains//:repositories.bzl", "load_musl_toolchains") -load_musl_toolchains() +load_musl_toolchains(extra_target_compatible_with = ["@//tools/linkers:musl"]) load("@musl_toolchains//:toolchains.bzl", "register_musl_toolchains") @@ -204,13 +204,22 @@ rust_repository_set( "aarch64-unknown-linux-musl": [ "@platforms//cpu:arm64", "@platforms//os:linux", + "@//tools/linkers:musl", + ], + "aarch64-unknown-linux-gnu": [ + "@platforms//cpu:arm64", + "@platforms//os:linux", + "@//tools/linkers:unknown", ], "x86_64-unknown-linux-gnu": [ - "@platforms//:incompatible", + "@platforms//cpu:x86_64", + "@platforms//os:linux", + "@//tools/linkers:unknown", ], "x86_64-unknown-linux-musl": [ "@platforms//cpu:x86_64", "@platforms//os:linux", + "@//tools/linkers:musl", ], }, versions = [RUST_VERSION], diff --git a/py/tools/venv_bin/BUILD.bazel b/py/tools/venv_bin/BUILD.bazel index 4d359b8..a6bb1e2 100644 --- a/py/tools/venv_bin/BUILD.bazel +++ b/py/tools/venv_bin/BUILD.bazel @@ -14,6 +14,7 @@ rust_binary( "@crate_index//:clap", "@crate_index//:miette", ], + tags = ["manual"], ) alias( diff --git a/tools/linkers/BUILD.bazel b/tools/linkers/BUILD.bazel new file mode 100644 index 0000000..697d87b --- /dev/null +++ b/tools/linkers/BUILD.bazel @@ -0,0 +1,29 @@ +constraint_setting( + name = "linker", + default_constraint_value = ":unknown", + visibility = ["//visibility:public"], +) + +constraint_value( + name = "musl", + constraint_setting = ":linker", + visibility = ["//visibility:public"], +) + +# Default linker for anyone not setting the linker to `musl`. +# You shouldn't ever need to set this value manually. +constraint_value( + name = "unknown", + constraint_setting = ":linker", + visibility = ["//visibility:public"], +) + +platform( + name = "linux_x86_64_musl", + constraint_values = [ + ":musl", + "@platforms//cpu:x86_64", + "@platforms//os:linux", + ], + visibility = ["//visibility:public"], +)