aboutsummaryrefslogtreecommitdiff
path: root/Android.bp
blob: 1d0a4e32355e2151ca5a56fab98aeaa046a36069 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
// Copyright 2021 Google LLC
//
// Licensed under the Apache License v2.0 with LLVM Exceptions (the
// "License"); you may not use this file except in compliance with the
// License.  You may obtain a copy of the License at
//
//     https://llvm.org/LICENSE.txt
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Author: Giuliano Procida

package {
    default_applicable_licenses: ["llvm_license"],
}

// http://go/android-license-faq
license {
    name: "llvm_license",
    visibility: [":__subpackages__"],
    license_kinds: [
        "SPDX-license-identifier-Apache-2.0",
    ],
    license_text: [
        "LICENSE",
    ],
}

cc_defaults {
    name: "defaults",
    defaults: ["elfutils_transitive_defaults"],
    visibility: [
        "//visibility:private",
    ],
    cpp_std: "c++20",
    cflags: [
        "-DUSE_ANDROID_BUILD_NUMBER",
        "-fexceptions",
        "-Wno-error=unused-parameter",
    ],
    static_libs: [
        "libbpf",
        "libbuildversion",
        "libdw",
        "libelf",
        "libicuuc",
        "libicuuc_stubdata",
        "libjemalloc5",
        "libprotobuf-cpp-full",
        "libxml2",
    ],
    compile_multilib: "64",
    target: {
        darwin: {
            enabled: false,
        },
    },
    // TODO(b/324274771): figure out a better solution
    native_coverage: false,
}

cc_library_host_static {
    name: "libstg",
    defaults: ["defaults"],
    srcs: [
        "abigail_reader.cc",
        "btf_reader.cc",
        "comparison.cc",
        "deduplication.cc",
        "dwarf_processor.cc",
        "dwarf_wrappers.cc",
        "elf_loader.cc",
        "elf_reader.cc",
        "fidelity.cc",
        "file_descriptor.cc",
        "filter.cc",
        "fingerprint.cc",
        "graph.cc",
        "input.cc",
        "naming.cc",
        "post_processing.cc",
        "proto_reader.cc",
        "proto_writer.cc",
        "reporting.cc",
        "runtime.cc",
        "stable_hash.cc",
        "stg.proto",
        "type_normalisation.cc",
        "type_resolution.cc",
        "unification.cc",
    ],
    proto: {
        export_proto_headers: true,
    },

}

cc_binary_host {
    name: "stg",
    defaults: ["defaults"],
    srcs: [
        "stg.cc",
    ],
    static_libs: ["libstg"],
}

cc_binary_host {
    name: "stgdiff",
    defaults: ["defaults"],
    srcs: [
        "stgdiff.cc",
    ],
    static_libs: ["libstg"],
}