1// 2// Copyright (C) 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 17package { 18 default_team: "trendy_team_treble", 19 default_applicable_licenses: ["Android-Apache-2.0"], 20} 21 22cc_defaults { 23 name: "header-checker-defaults", 24 25 defaults: [ 26 "llvm-build-host-tools-defaults", 27 ], 28 29 cflags: [ 30 "-Wall", 31 "-Werror", 32 "-Wno-unused-parameter", 33 "-DGOOGLE_PROTOBUF_NO_RTTI", 34 "-UNDEBUG", 35 ], 36 37 cppflags: [ 38 "-fno-exceptions", 39 "-fno-rtti", 40 ], 41 42 target: { 43 windows: { 44 enabled: false, 45 }, 46 }, 47 48 local_include_dirs: [ 49 "src", 50 ], 51 52 compile_multilib: "64", 53} 54 55cc_binary_host { 56 name: "header-abi-dumper", 57 58 defaults: [ 59 "header-checker-defaults", 60 ], 61 62 srcs: [ 63 "src/dumper/abi_wrappers.cpp", 64 "src/dumper/ast_processing.cpp", 65 "src/dumper/fixed_argv.cpp", 66 "src/dumper/frontend_action.cpp", 67 "src/dumper/frontend_action_factory.cpp", 68 "src/dumper/header_checker.cpp", 69 ], 70 71 static_libs: [ 72 "libheader-checker", 73 "libheader-checker-proto", 74 "libjsoncpp", 75 ], 76 77 shared_libs: [ 78 "libprotobuf-cpp-full", 79 "libclang-cpp_host", 80 ], 81} 82 83cc_defaults { 84 name: "header-abi-linker-defaults", 85 86 defaults: ["header-checker-defaults"], 87 88 static_libs: [ 89 "libheader-checker", 90 "libheader-checker-proto", 91 "libjsoncpp", 92 ], 93 94 shared_libs: [ 95 "libprotobuf-cpp-full", 96 "libclang-cpp_host", 97 ], 98} 99 100cc_binary_host { 101 name: "header-abi-linker", 102 103 defaults: [ 104 "header-checker-defaults", 105 "header-abi-linker-defaults", 106 ], 107 108 srcs: [ 109 "src/linker/header_abi_linker.cpp", 110 "src/linker/module_merger.cpp", 111 ], 112} 113 114cc_binary_host { 115 name: "header-abi-diff", 116 117 defaults: [ 118 "header-checker-defaults", 119 "header-abi-linker-defaults", 120 ], 121 122 srcs: [ 123 "src/diff/abi_diff.cpp", 124 "src/diff/abi_diff_wrappers.cpp", 125 "src/diff/header_abi_diff.cpp", 126 ], 127 128 static_libs: [ 129 "libjsoncpp", 130 ], 131} 132 133cc_library_host_static { 134 name: "libheader-checker", 135 136 defaults: [ 137 "header-checker-defaults", 138 ], 139 140 srcs: [ 141 "src/repr/abi_diff_helpers.cpp", 142 "src/repr/ir_diff_dumper.cpp", 143 "src/repr/ir_dumper.cpp", 144 "src/repr/ir_reader.cpp", 145 "src/repr/ir_representation.cpp", 146 "src/repr/json/converter.cpp", 147 "src/repr/json/ir_dumper.cpp", 148 "src/repr/json/ir_reader.cpp", 149 "src/repr/protobuf/ir_diff_dumper.cpp", 150 "src/repr/protobuf/ir_dumper.cpp", 151 "src/repr/protobuf/ir_reader.cpp", 152 "src/repr/symbol/exported_symbol_set.cpp", 153 "src/repr/symbol/so_file_parser.cpp", 154 "src/repr/symbol/version_script_parser.cpp", 155 "src/utils/api_level.cpp", 156 "src/utils/command_line_utils.cpp", 157 "src/utils/config_file.cpp", 158 "src/utils/source_path_utils.cpp", 159 "src/utils/string_utils.cpp", 160 ], 161 162 static_libs: [ 163 "libbase", 164 "libheader-checker-proto", 165 "libjsoncpp", 166 ], 167 168 shared_libs: [ 169 "libclang-cpp_host", 170 "libprotobuf-cpp-full", 171 ], 172 173 cflags: [ 174 "-Wcast-qual", 175 "-Wno-long-long", 176 "-Wno-unused-parameter", 177 ], 178} 179 180cc_test_host { 181 name: "header-checker-unittests", 182 183 defaults: [ 184 "header-checker-defaults", 185 ], 186 187 srcs: [ 188 "src/repr/symbol/exported_symbol_set_test.cpp", 189 "src/repr/symbol/version_script_parser_test.cpp", 190 "src/utils/api_level_test.cpp", 191 "src/utils/config_file_test.cpp", 192 "src/utils/source_path_utils_test.cpp", 193 "src/utils/string_utils_test.cpp", 194 ], 195 196 static_libs: [ 197 "libbase", 198 "libgmock", 199 "libgtest", 200 "libgtest_main", 201 "libheader-checker", 202 "libjsoncpp", 203 "liblog", 204 ], 205 206 shared_libs: [ 207 "libclang-cpp_host", 208 ], 209 210 test_suites: ["general-tests"], 211} 212