OSDN Git Service

Perfprofd: Fix binder interface
[android-x86/system-extras.git] / simpleperf / Android.bp
1 //
2 // Copyright (C) 2018 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: "simpleperf_defaults",
19
20     cflags: [
21         "-Wall",
22         "-Wextra",
23         "-Werror",
24
25         // Try some more extreme warnings.
26         "-Wpedantic",
27         "-Wunreachable-code-aggressive",
28         // And disable some dumb things.
29         "-Wno-zero-length-array",
30         "-Wno-c99-extensions",
31         "-Wno-language-extension-token",
32         "-Wno-gnu-zero-variadic-macro-arguments",
33         "-Wno-nested-anon-types",
34         "-Wno-gnu-statement-expression",
35         "-Wno-vla-extension",
36         "-Wno-extended-offsetof",
37     ],
38     cppflags: [
39         "-Wno-sign-compare",
40         "-Wno-unused-parameter",
41     ],
42 }
43
44 cc_library_static {
45     name: "libsimpleperf_elf_read",
46     defaults: [
47         "simpleperf_defaults",
48     ],
49     host_supported: true,
50
51     export_include_dirs: [
52         ".",
53     ],
54
55     // TODO: fix or workaround this.
56     cflags: [
57         "-DSIMPLEPERF_REVISION=\"dummy\"",
58     ],
59
60     static_libs: [
61         "libbase",
62     ],
63     // Use whole-static to avoid having to pull this in later.
64     whole_static_libs: [
65         "libLLVMObject",
66         "libLLVMBitReader",
67         "libLLVMMC",
68         "libLLVMMCParser",
69         "libLLVMCore",
70         "libLLVMSupport",
71         "liblog",
72         "liblzma",
73         "libz",
74         "libziparchive",
75     ],
76
77     target: {
78         // Required for LLVM.
79         linux_glibc: {
80             host_ldlibs: [
81                 "-lncurses",
82             ],
83         },
84     },
85
86     srcs: [
87         "read_apk.cpp",
88         "read_elf.cpp",
89         "utils.cpp",
90     ],
91
92     group_static_libs: true,
93 }