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