1
2// This file is derived (manually) from the CMake targets.
3// We only consider the targets that dEQP depends on (including transitive
4// dependencies). Search for "GLSLANG_LIBRARIES" in dEQP.
5//
6// dEQP depends on:
7// - glslang
8//   - OSDependent
9//   - MachineIndependent
10//     - OGLCompiler
11//     - OSDependent
12//     - GenericCodeGen
13// - SPIRV (does not depend on SPIRV-Tools-opt because ENABLE_OPT=0)
14//   - MachineIndependent
15//     - ...
16// - SPVRemapper
17
18package {
19    default_applicable_licenses: ["external_deqp-deps_glslang_license"],
20}
21
22// Added automatically by a large-scale-change that took the approach of
23// 'apply every license found to every target'. While this makes sure we respect
24// every license restriction, it may not be entirely correct.
25//
26// e.g. GPL in an MIT project might only apply to the contrib/ directory.
27//
28// Please consider splitting the single license below into multiple licenses,
29// taking care not to lose any license_kind information, and overriding the
30// default license using the 'licenses: [...]' property on targets as needed.
31//
32// For unused files, consider creating a 'fileGroup' with "//visibility:private"
33// to attach the license to, and including a comment whether the files may be
34// used in the current project.
35//
36// large-scale-change included anything that looked like it might be a license
37// text as a license_text. e.g. LICENSE, NOTICE, COPYING etc.
38//
39// Please consider removing redundant or irrelevant files from 'license_text:'.
40//
41// large-scale-change filtered out the below license kinds as false-positives:
42//   SPDX-license-identifier-GPL
43//   SPDX-license-identifier-GPL-3.0
44// See: http://go/android-license-faq
45license {
46    name: "external_deqp-deps_glslang_license",
47    visibility: [":__subpackages__"],
48    license_kinds: [
49        "SPDX-license-identifier-Apache-2.0",
50        "SPDX-license-identifier-BSD",
51        "SPDX-license-identifier-MIT",
52    ],
53    license_text: [
54        "LICENSE",
55        "LICENSE.txt",
56    ],
57}
58
59genrule {
60    name: "deqp_glslang_gen_build_info_h",
61    srcs: ["CHANGES.md", "build_info.h.tmpl"],
62    out: ["glslang/build_info.h"],
63    cmd: "$(location) $$(dirname $(location CHANGES.md)) -i $(location build_info.h.tmpl) -o $(location glslang/build_info.h)",
64    tool_files: ["build_info.py"],
65}
66
67cc_defaults {
68    name: "deqp_glslang_defaults",
69    defaults: ["deqp_and_deps_defaults"],
70    cppflags: [
71        "-Wno-enum-enum-conversion",
72        "-Wno-implicit-fallthrough",
73        "-Wno-missing-field-initializers",
74        "-Wno-unused-variable",
75        "-Wno-implicit-int-conversion",
76        "-Wno-sign-conversion",
77        "-Wno-unused-parameter",
78        "-Wno-unused-but-set-variable",
79        "-Wno-shorten-64-to-32",
80    ],
81    export_include_dirs: [
82        ".",
83    ],
84    generated_headers: [
85        "deqp_glslang_gen_build_info_h",
86    ],
87}
88
89cc_library_static {
90    name: "deqp_glslang_OSDependent",
91    defaults: [
92        "deqp_glslang_defaults",
93    ],
94    export_include_dirs: [
95        "glslang/OSDependent",
96    ],
97    srcs: [
98        "glslang/OSDependent/Unix/ossource.cpp",
99    ],
100}
101
102cc_library_static {
103    name: "deqp_glslang_MachineIndependent",
104    defaults: [
105        "deqp_glslang_defaults",
106    ],
107    export_include_dirs: [
108        "glslang/MachineIndependent",
109        "glslang/HLSL",
110    ],
111    srcs: [
112//        "glslang/MachineIndependent/glslang.m4",
113//        "glslang/MachineIndependent/glslang.y",
114        "glslang/MachineIndependent/glslang_tab.cpp",
115        "glslang/MachineIndependent/attribute.cpp",
116        "glslang/MachineIndependent/Constant.cpp",
117        "glslang/MachineIndependent/iomapper.cpp",
118        "glslang/MachineIndependent/InfoSink.cpp",
119        "glslang/MachineIndependent/Initialize.cpp",
120        "glslang/MachineIndependent/IntermTraverse.cpp",
121        "glslang/MachineIndependent/Intermediate.cpp",
122        "glslang/MachineIndependent/ParseContextBase.cpp",
123        "glslang/MachineIndependent/ParseHelper.cpp",
124        "glslang/MachineIndependent/PoolAlloc.cpp",
125        "glslang/MachineIndependent/RemoveTree.cpp",
126        "glslang/MachineIndependent/Scan.cpp",
127        "glslang/MachineIndependent/ShaderLang.cpp",
128        "glslang/MachineIndependent/SpirvIntrinsics.cpp",
129        "glslang/MachineIndependent/SymbolTable.cpp",
130        "glslang/MachineIndependent/Versions.cpp",
131        "glslang/MachineIndependent/intermOut.cpp",
132        "glslang/MachineIndependent/limits.cpp",
133        "glslang/MachineIndependent/linkValidate.cpp",
134        "glslang/MachineIndependent/parseConst.cpp",
135        "glslang/MachineIndependent/reflection.cpp",
136        "glslang/MachineIndependent/preprocessor/Pp.cpp",
137        "glslang/MachineIndependent/preprocessor/PpAtom.cpp",
138        "glslang/MachineIndependent/preprocessor/PpContext.cpp",
139        "glslang/MachineIndependent/preprocessor/PpScanner.cpp",
140        "glslang/MachineIndependent/preprocessor/PpTokens.cpp",
141        "glslang/MachineIndependent/propagateNoContraction.cpp",
142
143        "glslang/HLSL/hlslAttributes.cpp",
144        "glslang/HLSL/hlslParseHelper.cpp",
145        "glslang/HLSL/hlslScanContext.cpp",
146        "glslang/HLSL/hlslOpMap.cpp",
147        "glslang/HLSL/hlslTokenStream.cpp",
148        "glslang/HLSL/hlslGrammar.cpp",
149        "glslang/HLSL/hlslParseables.cpp",
150    ],
151    static_libs: [
152        "deqp_glslang_OSDependent",
153        "deqp_glslang_GenericCodeGen",
154    ],
155}
156
157cc_library_static {
158    name: "deqp_glslang_glslang",
159    defaults: [
160        "deqp_glslang_defaults",
161    ],
162    export_include_dirs: [
163        "glslang",
164    ],
165    srcs: [
166        "glslang/CInterface/glslang_c_interface.cpp"
167    ],
168    static_libs: [
169        "deqp_glslang_OSDependent",
170        "deqp_glslang_MachineIndependent",
171    ],
172}
173
174cc_library_static {
175    name: "deqp_glslang_SPIRV",
176    defaults: [
177        "deqp_glslang_defaults",
178    ],
179    export_include_dirs: [
180        "SPIRV",
181    ],
182    srcs: [
183        "SPIRV/GlslangToSpv.cpp",
184        "SPIRV/InReadableOrder.cpp",
185        "SPIRV/Logger.cpp",
186        "SPIRV/SpvBuilder.cpp",
187        "SPIRV/SpvPostProcess.cpp",
188        "SPIRV/doc.cpp",
189        "SPIRV/SpvTools.cpp",
190        "SPIRV/disassemble.cpp",
191        "SPIRV/CInterface/spirv_c_interface.cpp",
192    ],
193    static_libs: [
194        "deqp_glslang_MachineIndependent",
195    ],
196}
197
198cc_library_static {
199    name: "deqp_glslang_SPVRemapper",
200    defaults: [
201        "deqp_glslang_defaults",
202    ],
203    export_include_dirs: [
204        "SPIRV",
205    ],
206    srcs: [
207        "SPIRV/SPVRemapper.cpp",
208        "SPIRV/doc.cpp",
209    ],
210}
211
212cc_library_static {
213    name: "deqp_glslang_GenericCodeGen",
214    defaults: [
215        "deqp_glslang_defaults",
216    ],
217    export_include_dirs: [
218        "glslang/GenericCodeGen",
219    ],
220    srcs: [
221        "glslang/GenericCodeGen/CodeGen.cpp",
222        "glslang/GenericCodeGen/Link.cpp",
223    ],
224}
225
226cc_library_headers {
227    name: "deqp_glslang_ResourceLimits_headers",
228    defaults: ["deqp_and_deps_defaults"],
229    export_include_dirs: [
230        "glslang/Public/ResourceLimits.h",
231    ],
232}
233
234cc_library_static {
235    name: "deqp_glslang_ResourceLimits",
236    defaults: [
237        "deqp_glslang_defaults",
238    ],
239    export_include_dirs: [
240        "glslang/ResourceLimits",
241    ],
242    srcs: [
243        "glslang/ResourceLimits/ResourceLimits.cpp",
244    ],
245    header_libs: [
246        "deqp_glslang_ResourceLimits_headers",
247    ],
248}
249