blob: 27a10b3814e0bf1a648e754d91aa6f00e97a61ca [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
17cc_library_shared {
18 name: "libbcinfo",
Jiyong Parkeea4e5f2017-08-10 20:19:27 +090019 vendor_available: true,
20 vndk: {
21 enabled: true,
22 support_system_process: true,
23 },
Colin Cross1d3ac562016-12-07 14:21:42 -080024 host_supported: true,
25 defaults: [
26 "llvm-defaults",
Colin Cross1d3ac562016-12-07 14:21:42 -080027 "rs-version",
28 ],
29
30 srcs: [
31 "BitcodeTranslator.cpp",
32 "BitcodeWrapper.cpp",
33 "MetadataExtractor.cpp",
34 ],
35
36 cflags: [
37 "-Wall",
38 "-Wno-unused-parameter",
39 "-Werror",
40
41 "-D__DISABLE_ASSERTS",
42 ],
43
44 product_variables: {
45 eng: {
46 cflags: ["-U__DISABLE_ASSERTS"],
47 },
48 },
49
Colin Crossd3a5bd02016-12-17 12:02:58 -080050 header_libs: ["libbcinfo-headers"],
51 export_header_lib_headers: ["libbcinfo-headers"],
52
Colin Cross1d3ac562016-12-07 14:21:42 -080053 include_dirs: [
Colin Cross1d3ac562016-12-07 14:21:42 -080054 "frameworks/rs",
55 "frameworks/compile/slang",
Miao Wang110b1c12017-03-03 12:20:24 -080056 "frameworks/compile/libbcc/lib",
Colin Cross1d3ac562016-12-07 14:21:42 -080057 ],
58
59 static_libs: [
60 "libLLVMWrap",
61 "libLLVMBitReader_2_7",
62 "libLLVMBitReader_3_0",
63 "libLLVMBitWriter_3_2",
David Grossbcb03e52017-05-11 13:57:07 -070064 "libStripUnkAttr",
Colin Cross1d3ac562016-12-07 14:21:42 -080065 ],
66
67 target: {
68 windows: {
69 enabled: true,
Pirama Arumuga Nainarfbc576f2017-08-03 11:40:21 -070070 shared_libs: ["libLLVM_android"],
Colin Cross1d3ac562016-12-07 14:21:42 -080071 },
72 darwin: {
Pirama Arumuga Nainarfbc576f2017-08-03 11:40:21 -070073 shared_libs: ["libLLVM_android"],
Colin Cross1d3ac562016-12-07 14:21:42 -080074 },
Dan Willemsen06a22ed2017-10-02 10:41:10 -070075 linux_glibc: {
Colin Cross1d3ac562016-12-07 14:21:42 -080076 allow_undefined_symbols: true,
77 },
78 host: {
79 compile_multilib: "first",
80 static_libs: [
81 "libcutils",
82 "liblog",
83 ],
84 product_variables: {
85 unbundled_build: {
86 // don't build for unbundled branches
87 enabled: false,
88 },
89 },
90 },
91 android: {
92 shared_libs: [
Colin Cross1d3ac562016-12-07 14:21:42 -080093 "liblog",
94 ],
95 static_libs: [
96 // Statically link-in the required LLVM libraries
97 "libLLVMBitReader",
98 "libLLVMCore",
99 "libLLVMSupport",
100 ],
101 // Export only the symbols in the bcinfo namespace. In particular,
102 // do not, export symbols from the LLVM libraries.
103 version_script: "libbcinfo.map",
104 },
105 },
106}
107
Colin Crossd3a5bd02016-12-17 12:02:58 -0800108cc_library_headers {
109 name: "libbcinfo-headers",
Jiyong Parkeea4e5f2017-08-10 20:19:27 +0900110 vendor_available: true,
Colin Crossd3a5bd02016-12-17 12:02:58 -0800111 host_supported: true,
Victor Khimenkoa9ef3592020-07-02 01:19:43 +0200112 // TODO(b/153609531): remove when no longer needed.
113 native_bridge_supported: true,
Colin Crossd3a5bd02016-12-17 12:02:58 -0800114 export_include_dirs: ["include"],
115 target: {
116 windows: {
117 enabled: true,
118 },
119 },
120}
121
Colin Cross1d3ac562016-12-07 14:21:42 -0800122subdirs = [
123 "BitReader_2_7",
124 "BitReader_3_0",
125 "tools",
126 "Wrap",
127]