Josh Gao | bf8a285 | 2016-05-27 11:59:09 -0700 | [diff] [blame] | 1 | /* |
Elliott Hughes | dfb74c5 | 2016-10-24 12:53:17 -0700 | [diff] [blame] | 2 | * Copyright (C) 2016 The Android Open Source Project |
Josh Gao | bf8a285 | 2016-05-27 11:59:09 -0700 | [diff] [blame] | 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
Elliott Hughes | dfb74c5 | 2016-10-24 12:53:17 -0700 | [diff] [blame] | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
Josh Gao | bf8a285 | 2016-05-27 11:59:09 -0700 | [diff] [blame] | 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #pragma once |
| 18 | |
| 19 | #include <map> |
| 20 | #include <set> |
| 21 | #include <string> |
| 22 | #include <unordered_map> |
Josh Gao | d8c7725 | 2016-06-03 13:54:28 -0700 | [diff] [blame] | 23 | #include <unordered_set> |
Josh Gao | bf8a285 | 2016-05-27 11:59:09 -0700 | [diff] [blame] | 24 | |
Josh Gao | acc3d80 | 2016-11-09 18:22:44 -0800 | [diff] [blame] | 25 | extern bool strict; |
Josh Gao | bf8a285 | 2016-05-27 11:59:09 -0700 | [diff] [blame] | 26 | extern bool verbose; |
Josh Gao | b5c4963 | 2016-11-08 22:21:31 -0800 | [diff] [blame] | 27 | extern bool add_include; |
Josh Gao | bf8a285 | 2016-05-27 11:59:09 -0700 | [diff] [blame] | 28 | |
Josh Gao | f8592a3 | 2016-07-26 18:58:27 -0700 | [diff] [blame] | 29 | #define D(...) \ |
| 30 | do { \ |
| 31 | if (verbose) { \ |
| 32 | printf(__VA_ARGS__); \ |
| 33 | } \ |
| 34 | } while (0) |
| 35 | |
Elliott Hughes | 8c936b4 | 2020-06-15 11:18:43 -0700 | [diff] [blame] | 36 | static const std::unordered_map<std::string, std::set<Arch>> ignored_headers = { |
Josh Gao | bf8a285 | 2016-05-27 11:59:09 -0700 | [diff] [blame] | 37 | // Internal header. |
Elliott Hughes | 8c936b4 | 2020-06-15 11:18:43 -0700 | [diff] [blame] | 38 | // TODO: we should probably just admit we're never getting rid of this. |
Josh Gao | bf8a285 | 2016-05-27 11:59:09 -0700 | [diff] [blame] | 39 | { "sys/_system_properties.h", supported_archs }, |
| 40 | |
| 41 | // time64.h #errors when included on LP64 archs. |
Elliott Hughes | d7f0844 | 2022-10-04 00:36:29 +0000 | [diff] [blame] | 42 | { "time64.h", { Arch::arm64, Arch::riscv64, Arch::x86_64 } }, |
Josh Gao | bf8a285 | 2016-05-27 11:59:09 -0700 | [diff] [blame] | 43 | }; |