xref: /aosp_15_r20/external/swiftshader/third_party/llvm-subzero/Android.bp (revision 03ce13f70fcc45d86ee91b7ee4cab1936a95046e)
1//
2// Copyright (C) 2018 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    default_applicable_licenses: [
19        "external_swiftshader_third_party_llvm-subzero_license",
20    ],
21}
22
23// Added automatically by a large-scale-change that took the approach of
24// 'apply every license found to every target'. While this makes sure we respect
25// every license restriction, it may not be entirely correct.
26//
27// e.g. GPL in an MIT project might only apply to the contrib/ directory.
28//
29// Please consider splitting the single license below into multiple licenses,
30// taking care not to lose any license_kind information, and overriding the
31// default license using the 'licenses: [...]' property on targets as needed.
32//
33// For unused files, consider creating a 'filegroup' with "//visibility:private"
34// to attach the license to, and including a comment whether the files may be
35// used in the current project.
36// http://go/android-license-faq
37license {
38    name: "external_swiftshader_third_party_llvm-subzero_license",
39    visibility: [":__subpackages__"],
40    license_kinds: [
41        "SPDX-license-identifier-Apache-2.0",
42        "SPDX-license-identifier-BSD",
43        "SPDX-license-identifier-MIT",
44        "SPDX-license-identifier-NCSA",
45        "legacy_unencumbered",
46    ],
47    license_text: [
48        "LICENSE.TXT",
49    ],
50}
51
52cc_library_static {
53    name: "libLLVMSupport_subzero",
54
55    defaults: [ "swiftshader_common_release" ],
56
57    device_supported: false,
58    host_supported: true,
59
60    cflags: [
61        "-D_GNU_SOURCE",
62        "-D__STDC_LIMIT_MACROS",
63        "-D__STDC_CONSTANT_MACROS",
64        "-D__STDC_FORMAT_MACROS",
65        "-DLOG_TAG=\"libsubzero\"",
66        "-Wno-implicit-fallthrough",
67        "-Wno-unused-parameter",
68    ],
69
70    cppflags: [
71        "-Wno-sign-promo",
72    ],
73
74    srcs: [
75        "lib/Demangle/ItaniumDemangle.cpp",
76        "lib/Support/APInt.cpp",
77        "lib/Support/Atomic.cpp",
78        "lib/Support/circular_raw_ostream.cpp",
79        "lib/Support/CommandLine.cpp",
80        "lib/Support/Debug.cpp",
81        "lib/Support/Errno.cpp",
82        "lib/Support/ErrorHandling.cpp",
83        "lib/Support/Hashing.cpp",
84        "lib/Support/ManagedStatic.cpp",
85        "lib/Support/MemoryBuffer.cpp",
86        "lib/Support/Mutex.cpp",
87        "lib/Support/NativeFormatting.cpp",
88        "lib/Support/Path.cpp",
89        "lib/Support/Process.cpp",
90        "lib/Support/Program.cpp",
91        "lib/Support/raw_os_ostream.cpp",
92        "lib/Support/raw_ostream.cpp",
93        "lib/Support/regcomp.c",
94        "lib/Support/regerror.c",
95        "lib/Support/Regex.cpp",
96        "lib/Support/regexec.c",
97        "lib/Support/regfree.c",
98        "lib/Support/regstrlcpy.c",
99        "lib/Support/Signals.cpp",
100        "lib/Support/SmallPtrSet.cpp",
101        "lib/Support/SmallVector.cpp",
102        "lib/Support/StringExtras.cpp",
103        "lib/Support/StringMap.cpp",
104        "lib/Support/StringRef.cpp",
105        "lib/Support/StringSaver.cpp",
106        "lib/Support/Threading.cpp",
107        "lib/Support/Timer.cpp",
108        "lib/Support/Twine.cpp",
109    ],
110
111    export_include_dirs: [
112        "build/Android/include",
113        "include",
114    ],
115}
116