Matthias Maennich | a1a321d | 2020-06-23 14:45:47 +0200 | [diff] [blame] | 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 | |
Bob Badour | e06f2ca | 2021-03-19 04:33:24 -0700 | [diff] [blame] | 15 | package { |
| 16 | default_applicable_licenses: ["external_libabigail_license"], |
| 17 | } |
| 18 | |
Bob Badour | 4aca831 | 2021-12-16 08:58:23 -0800 | [diff] [blame] | 19 | // http://go/android-license-faq |
Bob Badour | e06f2ca | 2021-03-19 04:33:24 -0700 | [diff] [blame] | 20 | license { |
| 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", |
Bob Badour | e06f2ca | 2021-03-19 04:33:24 -0700 | [diff] [blame] | 27 | ], |
| 28 | license_text: [ |
Bob Badour | 4aca831 | 2021-12-16 08:58:23 -0800 | [diff] [blame] | 29 | "LICENSE", |
Bob Badour | e06f2ca | 2021-03-19 04:33:24 -0700 | [diff] [blame] | 30 | ], |
| 31 | } |
| 32 | |
Matthias Maennich | a1a321d | 2020-06-23 14:45:47 +0200 | [diff] [blame] | 33 | cc_defaults { |
| 34 | name: "libabigail_defaults", |
| 35 | cflags: [ |
| 36 | "-DABIGAIL_ROOT_SYSTEM_LIBDIR=\"lib\"", |
Dan Albert | 28ad60b | 2021-06-08 12:20:21 -0700 | [diff] [blame] | 37 | "-DUSE_ANDROID_BUILD_NUMBER", |
Matthias Maennich | a1a321d | 2020-06-23 14:45:47 +0200 | [diff] [blame] | 38 | "-fexceptions", |
| 39 | "-Wno-implicit-fallthrough", |
| 40 | ], |
| 41 | |
| 42 | local_include_dirs: [ |
| 43 | "src", |
Matthias Maennich | a1a321d | 2020-06-23 14:45:47 +0200 | [diff] [blame] | 44 | ], |
| 45 | |
| 46 | static_libs: [ |
| 47 | "libdw", |
| 48 | "libelf", |
| 49 | "libicuuc", |
| 50 | "libicuuc_stubdata", |
| 51 | "libxml2", |
Dan Albert | 28ad60b | 2021-06-08 12:20:21 -0700 | [diff] [blame] | 52 | "libbuildversion", |
Matthias Maennich | a1a321d | 2020-06-23 14:45:47 +0200 | [diff] [blame] | 53 | "libz", |
| 54 | ], |
| 55 | |
Matthias Maennich | a1a321d | 2020-06-23 14:45:47 +0200 | [diff] [blame] | 56 | visibility: [ |
Matthias Maennich | 42c7a4e | 2021-11-16 11:42:18 +0000 | [diff] [blame] | 57 | "//external/stg", |
Matthias Maennich | a1a321d | 2020-06-23 14:45:47 +0200 | [diff] [blame] | 58 | ], |
Dan Albert | a282584 | 2021-01-12 13:55:35 -0800 | [diff] [blame] | 59 | compile_multilib: "64", |
Dan Albert | 4d5ac23 | 2021-01-15 12:25:18 -0800 | [diff] [blame] | 60 | target: { |
| 61 | darwin: { |
| 62 | enabled: false, |
| 63 | }, |
Colin Cross | 2fb8ba4 | 2021-09-07 14:55:11 -0700 | [diff] [blame] | 64 | musl: { |
| 65 | static_libs: ["libfts"], |
| 66 | }, |
Dan Albert | 4d5ac23 | 2021-01-15 12:25:18 -0800 | [diff] [blame] | 67 | }, |
Matthias Maennich | a1a321d | 2020-06-23 14:45:47 +0200 | [diff] [blame] | 68 | } |
| 69 | |
| 70 | cc_library_host_static { |
| 71 | name: "libabigail", |
| 72 | defaults: ["libabigail_defaults"], |
| 73 | srcs: [ |
| 74 | "src/*.cc", |
| 75 | ], |
| 76 | exclude_srcs: [ |
Giuliano Procida | 68579af | 2022-01-10 15:11:04 +0000 | [diff] [blame] | 77 | "src/abg-ctf-reader.cc", |
Matthias Maennich | a1a321d | 2020-06-23 14:45:47 +0200 | [diff] [blame] | 78 | "src/abg-viz-*", |
| 79 | ], |
Matthias Maennich | 42c7a4e | 2021-11-16 11:42:18 +0000 | [diff] [blame] | 80 | export_include_dirs: ["include"], |
| 81 | } |
| 82 | |
| 83 | cc_library_headers { |
| 84 | name: "libabigail_src_headers", |
| 85 | host_supported: true, |
| 86 | visibility: ["//external/stg"], |
| 87 | export_include_dirs: [ |
| 88 | "src", |
| 89 | ], |
Matthias Maennich | a1a321d | 2020-06-23 14:45:47 +0200 | [diff] [blame] | 90 | } |
| 91 | |
| 92 | cc_binary_host { |
| 93 | name: "abidiff", |
| 94 | defaults: ["libabigail_defaults"], |
| 95 | srcs: [ |
| 96 | "tools/abidiff.cc", |
| 97 | ], |
| 98 | static_libs: [ |
| 99 | "libabigail", |
| 100 | ], |
| 101 | } |
| 102 | |
| 103 | cc_binary_host { |
| 104 | name: "abidw", |
| 105 | defaults: ["libabigail_defaults"], |
| 106 | srcs: [ |
Matthias Maennich | 03dcda4 | 2021-01-11 22:19:35 +0000 | [diff] [blame] | 107 | "tools/abidw.cc", |
Matthias Maennich | a1a321d | 2020-06-23 14:45:47 +0200 | [diff] [blame] | 108 | ], |
| 109 | static_libs: [ |
| 110 | "libabigail", |
| 111 | ], |
| 112 | } |
| 113 | |
Giuliano Procida | e0a6d59 | 2021-04-16 17:36:12 +0100 | [diff] [blame] | 114 | cc_binary_host { |
| 115 | name: "abitidy", |
| 116 | defaults: ["libabigail_defaults"], |
| 117 | srcs: [ |
| 118 | "tools/abitidy.cc", |
| 119 | ], |
| 120 | static_libs: [ |
| 121 | "libabigail", |
| 122 | ], |
| 123 | } |