Improve Rust build infrastructure
Further usage of this (coming in future changes) revealed some issues.
Change-Id: Ib60968c580db4e7bb4bd60c782ce7f93a7fc594d
Signed-off-by: Brian Silverman <bsilver16384@gmail.com>
diff --git a/build_tests/BUILD b/build_tests/BUILD
index 24fdad8..dc76f45 100644
--- a/build_tests/BUILD
+++ b/build_tests/BUILD
@@ -141,19 +141,19 @@
rust_library(
name = "hello_lib",
srcs = ["hello_lib.rs"],
- target_compatible_with = ["@platforms//os:linux"],
+ target_compatible_with = ["//tools/platforms/rust:has_support"],
)
rust_test(
name = "hello_lib_test",
crate = ":hello_lib",
- target_compatible_with = ["@platforms//os:linux"],
+ target_compatible_with = ["//tools/platforms/rust:has_support"],
)
rust_binary(
name = "rust_hello",
srcs = ["rust_hello.rs"],
- target_compatible_with = ["@platforms//os:linux"],
+ target_compatible_with = ["//tools/platforms/rust:has_support"],
deps = [":hello_lib"],
)
@@ -182,7 +182,7 @@
rust_library(
name = "rust_in_cc_rs",
srcs = ["rust_in_cc.rs"],
- target_compatible_with = ["@platforms//os:linux"],
+ target_compatible_with = ["//tools/platforms/rust:has_support"],
)
cc_test(