blob: 09e7d16c3daca1c1dade807ba363a08ae57e8562 [file] [log] [blame]
Matthias Maennicha1a321d2020-06-23 14:45:47 +02001// 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 Badoure06f2ca2021-03-19 04:33:24 -070015package {
16 default_applicable_licenses: ["external_libabigail_license"],
17}
18
Bob Badour4aca8312021-12-16 08:58:23 -080019// http://go/android-license-faq
Bob Badoure06f2ca2021-03-19 04:33:24 -070020license {
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 Badoure06f2ca2021-03-19 04:33:24 -070027 ],
28 license_text: [
Bob Badour4aca8312021-12-16 08:58:23 -080029 "LICENSE",
Bob Badoure06f2ca2021-03-19 04:33:24 -070030 ],
31}
32
Matthias Maennicha1a321d2020-06-23 14:45:47 +020033cc_defaults {
34 name: "libabigail_defaults",
35 cflags: [
36 "-DABIGAIL_ROOT_SYSTEM_LIBDIR=\"lib\"",
Dan Albert28ad60b2021-06-08 12:20:21 -070037 "-DUSE_ANDROID_BUILD_NUMBER",
Matthias Maennicha1a321d2020-06-23 14:45:47 +020038 "-fexceptions",
39 "-Wno-implicit-fallthrough",
40 ],
41
42 local_include_dirs: [
43 "src",
Matthias Maennicha1a321d2020-06-23 14:45:47 +020044 ],
45
46 static_libs: [
47 "libdw",
48 "libelf",
49 "libicuuc",
50 "libicuuc_stubdata",
51 "libxml2",
Dan Albert28ad60b2021-06-08 12:20:21 -070052 "libbuildversion",
Matthias Maennicha1a321d2020-06-23 14:45:47 +020053 "libz",
54 ],
55
Matthias Maennicha1a321d2020-06-23 14:45:47 +020056 visibility: [
Matthias Maennich42c7a4e2021-11-16 11:42:18 +000057 "//external/stg",
Matthias Maennicha1a321d2020-06-23 14:45:47 +020058 ],
Dan Alberta2825842021-01-12 13:55:35 -080059 compile_multilib: "64",
Dan Albert4d5ac232021-01-15 12:25:18 -080060 target: {
61 darwin: {
62 enabled: false,
63 },
Colin Cross2fb8ba42021-09-07 14:55:11 -070064 musl: {
65 static_libs: ["libfts"],
66 },
Dan Albert4d5ac232021-01-15 12:25:18 -080067 },
Matthias Maennicha1a321d2020-06-23 14:45:47 +020068}
69
70cc_library_host_static {
71 name: "libabigail",
72 defaults: ["libabigail_defaults"],
73 srcs: [
74 "src/*.cc",
75 ],
76 exclude_srcs: [
Giuliano Procida68579af2022-01-10 15:11:04 +000077 "src/abg-ctf-reader.cc",
Matthias Maennicha1a321d2020-06-23 14:45:47 +020078 "src/abg-viz-*",
79 ],
Matthias Maennich42c7a4e2021-11-16 11:42:18 +000080 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 ],
Matthias Maennicha1a321d2020-06-23 14:45:47 +020090}
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: [
Matthias Maennich03dcda42021-01-11 22:19:35 +0000107 "tools/abidw.cc",
Matthias Maennicha1a321d2020-06-23 14:45:47 +0200108 ],
109 static_libs: [
110 "libabigail",
111 ],
112}
113
Giuliano Procidae0a6d592021-04-16 17:36:12 +0100114cc_binary_host {
115 name: "abitidy",
116 defaults: ["libabigail_defaults"],
117 srcs: [
118 "tools/abitidy.cc",
119 ],
120 static_libs: [
121 "libabigail",
122 ],
123}