drivers/usart: fix wildcard CI build (kernel_config unresolved import) userspace_build defaults True, so client/server were analyzed on the host where kernel_config is no_config, causing E0432 in the CI wildcard build. Gate on TARGET_COMPATIBLE_WITH instead.
diff --git a/drivers/usart/client/BUILD.bazel b/drivers/usart/client/BUILD.bazel index 4b22336..744c074 100644 --- a/drivers/usart/client/BUILD.bazel +++ b/drivers/usart/client/BUILD.bazel
@@ -1,16 +1,14 @@ # Licensed under the Apache-2.0 license load("@rules_rust//rust:defs.bzl", "rust_library") +load("//target/ast10x0:defs.bzl", "TARGET_COMPATIBLE_WITH") rust_library( name = "usart_client", srcs = ["src/lib.rs"], edition = "2024", tags = ["kernel"], - target_compatible_with = select({ - "@pigweed//pw_kernel/userspace:userspace_build_enabled": [], - "//conditions:default": ["@platforms//:incompatible"], - }), + target_compatible_with = TARGET_COMPATIBLE_WITH, visibility = ["//visibility:public"], deps = [ "//drivers/usart/api:usart_api",
diff --git a/drivers/usart/server/BUILD.bazel b/drivers/usart/server/BUILD.bazel index 5473c6a..3d7bc32 100644 --- a/drivers/usart/server/BUILD.bazel +++ b/drivers/usart/server/BUILD.bazel
@@ -1,6 +1,7 @@ # Licensed under the Apache-2.0 license load("@rules_rust//rust:defs.bzl", "rust_library") +load("//target/ast10x0:defs.bzl", "TARGET_COMPATIBLE_WITH") rust_library( name = "usart_server", @@ -10,10 +11,7 @@ ], edition = "2024", tags = ["kernel"], - target_compatible_with = select({ - "@pigweed//pw_kernel/userspace:userspace_build_enabled": [], - "//conditions:default": ["@platforms//:incompatible"], - }), + target_compatible_with = TARGET_COMPATIBLE_WITH, visibility = ["//visibility:public"], deps = [ "//drivers/usart/api:usart_api",