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 17package { 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 27cc_library_shared { 28 name: "libbcinfo", 29 vendor_available: true, 30 double_loadable: true, 31 host_supported: true, 32 defaults: [ 33 "llvm-defaults", 34 "rs-version", 35 ], 36 37 srcs: [ 38 "BitcodeTranslator.cpp", 39 "BitcodeWrapper.cpp", 40 "MetadataExtractor.cpp", 41 ], 42 43 cflags: [ 44 "-Wno-unused-parameter", 45 "-D__DISABLE_ASSERTS", 46 ], 47 48 product_variables: { 49 eng: { 50 cflags: ["-U__DISABLE_ASSERTS"], 51 }, 52 }, 53 54 header_libs: ["libbcinfo-headers"], 55 export_header_lib_headers: ["libbcinfo-headers"], 56 57 include_dirs: [ 58 "frameworks/rs", 59 "frameworks/compile/slang", 60 "frameworks/compile/libbcc/lib", 61 ], 62 63 static_libs: [ 64 "libLLVMWrap", 65 "libLLVMBitReader_2_7", 66 "libLLVMBitReader_3_0", 67 "libLLVMBitWriter_3_2", 68 "libStripUnkAttr", 69 ], 70 71 target: { 72 windows: { 73 enabled: true, 74 shared_libs: ["libLLVM_android"], 75 }, 76 darwin: { 77 shared_libs: ["libLLVM_android"], 78 }, 79 host_linux: { 80 allow_undefined_symbols: true, 81 }, 82 host: { 83 compile_multilib: "first", 84 static_libs: [ 85 "libcutils", 86 "liblog", 87 ], 88 }, 89 android: { 90 shared_libs: [ 91 "liblog", 92 ], 93 static_libs: [ 94 // Statically link-in the required LLVM libraries 95 "libLLVMBitReader", 96 "libLLVMCore", 97 "libLLVMSupport", 98 ], 99 // Export only the symbols in the bcinfo namespace. In particular, 100 // do not, export symbols from the LLVM libraries. 101 version_script: "libbcinfo.map", 102 }, 103 }, 104} 105 106cc_library_headers { 107 name: "libbcinfo-headers", 108 vendor_available: true, 109 host_supported: true, 110 // TODO(b/153609531): remove when no longer needed. 111 native_bridge_supported: true, 112 export_include_dirs: ["include"], 113 target: { 114 windows: { 115 enabled: true, 116 }, 117 }, 118} 119 120subdirs = [ 121 "BitReader_2_7", 122 "BitReader_3_0", 123 "tools", 124 "Wrap", 125] 126