xref: /aosp_15_r20/external/swiftshader/third_party/llvm-subzero/Android.bp (revision 03ce13f70fcc45d86ee91b7ee4cab1936a95046e)
1*03ce13f7SAndroid Build Coastguard Worker//
2*03ce13f7SAndroid Build Coastguard Worker// Copyright (C) 2018 The Android Open Source Project
3*03ce13f7SAndroid Build Coastguard Worker//
4*03ce13f7SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License");
5*03ce13f7SAndroid Build Coastguard Worker// you may not use this file except in compliance with the License.
6*03ce13f7SAndroid Build Coastguard Worker// You may obtain a copy of the License at
7*03ce13f7SAndroid Build Coastguard Worker//
8*03ce13f7SAndroid Build Coastguard Worker//      http://www.apache.org/licenses/LICENSE-2.0
9*03ce13f7SAndroid Build Coastguard Worker//
10*03ce13f7SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software
11*03ce13f7SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS,
12*03ce13f7SAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13*03ce13f7SAndroid Build Coastguard Worker// See the License for the specific language governing permissions and
14*03ce13f7SAndroid Build Coastguard Worker// limitations under the License.
15*03ce13f7SAndroid Build Coastguard Worker//
16*03ce13f7SAndroid Build Coastguard Worker
17*03ce13f7SAndroid Build Coastguard Workerpackage {
18*03ce13f7SAndroid Build Coastguard Worker    default_applicable_licenses: [
19*03ce13f7SAndroid Build Coastguard Worker        "external_swiftshader_third_party_llvm-subzero_license",
20*03ce13f7SAndroid Build Coastguard Worker    ],
21*03ce13f7SAndroid Build Coastguard Worker}
22*03ce13f7SAndroid Build Coastguard Worker
23*03ce13f7SAndroid Build Coastguard Worker// Added automatically by a large-scale-change that took the approach of
24*03ce13f7SAndroid Build Coastguard Worker// 'apply every license found to every target'. While this makes sure we respect
25*03ce13f7SAndroid Build Coastguard Worker// every license restriction, it may not be entirely correct.
26*03ce13f7SAndroid Build Coastguard Worker//
27*03ce13f7SAndroid Build Coastguard Worker// e.g. GPL in an MIT project might only apply to the contrib/ directory.
28*03ce13f7SAndroid Build Coastguard Worker//
29*03ce13f7SAndroid Build Coastguard Worker// Please consider splitting the single license below into multiple licenses,
30*03ce13f7SAndroid Build Coastguard Worker// taking care not to lose any license_kind information, and overriding the
31*03ce13f7SAndroid Build Coastguard Worker// default license using the 'licenses: [...]' property on targets as needed.
32*03ce13f7SAndroid Build Coastguard Worker//
33*03ce13f7SAndroid Build Coastguard Worker// For unused files, consider creating a 'filegroup' with "//visibility:private"
34*03ce13f7SAndroid Build Coastguard Worker// to attach the license to, and including a comment whether the files may be
35*03ce13f7SAndroid Build Coastguard Worker// used in the current project.
36*03ce13f7SAndroid Build Coastguard Worker// http://go/android-license-faq
37*03ce13f7SAndroid Build Coastguard Workerlicense {
38*03ce13f7SAndroid Build Coastguard Worker    name: "external_swiftshader_third_party_llvm-subzero_license",
39*03ce13f7SAndroid Build Coastguard Worker    visibility: [":__subpackages__"],
40*03ce13f7SAndroid Build Coastguard Worker    license_kinds: [
41*03ce13f7SAndroid Build Coastguard Worker        "SPDX-license-identifier-Apache-2.0",
42*03ce13f7SAndroid Build Coastguard Worker        "SPDX-license-identifier-BSD",
43*03ce13f7SAndroid Build Coastguard Worker        "SPDX-license-identifier-MIT",
44*03ce13f7SAndroid Build Coastguard Worker        "SPDX-license-identifier-NCSA",
45*03ce13f7SAndroid Build Coastguard Worker        "legacy_unencumbered",
46*03ce13f7SAndroid Build Coastguard Worker    ],
47*03ce13f7SAndroid Build Coastguard Worker    license_text: [
48*03ce13f7SAndroid Build Coastguard Worker        "LICENSE.TXT",
49*03ce13f7SAndroid Build Coastguard Worker    ],
50*03ce13f7SAndroid Build Coastguard Worker}
51*03ce13f7SAndroid Build Coastguard Worker
52*03ce13f7SAndroid Build Coastguard Workercc_library_static {
53*03ce13f7SAndroid Build Coastguard Worker    name: "libLLVMSupport_subzero",
54*03ce13f7SAndroid Build Coastguard Worker
55*03ce13f7SAndroid Build Coastguard Worker    defaults: [ "swiftshader_common_release" ],
56*03ce13f7SAndroid Build Coastguard Worker
57*03ce13f7SAndroid Build Coastguard Worker    device_supported: false,
58*03ce13f7SAndroid Build Coastguard Worker    host_supported: true,
59*03ce13f7SAndroid Build Coastguard Worker
60*03ce13f7SAndroid Build Coastguard Worker    cflags: [
61*03ce13f7SAndroid Build Coastguard Worker        "-D_GNU_SOURCE",
62*03ce13f7SAndroid Build Coastguard Worker        "-D__STDC_LIMIT_MACROS",
63*03ce13f7SAndroid Build Coastguard Worker        "-D__STDC_CONSTANT_MACROS",
64*03ce13f7SAndroid Build Coastguard Worker        "-D__STDC_FORMAT_MACROS",
65*03ce13f7SAndroid Build Coastguard Worker        "-DLOG_TAG=\"libsubzero\"",
66*03ce13f7SAndroid Build Coastguard Worker        "-Wno-implicit-fallthrough",
67*03ce13f7SAndroid Build Coastguard Worker        "-Wno-unused-parameter",
68*03ce13f7SAndroid Build Coastguard Worker    ],
69*03ce13f7SAndroid Build Coastguard Worker
70*03ce13f7SAndroid Build Coastguard Worker    cppflags: [
71*03ce13f7SAndroid Build Coastguard Worker        "-Wno-sign-promo",
72*03ce13f7SAndroid Build Coastguard Worker    ],
73*03ce13f7SAndroid Build Coastguard Worker
74*03ce13f7SAndroid Build Coastguard Worker    srcs: [
75*03ce13f7SAndroid Build Coastguard Worker        "lib/Demangle/ItaniumDemangle.cpp",
76*03ce13f7SAndroid Build Coastguard Worker        "lib/Support/APInt.cpp",
77*03ce13f7SAndroid Build Coastguard Worker        "lib/Support/Atomic.cpp",
78*03ce13f7SAndroid Build Coastguard Worker        "lib/Support/circular_raw_ostream.cpp",
79*03ce13f7SAndroid Build Coastguard Worker        "lib/Support/CommandLine.cpp",
80*03ce13f7SAndroid Build Coastguard Worker        "lib/Support/Debug.cpp",
81*03ce13f7SAndroid Build Coastguard Worker        "lib/Support/Errno.cpp",
82*03ce13f7SAndroid Build Coastguard Worker        "lib/Support/ErrorHandling.cpp",
83*03ce13f7SAndroid Build Coastguard Worker        "lib/Support/Hashing.cpp",
84*03ce13f7SAndroid Build Coastguard Worker        "lib/Support/ManagedStatic.cpp",
85*03ce13f7SAndroid Build Coastguard Worker        "lib/Support/MemoryBuffer.cpp",
86*03ce13f7SAndroid Build Coastguard Worker        "lib/Support/Mutex.cpp",
87*03ce13f7SAndroid Build Coastguard Worker        "lib/Support/NativeFormatting.cpp",
88*03ce13f7SAndroid Build Coastguard Worker        "lib/Support/Path.cpp",
89*03ce13f7SAndroid Build Coastguard Worker        "lib/Support/Process.cpp",
90*03ce13f7SAndroid Build Coastguard Worker        "lib/Support/Program.cpp",
91*03ce13f7SAndroid Build Coastguard Worker        "lib/Support/raw_os_ostream.cpp",
92*03ce13f7SAndroid Build Coastguard Worker        "lib/Support/raw_ostream.cpp",
93*03ce13f7SAndroid Build Coastguard Worker        "lib/Support/regcomp.c",
94*03ce13f7SAndroid Build Coastguard Worker        "lib/Support/regerror.c",
95*03ce13f7SAndroid Build Coastguard Worker        "lib/Support/Regex.cpp",
96*03ce13f7SAndroid Build Coastguard Worker        "lib/Support/regexec.c",
97*03ce13f7SAndroid Build Coastguard Worker        "lib/Support/regfree.c",
98*03ce13f7SAndroid Build Coastguard Worker        "lib/Support/regstrlcpy.c",
99*03ce13f7SAndroid Build Coastguard Worker        "lib/Support/Signals.cpp",
100*03ce13f7SAndroid Build Coastguard Worker        "lib/Support/SmallPtrSet.cpp",
101*03ce13f7SAndroid Build Coastguard Worker        "lib/Support/SmallVector.cpp",
102*03ce13f7SAndroid Build Coastguard Worker        "lib/Support/StringExtras.cpp",
103*03ce13f7SAndroid Build Coastguard Worker        "lib/Support/StringMap.cpp",
104*03ce13f7SAndroid Build Coastguard Worker        "lib/Support/StringRef.cpp",
105*03ce13f7SAndroid Build Coastguard Worker        "lib/Support/StringSaver.cpp",
106*03ce13f7SAndroid Build Coastguard Worker        "lib/Support/Threading.cpp",
107*03ce13f7SAndroid Build Coastguard Worker        "lib/Support/Timer.cpp",
108*03ce13f7SAndroid Build Coastguard Worker        "lib/Support/Twine.cpp",
109*03ce13f7SAndroid Build Coastguard Worker    ],
110*03ce13f7SAndroid Build Coastguard Worker
111*03ce13f7SAndroid Build Coastguard Worker    export_include_dirs: [
112*03ce13f7SAndroid Build Coastguard Worker        "build/Android/include",
113*03ce13f7SAndroid Build Coastguard Worker        "include",
114*03ce13f7SAndroid Build Coastguard Worker    ],
115*03ce13f7SAndroid Build Coastguard Worker}
116