1# Copyright 2020 The Pigweed Authors 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); you may not 4# use this file except in compliance with the License. You may obtain a copy of 5# the License at 6# 7# https://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12# License for the specific language governing permissions and limitations under 13# the License. 14 15load("//pw_build:pw_facade.bzl", "pw_facade") 16 17package(default_visibility = ["//visibility:public"]) 18 19licenses(["notice"]) 20 21constraint_setting( 22 name = "backend_constraint_setting", 23) 24 25pw_facade( 26 name = "context", 27 hdrs = [ 28 "public/pw_interrupt/context.h", 29 ], 30 backend = ":backend", 31 strip_include_prefix = "public", 32) 33 34label_flag( 35 name = "backend", 36 build_setting_default = ":backend_multiplexer", 37) 38 39alias( 40 name = "backend_multiplexer", 41 actual = select({ 42 "//pw_interrupt_cortex_m:backend": "//pw_interrupt_cortex_m:context", 43 "//pw_interrupt_xtensa:backend": "//pw_interrupt_xtensa:context", 44 "//conditions:default": "//pw_build:unspecified_backend", 45 }), 46 visibility = ["//targets:__pkg__"], 47) 48 49filegroup( 50 name = "doxygen", 51 srcs = [ 52 "public/pw_interrupt/context.h", 53 ], 54) 55