blob: 95635bb1afdc98db5b6337d6758eea1316f90dac [file] [log] [blame]
Josh Gaobf8a2852016-05-27 11:59:09 -07001/*
2 * Copyright 2016 The Android Open Source Project
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 *
8 * http://www.apache.org/licenses/LICENSE-2.0
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>
23
24extern bool verbose;
25
26static const std::set<std::string> supported_archs = {
27 "arm", "arm64", "mips", "mips64", "x86", "x86_64",
28};
29
30static std::unordered_map<std::string, std::string> arch_targets = {
31 { "arm", "arm-linux-androideabi" },
32 { "arm64", "aarch64-linux-android" },
33 { "mips", "mipsel-linux-android" },
34 { "mips64", "mips64el-linux-android" },
35 { "x86", "i686-linux-android" },
36 { "x86_64", "x86_64-linux-android" },
37};
38
39static const std::set<int> supported_levels = { 9, 12, 13, 14, 15, 16, 17, 18, 19, 21, 23, 24 };
40
41// Non-const for the convenience of being able to index with operator[].
42static std::map<std::string, int> arch_min_api = {
43 { "arm", 9 },
44 { "arm64", 21 },
45 { "mips", 9 },
46 { "mips64", 21 },
47 { "x86", 9 },
48 { "x86_64", 21 },
49};
50
51static const std::unordered_map<std::string, std::set<std::string>> header_blacklist = {
52 // Internal header.
53 { "sys/_system_properties.h", supported_archs },
54
55 // time64.h #errors when included on LP64 archs.
56 { "time64.h", { "arm64", "mips64", "x86_64" } },
57};