Wyatt Hepler | c542a5d | 2020-01-15 15:43:10 -0800 | [diff] [blame] | 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_features.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 | hdrs = [ |
Wyatt Hepler | ac6cdf2 | 2020-01-24 13:35:09 -0800 | [diff] [blame] | 38 | "public_overrides/assert.h", |
Wyatt Hepler | c542a5d | 2020-01-15 15:43:10 -0800 | [diff] [blame] | 39 | "public_overrides/cstddef", |
| 40 | "public_overrides/iterator", |
| 41 | "public_overrides/type_traits", |
| 42 | ], |
| 43 | includes = ["public_overrides"], |
| 44 | deps = [":standard_library"], |
| 45 | ) |
| 46 | |
| 47 | pw_cc_library( |
| 48 | name = "standard_library", |
| 49 | hdrs = [ |
Wyatt Hepler | ac6cdf2 | 2020-01-24 13:35:09 -0800 | [diff] [blame] | 50 | "standard_library_public/pw_polyfill/standard_library/assert.h", |
Wyatt Hepler | c542a5d | 2020-01-15 15:43:10 -0800 | [diff] [blame] | 51 | "standard_library_public/pw_polyfill/standard_library/cstddef.h", |
| 52 | "standard_library_public/pw_polyfill/standard_library/iterator.h", |
Wyatt Hepler | 023f35b | 2020-07-01 09:40:50 -0700 | [diff] [blame] | 53 | "standard_library_public/pw_polyfill/standard_library/namespace.h", |
Wyatt Hepler | c542a5d | 2020-01-15 15:43:10 -0800 | [diff] [blame] | 54 | "standard_library_public/pw_polyfill/standard_library/type_traits.h", |
| 55 | ], |
| 56 | includes = ["standard_library_public"], |
| 57 | visibility = ["//visibility:private"], |
| 58 | ) |
| 59 | |
| 60 | pw_cc_test( |
| 61 | name = "default_cpp_test", |
| 62 | srcs = [ |
| 63 | "test.cc", |
| 64 | ], |
| 65 | deps = [ |
| 66 | ":pw_polyfill", |
Rob Mohr | c8b5552 | 2020-04-07 07:27:31 -0700 | [diff] [blame] | 67 | ":standard_library", |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 68 | "//pw_unit_test", |
Wyatt Hepler | c542a5d | 2020-01-15 15:43:10 -0800 | [diff] [blame] | 69 | ], |
| 70 | ) |