1 # Copyright 2020 The Pigweed Authors
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
7 # https://www.apache.org/licenses/LICENSE-2.0
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
16 "//pw_build:pigweed.bzl",
21 package(default_visibility = ["//visibility:public"])
23 licenses(["notice"]) # Apache License 2.0
25 # TODO(pwbug/101): Need to add support for facades/backends to Bazel.
26 PW_THREAD_ID_BACKEND = "//pw_thread_stl:id"
27 PW_THREAD_SLEEP_BACKEND = "//pw_thread_stl:sleep"
28 PW_THREAD_YIELD_BACKEND = "//pw_thread_stl:yield"
33 "public/pw_thread/id.h",
35 includes = ["public"],
37 PW_THREAD_ID_BACKEND + "_headers",
45 PW_THREAD_ID_BACKEND + "_headers",
57 name = "sleep_facade",
59 "public/pw_thread/sleep.h",
61 includes = ["public"],
66 PW_THREAD_SLEEP_BACKEND + "_headers",
67 "//pw_chrono:system_clock",
76 PW_THREAD_SLEEP_BACKEND + "_headers",
81 name = "sleep_backend",
83 PW_THREAD_SLEEP_BACKEND,
88 name = "yield_facade",
90 "public/pw_thread/yield.h",
92 includes = ["public"],
97 PW_THREAD_YIELD_BACKEND + "_headers",
106 PW_THREAD_YIELD_BACKEND + "_headers",
111 name = "yield_backend",
113 PW_THREAD_YIELD_BACKEND,
118 name = "id_facade_test",
129 name = "sleep_facade_test",
131 "sleep_facade_test.cc",
132 "sleep_facade_test_c.c",
136 "//pw_chrono:system_clock",
143 name = "yield_facade_test",
145 "yield_facade_test.cc",
146 "yield_facade_test_c.c",