Colin Cross | 1d3ac56 | 2016-12-07 14:21:42 -0800 | [diff] [blame] | 1 | // |
| 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 Badour | 8735385 | 2021-02-12 17:59:41 -0800 | [diff] [blame] | 17 | package { |
| 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 Cross | 1d3ac56 | 2016-12-07 14:21:42 -0800 | [diff] [blame] | 27 | cc_library_shared { |
| 28 | name: "libbcinfo", |
Jiyong Park | eea4e5f | 2017-08-10 20:19:27 +0900 | [diff] [blame] | 29 | vendor_available: true, |
| 30 | vndk: { |
| 31 | enabled: true, |
| 32 | support_system_process: true, |
| 33 | }, |
Colin Cross | 1d3ac56 | 2016-12-07 14:21:42 -0800 | [diff] [blame] | 34 | host_supported: true, |
| 35 | defaults: [ |
| 36 | "llvm-defaults", |
Colin Cross | 1d3ac56 | 2016-12-07 14:21:42 -0800 | [diff] [blame] | 37 | "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 Cross | d3a5bd0 | 2016-12-17 12:02:58 -0800 | [diff] [blame] | 60 | header_libs: ["libbcinfo-headers"], |
| 61 | export_header_lib_headers: ["libbcinfo-headers"], |
| 62 | |
Colin Cross | 1d3ac56 | 2016-12-07 14:21:42 -0800 | [diff] [blame] | 63 | include_dirs: [ |
Colin Cross | 1d3ac56 | 2016-12-07 14:21:42 -0800 | [diff] [blame] | 64 | "frameworks/rs", |
| 65 | "frameworks/compile/slang", |
Miao Wang | 110b1c1 | 2017-03-03 12:20:24 -0800 | [diff] [blame] | 66 | "frameworks/compile/libbcc/lib", |
Colin Cross | 1d3ac56 | 2016-12-07 14:21:42 -0800 | [diff] [blame] | 67 | ], |
| 68 | |
| 69 | static_libs: [ |
| 70 | "libLLVMWrap", |
| 71 | "libLLVMBitReader_2_7", |
| 72 | "libLLVMBitReader_3_0", |
| 73 | "libLLVMBitWriter_3_2", |
David Gross | bcb03e5 | 2017-05-11 13:57:07 -0700 | [diff] [blame] | 74 | "libStripUnkAttr", |
Colin Cross | 1d3ac56 | 2016-12-07 14:21:42 -0800 | [diff] [blame] | 75 | ], |
| 76 | |
| 77 | target: { |
| 78 | windows: { |
| 79 | enabled: true, |
Pirama Arumuga Nainar | fbc576f | 2017-08-03 11:40:21 -0700 | [diff] [blame] | 80 | shared_libs: ["libLLVM_android"], |
Colin Cross | 1d3ac56 | 2016-12-07 14:21:42 -0800 | [diff] [blame] | 81 | }, |
| 82 | darwin: { |
Pirama Arumuga Nainar | fbc576f | 2017-08-03 11:40:21 -0700 | [diff] [blame] | 83 | shared_libs: ["libLLVM_android"], |
Colin Cross | 1d3ac56 | 2016-12-07 14:21:42 -0800 | [diff] [blame] | 84 | }, |
Colin Cross | 3291096 | 2022-03-08 18:24:37 -0800 | [diff] [blame] | 85 | host_linux: { |
Colin Cross | 1d3ac56 | 2016-12-07 14:21:42 -0800 | [diff] [blame] | 86 | allow_undefined_symbols: true, |
| 87 | }, |
| 88 | host: { |
| 89 | compile_multilib: "first", |
| 90 | static_libs: [ |
| 91 | "libcutils", |
| 92 | "liblog", |
| 93 | ], |
Colin Cross | 1d3ac56 | 2016-12-07 14:21:42 -0800 | [diff] [blame] | 94 | }, |
| 95 | android: { |
| 96 | shared_libs: [ |
Colin Cross | 1d3ac56 | 2016-12-07 14:21:42 -0800 | [diff] [blame] | 97 | "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 Cross | d3a5bd0 | 2016-12-17 12:02:58 -0800 | [diff] [blame] | 112 | cc_library_headers { |
| 113 | name: "libbcinfo-headers", |
Jiyong Park | eea4e5f | 2017-08-10 20:19:27 +0900 | [diff] [blame] | 114 | vendor_available: true, |
Colin Cross | d3a5bd0 | 2016-12-17 12:02:58 -0800 | [diff] [blame] | 115 | host_supported: true, |
Victor Khimenko | 6641bcf | 2020-07-02 01:19:43 +0200 | [diff] [blame] | 116 | // TODO(b/153609531): remove when no longer needed. |
| 117 | native_bridge_supported: true, |
Colin Cross | d3a5bd0 | 2016-12-17 12:02:58 -0800 | [diff] [blame] | 118 | export_include_dirs: ["include"], |
| 119 | target: { |
| 120 | windows: { |
| 121 | enabled: true, |
| 122 | }, |
| 123 | }, |
| 124 | } |
| 125 | |
Colin Cross | 1d3ac56 | 2016-12-07 14:21:42 -0800 | [diff] [blame] | 126 | subdirs = [ |
| 127 | "BitReader_2_7", |
| 128 | "BitReader_3_0", |
| 129 | "tools", |
| 130 | "Wrap", |
| 131 | ] |