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 | |
| 17 | cc_library_shared { |
| 18 | name: "libbcinfo", |
Jiyong Park | eea4e5f | 2017-08-10 20:19:27 +0900 | [diff] [blame] | 19 | vendor_available: true, |
| 20 | vndk: { |
| 21 | enabled: true, |
| 22 | support_system_process: true, |
| 23 | }, |
Colin Cross | 1d3ac56 | 2016-12-07 14:21:42 -0800 | [diff] [blame] | 24 | host_supported: true, |
| 25 | defaults: [ |
| 26 | "llvm-defaults", |
Colin Cross | 1d3ac56 | 2016-12-07 14:21:42 -0800 | [diff] [blame] | 27 | "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 Cross | d3a5bd0 | 2016-12-17 12:02:58 -0800 | [diff] [blame] | 50 | header_libs: ["libbcinfo-headers"], |
| 51 | export_header_lib_headers: ["libbcinfo-headers"], |
| 52 | |
Colin Cross | 1d3ac56 | 2016-12-07 14:21:42 -0800 | [diff] [blame] | 53 | include_dirs: [ |
Colin Cross | 1d3ac56 | 2016-12-07 14:21:42 -0800 | [diff] [blame] | 54 | "frameworks/rs", |
| 55 | "frameworks/compile/slang", |
Miao Wang | 110b1c1 | 2017-03-03 12:20:24 -0800 | [diff] [blame] | 56 | "frameworks/compile/libbcc/lib", |
Colin Cross | 1d3ac56 | 2016-12-07 14:21:42 -0800 | [diff] [blame] | 57 | ], |
| 58 | |
| 59 | static_libs: [ |
| 60 | "libLLVMWrap", |
| 61 | "libLLVMBitReader_2_7", |
| 62 | "libLLVMBitReader_3_0", |
| 63 | "libLLVMBitWriter_3_2", |
David Gross | bcb03e5 | 2017-05-11 13:57:07 -0700 | [diff] [blame] | 64 | "libStripUnkAttr", |
Colin Cross | 1d3ac56 | 2016-12-07 14:21:42 -0800 | [diff] [blame] | 65 | ], |
| 66 | |
| 67 | target: { |
| 68 | windows: { |
| 69 | enabled: true, |
Pirama Arumuga Nainar | fbc576f | 2017-08-03 11:40:21 -0700 | [diff] [blame] | 70 | shared_libs: ["libLLVM_android"], |
Colin Cross | 1d3ac56 | 2016-12-07 14:21:42 -0800 | [diff] [blame] | 71 | }, |
| 72 | darwin: { |
Pirama Arumuga Nainar | fbc576f | 2017-08-03 11:40:21 -0700 | [diff] [blame] | 73 | shared_libs: ["libLLVM_android"], |
Colin Cross | 1d3ac56 | 2016-12-07 14:21:42 -0800 | [diff] [blame] | 74 | }, |
Dan Willemsen | 06a22ed | 2017-10-02 10:41:10 -0700 | [diff] [blame] | 75 | linux_glibc: { |
Colin Cross | 1d3ac56 | 2016-12-07 14:21:42 -0800 | [diff] [blame] | 76 | 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 Cross | 1d3ac56 | 2016-12-07 14:21:42 -0800 | [diff] [blame] | 93 | "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 Cross | d3a5bd0 | 2016-12-17 12:02:58 -0800 | [diff] [blame] | 108 | cc_library_headers { |
| 109 | name: "libbcinfo-headers", |
Jiyong Park | eea4e5f | 2017-08-10 20:19:27 +0900 | [diff] [blame] | 110 | vendor_available: true, |
Colin Cross | d3a5bd0 | 2016-12-17 12:02:58 -0800 | [diff] [blame] | 111 | host_supported: true, |
| 112 | export_include_dirs: ["include"], |
| 113 | target: { |
| 114 | windows: { |
| 115 | enabled: true, |
| 116 | }, |
| 117 | }, |
| 118 | } |
| 119 | |
Colin Cross | 1d3ac56 | 2016-12-07 14:21:42 -0800 | [diff] [blame] | 120 | subdirs = [ |
| 121 | "BitReader_2_7", |
| 122 | "BitReader_3_0", |
| 123 | "tools", |
| 124 | "Wrap", |
| 125 | ] |