Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / third_party / pigweed / repo / pw_polyfill / BUILD
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
15 load(
16     "//pw_build:pigweed.bzl",
17     "pw_cc_library",
18     "pw_cc_test",
19 )
20
21 package(default_visibility = ["//visibility:public"])
22
23 licenses(["notice"])  # Apache License 2.0
24
25 pw_cc_library(
26     name = "pw_polyfill",
27     hdrs = [
28         "public/pw_polyfill/language_feature_macros.h",
29         "public/pw_polyfill/standard.h",
30     ],
31     includes = ["public"],
32     deps = [":standard_library"],
33 )
34
35 pw_cc_library(
36     name = "overrides",
37     srcs = ["language_features.h"],
38     hdrs = [
39         "public_overrides/array",
40         "public_overrides/assert.h",
41         "public_overrides/bit",
42         "public_overrides/cstddef",
43         "public_overrides/iterator",
44         "public_overrides/type_traits",
45         "public_overrides/utility",
46     ],
47     copts = [
48         "-include",
49         "language_features.h",
50     ],
51     includes = ["public_overrides"],
52     deps = [":standard_library"],
53 )
54
55 pw_cc_library(
56     name = "standard_library",
57     hdrs = [
58         "standard_library_public/pw_polyfill/standard_library/array.h",
59         "standard_library_public/pw_polyfill/standard_library/assert.h",
60         "standard_library_public/pw_polyfill/standard_library/bit.h",
61         "standard_library_public/pw_polyfill/standard_library/cstddef.h",
62         "standard_library_public/pw_polyfill/standard_library/iterator.h",
63         "standard_library_public/pw_polyfill/standard_library/namespace.h",
64         "standard_library_public/pw_polyfill/standard_library/type_traits.h",
65         "standard_library_public/pw_polyfill/standard_library/utility.h",
66     ],
67     includes = ["standard_library_public"],
68     visibility = ["//visibility:private"],
69 )
70
71 pw_cc_test(
72     name = "default_cpp_test",
73     srcs = [
74         "test.cc",
75     ],
76     deps = [
77         ":pw_polyfill",
78         ":standard_library",
79         "//pw_unit_test",
80     ],
81 )