• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2022 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(
16    "//pw_build:pigweed.bzl",
17    "pw_cc_test",
18)
19
20package(default_visibility = ["//visibility:public"])
21
22licenses(["notice"])
23
24cc_library(
25    name = "no_destructor",
26    hdrs = ["public/pw_toolchain/no_destructor.h"],
27    includes = ["public"],
28)
29
30pw_cc_test(
31    name = "no_destructor_test",
32    srcs = ["no_destructor_test.cc"],
33    deps = [
34        ":no_destructor",
35        "//pw_unit_test",
36    ],
37)
38
39cc_library(
40    name = "sibling_cast",
41    hdrs = ["public/pw_toolchain/internal/sibling_cast.h"],
42    includes = ["public"],
43    visibility = ["//:__subpackages__"],  # Restrict to Pigweed
44    deps = ["//pw_compilation_testing:negative_compilation_testing"],
45)
46
47pw_cc_test(
48    name = "sibling_cast_test",
49    srcs = ["sibling_cast_test.cc"],
50    deps = [
51        ":sibling_cast",
52        "//pw_unit_test",
53    ],
54)
55
56cc_library(
57    name = "wrap_abort",
58    srcs = ["wrap_abort.cc"],
59    linkopts = ["-Wl,--wrap=abort"],
60    deps = ["//pw_assert"],
61    alwayslink = 1,
62)
63