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 17 cc_defaults { 18 name: "header-checker-defaults", 19 20 defaults: [ 21 "clang-defaults", 22 ], 23 24 cflags: [ 25 "-Wall", 26 "-Werror", 27 "-DGOOGLE_PROTOBUF_NO_RTTI", 28 "-UNDEBUG" 29 ], 30 31 cppflags: [ 32 "-std=c++14", 33 ], 34 35 target: { 36 windows: { 37 enabled: false 38 } 39 } 40 } 41 42 cc_defaults { 43 name: "header-checker-lib-defaults", 44 45 static_libs: [ 46 "libclangToolingCore", 47 "libclangTooling", 48 "libclangFrontendTool", 49 "libclangFrontend", 50 "libclangDriver", 51 "libclangIndex", 52 "libclangSerialization", 53 "libclangCodeGen", 54 "libclangRewriteFrontend", 55 "libclangRewrite", 56 "libclangParse", 57 "libclangSema", 58 "libclangStaticAnalyzerFrontend", 59 "libclangStaticAnalyzerCheckers", 60 "libclangStaticAnalyzerMPIChecker", 61 "libclangStaticAnalyzerCore", 62 "libclangAnalysis", 63 "libclangEdit", 64 "libclangAST", 65 "libclangLex", 66 "libclangBasic", 67 "libLLVMIRReader", 68 "libLLVMAsmParser", 69 "libLLVMAsmPrinter", 70 "libLLVMBitReader", 71 "libLLVMBitWriter", 72 "libLLVMMC", 73 "libLLVMMCParser", 74 "libLLVMCore", 75 "libLLVMOption", 76 "libLLVMProfileData", 77 "libLLVMObject", 78 "libLLVMMCDisassembler", 79 "libLLVMSupport", 80 ], 81 82 shared_libs: [ 83 "libprotobuf-cpp-full", 84 ], 85 } 86 87 cc_defaults { 88 name: "header-abi-linker-lib-defaults", 89 90 static_libs: [ 91 "libheader-abi-util", 92 "libLLVMObject", 93 "libLLVMBitReader", 94 "libLLVMMC", 95 "libLLVMMCParser", 96 "libLLVMCore", 97 "libLLVMSupport", 98 ], 99 100 shared_libs: [ 101 "libprotobuf-cpp-full", 102 ], 103 } 104 105 cc_library_static { 106 name: "libheader-checker-proto", 107 host_supported: true, 108 export_include_dirs: ["."], 109 110 srcs: [ 111 "proto/abi_dump.proto", 112 "proto/abi_diff.proto", 113 ], 114 115 proto: { 116 export_proto_headers: true, 117 type: "full", 118 }, 119 120 cflags: [ 121 "-Wall", 122 "-Werror", 123 "-Wcast-qual", 124 "-Wno-long-long", 125 "-Wno-unused-parameter", 126 ], 127 } 128 129 cc_binary_host { 130 name: "header-abi-dumper", 131 132 defaults: [ 133 "header-checker-defaults", 134 "header-checker-lib-defaults", 135 ], 136 137 srcs: [ 138 "header-abi-dumper/src/*.cpp", 139 ], 140 141 static_libs: [ 142 "libheader-abi-util", 143 "libheader-checker-proto", 144 ], 145 } 146 147 cc_binary_host { 148 name: "header-abi-linker", 149 150 defaults: [ 151 "header-checker-defaults", 152 "header-abi-linker-lib-defaults", 153 ], 154 155 srcs: [ 156 "header-abi-linker/src/*.cpp", 157 ], 158 159 static_libs: [ 160 "libheader-checker-proto", 161 ], 162 } 163 164 cc_binary_host { 165 name: "header-abi-diff", 166 167 defaults: [ 168 "header-checker-defaults", 169 "header-abi-linker-lib-defaults", 170 ], 171 172 srcs: [ 173 "header-abi-diff/src/*.cpp", 174 ], 175 176 static_libs: [ 177 "libheader-checker-proto", 178 ], 179 } 180 181 cc_binary_host { 182 name: "merge-abi-diff", 183 184 defaults: [ 185 "header-checker-defaults", 186 "header-abi-linker-lib-defaults", 187 ], 188 189 srcs: [ 190 "merge-abi-diff/src/*.cpp", 191 ], 192 193 static_libs: [ 194 "libheader-checker-proto", 195 ], 196 } 197 198 cc_library_static { 199 name: "libheader-abi-util", 200 defaults: [ 201 "header-checker-defaults", 202 ], 203 host_supported: true, 204 export_include_dirs: ["header-abi-util/include"], 205 206 srcs: [ 207 "header-abi-util/src/*.cpp" 208 ], 209 static_libs: [ 210 "libLLVMObject", 211 "libLLVMBitReader", 212 "libLLVMMC", 213 "libLLVMMCParser", 214 "libLLVMCore", 215 "libLLVMSupport", 216 "libheader-checker-proto", 217 ], 218 219 shared_libs: [ 220 "libprotobuf-cpp-full", 221 ], 222 223 224 cflags: [ 225 "-Wcast-qual", 226 "-Wno-long-long", 227 "-Wno-unused-parameter", 228 ], 229 } 230