blob: 13c27cdff2e0b2acf3a642cd113be45cfe5bdf29 [file] [log] [blame]
Colin Cross1d3ac562016-12-07 14:21:42 -08001//
2// Copyright (C) 2011-2012 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
Bob Badour87353852021-02-12 17:59:41 -080017package {
18 // See: http://go/android-license-faq
19 // A large-scale-change added 'default_applicable_licenses' to import
20 // all of the 'license_kinds' from "frameworks_compile_libbcc_license"
21 // to get the below license kinds:
22 // SPDX-license-identifier-Apache-2.0
23 // SPDX-license-identifier-NCSA
24 default_applicable_licenses: ["frameworks_compile_libbcc_license"],
25}
26
Colin Cross1d3ac562016-12-07 14:21:42 -080027cc_library_shared {
28 name: "libbcinfo",
Jiyong Parkeea4e5f2017-08-10 20:19:27 +090029 vendor_available: true,
30 vndk: {
31 enabled: true,
32 support_system_process: true,
33 },
Colin Cross1d3ac562016-12-07 14:21:42 -080034 host_supported: true,
35 defaults: [
36 "llvm-defaults",
Colin Cross1d3ac562016-12-07 14:21:42 -080037 "rs-version",
38 ],
39
40 srcs: [
41 "BitcodeTranslator.cpp",
42 "BitcodeWrapper.cpp",
43 "MetadataExtractor.cpp",
44 ],
45
46 cflags: [
47 "-Wall",
48 "-Wno-unused-parameter",
49 "-Werror",
50
51 "-D__DISABLE_ASSERTS",
52 ],
53
54 product_variables: {
55 eng: {
56 cflags: ["-U__DISABLE_ASSERTS"],
57 },
58 },
59
Colin Crossd3a5bd02016-12-17 12:02:58 -080060 header_libs: ["libbcinfo-headers"],
61 export_header_lib_headers: ["libbcinfo-headers"],
62
Colin Cross1d3ac562016-12-07 14:21:42 -080063 include_dirs: [
Colin Cross1d3ac562016-12-07 14:21:42 -080064 "frameworks/rs",
65 "frameworks/compile/slang",
Miao Wang110b1c12017-03-03 12:20:24 -080066 "frameworks/compile/libbcc/lib",
Colin Cross1d3ac562016-12-07 14:21:42 -080067 ],
68
69 static_libs: [
70 "libLLVMWrap",
71 "libLLVMBitReader_2_7",
72 "libLLVMBitReader_3_0",
73 "libLLVMBitWriter_3_2",
David Grossbcb03e52017-05-11 13:57:07 -070074 "libStripUnkAttr",
Colin Cross1d3ac562016-12-07 14:21:42 -080075 ],
76
77 target: {
78 windows: {
79 enabled: true,
Pirama Arumuga Nainarfbc576f2017-08-03 11:40:21 -070080 shared_libs: ["libLLVM_android"],
Colin Cross1d3ac562016-12-07 14:21:42 -080081 },
82 darwin: {
Pirama Arumuga Nainarfbc576f2017-08-03 11:40:21 -070083 shared_libs: ["libLLVM_android"],
Colin Cross1d3ac562016-12-07 14:21:42 -080084 },
Colin Cross32910962022-03-08 18:24:37 -080085 host_linux: {
Colin Cross1d3ac562016-12-07 14:21:42 -080086 allow_undefined_symbols: true,
87 },
88 host: {
89 compile_multilib: "first",
90 static_libs: [
91 "libcutils",
92 "liblog",
93 ],
Colin Cross1d3ac562016-12-07 14:21:42 -080094 },
95 android: {
96 shared_libs: [
Colin Cross1d3ac562016-12-07 14:21:42 -080097 "liblog",
98 ],
99 static_libs: [
100 // Statically link-in the required LLVM libraries
101 "libLLVMBitReader",
102 "libLLVMCore",
103 "libLLVMSupport",
104 ],
105 // Export only the symbols in the bcinfo namespace. In particular,
106 // do not, export symbols from the LLVM libraries.
107 version_script: "libbcinfo.map",
108 },
109 },
110}
111
Colin Crossd3a5bd02016-12-17 12:02:58 -0800112cc_library_headers {
113 name: "libbcinfo-headers",
Jiyong Parkeea4e5f2017-08-10 20:19:27 +0900114 vendor_available: true,
Colin Crossd3a5bd02016-12-17 12:02:58 -0800115 host_supported: true,
Victor Khimenko6641bcf2020-07-02 01:19:43 +0200116 // TODO(b/153609531): remove when no longer needed.
117 native_bridge_supported: true,
Colin Crossd3a5bd02016-12-17 12:02:58 -0800118 export_include_dirs: ["include"],
119 target: {
120 windows: {
121 enabled: true,
122 },
123 },
124}
125
Colin Cross1d3ac562016-12-07 14:21:42 -0800126subdirs = [
127 "BitReader_2_7",
128 "BitReader_3_0",
129 "tools",
130 "Wrap",
131]