1// Copyright (C) 2020 The Android Open Source Project 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://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, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15package { 16 default_applicable_licenses: ["external_libabigail_license"], 17} 18 19// http://go/android-license-faq 20license { 21 name: "external_libabigail_license", 22 visibility: [":__subpackages__"], 23 license_kinds: [ 24 "SPDX-license-identifier-Apache-2.0", 25 "SPDX-license-identifier-BSL-1.0", 26 "SPDX-license-identifier-MIT", 27 ], 28 license_text: [ 29 "LICENSE", 30 ], 31} 32 33cc_defaults { 34 name: "libabigail_defaults", 35 cflags: [ 36 "-DABIGAIL_ROOT_SYSTEM_LIBDIR=\"lib\"", 37 "-DUSE_ANDROID_BUILD_NUMBER", 38 "-fexceptions", 39 "-Wno-implicit-fallthrough", 40 ], 41 42 local_include_dirs: [ 43 "src", 44 ], 45 46 static_libs: [ 47 "libdw", 48 "libelf", 49 "libicuuc", 50 "libicuuc_stubdata", 51 "libxml2", 52 "libbuildversion", 53 "libz", 54 ], 55 56 visibility: [ 57 "//external/stg", 58 ], 59 compile_multilib: "64", 60 target: { 61 darwin: { 62 enabled: false, 63 }, 64 musl: { 65 static_libs: ["libfts"], 66 }, 67 }, 68} 69 70cc_library_host_static { 71 name: "libabigail", 72 defaults: ["libabigail_defaults"], 73 srcs: [ 74 "src/*.cc", 75 ], 76 exclude_srcs: [ 77 "src/abg-ctf-reader.cc", 78 "src/abg-viz-*", 79 ], 80 export_include_dirs: ["include"], 81} 82 83cc_library_headers { 84 name: "libabigail_src_headers", 85 host_supported: true, 86 visibility: ["//external/stg"], 87 export_include_dirs: [ 88 "src", 89 ], 90} 91 92cc_binary_host { 93 name: "abidiff", 94 defaults: ["libabigail_defaults"], 95 srcs: [ 96 "tools/abidiff.cc", 97 ], 98 static_libs: [ 99 "libabigail", 100 ], 101} 102 103cc_binary_host { 104 name: "abidw", 105 defaults: ["libabigail_defaults"], 106 srcs: [ 107 "tools/abidw.cc", 108 ], 109 static_libs: [ 110 "libabigail", 111 ], 112} 113 114cc_binary_host { 115 name: "abitidy", 116 defaults: ["libabigail_defaults"], 117 srcs: [ 118 "tools/abitidy.cc", 119 ], 120 static_libs: [ 121 "libabigail", 122 ], 123} 124