• 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
17cc_library_shared {
18    name: "libbcinfo",
19    vendor_available: true,
20    vndk: {
21        enabled: true,
22        support_system_process: true,
23    },
24    host_supported: true,
25    defaults: [
26        "llvm-defaults",
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
50    header_libs: ["libbcinfo-headers"],
51    export_header_lib_headers: ["libbcinfo-headers"],
52
53    include_dirs: [
54        "frameworks/rs",
55        "frameworks/compile/slang",
56        "frameworks/compile/libbcc/lib",
57    ],
58
59    static_libs: [
60        "libLLVMWrap",
61        "libLLVMBitReader_2_7",
62        "libLLVMBitReader_3_0",
63        "libLLVMBitWriter_3_2",
64	"libStripUnkAttr",
65    ],
66
67    target: {
68        windows: {
69            enabled: true,
70            shared_libs: ["libLLVM_android"],
71        },
72        darwin: {
73            shared_libs: ["libLLVM_android"],
74        },
75        linux_glibc: {
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: [
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
108cc_library_headers {
109    name: "libbcinfo-headers",
110    vendor_available: true,
111    host_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