diff options
Diffstat (limited to 'pw_interrupt/BUILD.bazel')
-rw-r--r-- | pw_interrupt/BUILD.bazel | 37 |
1 files changed, 15 insertions, 22 deletions
diff --git a/pw_interrupt/BUILD.bazel b/pw_interrupt/BUILD.bazel index 5379e0628..00b7598c9 100644 --- a/pw_interrupt/BUILD.bazel +++ b/pw_interrupt/BUILD.bazel @@ -22,6 +22,10 @@ package(default_visibility = ["//visibility:public"]) licenses(["notice"]) +constraint_setting( + name = "backend_constraint_setting", +) + pw_cc_facade( name = "context_facade", hdrs = [ @@ -32,32 +36,21 @@ pw_cc_facade( pw_cc_library( name = "context", + hdrs = [ + "public/pw_interrupt/context.h", + ], + includes = ["public"], deps = [ - ":context_facade", - "@pigweed_config//:pw_interrupt_backend", + "@pigweed//targets:pw_interrupt_backend", ], ) -pw_cc_library( +alias( name = "backend_multiplexer", - # Normally this would be done in the backend packages but because there is - # no host implementation we have to define this here. - target_compatible_with = select({ - "@platforms//cpu:armv7-m": [], - "@platforms//cpu:armv7e-m": [], - "@platforms//cpu:armv8-m": [], - "//conditions:default": ["@platforms//:incompatible"], - }), - visibility = ["@pigweed_config//:__pkg__"], - deps = select({ - "@platforms//cpu:armv7-m": ["//pw_interrupt_cortex_m:context_armv7m"], - "@platforms//cpu:armv7e-m": ["//pw_interrupt_cortex_m:context_armv7m"], - "@platforms//cpu:armv8-m": ["//pw_interrupt_cortex_m:context_armv8m"], - # This is required for this to be a valid select when building for the - # host i.e. 'bazel build //pw_interrupt/...'. The - # target_compatible_with attribute is used to skip this target when - # built with a wildcard. If explicitly depended on for a host build - # the build will fail. - "//conditions:default": [], + actual = select({ + "//pw_interrupt_cortex_m:backend": "//pw_interrupt_cortex_m:context", + "//pw_interrupt_xtensa:backend": "//pw_interrupt_xtensa:context", + "//conditions:default": "//pw_build:unspecified_backend", }), + visibility = ["@pigweed//targets:__pkg__"], ) |