• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1package {
2    default_applicable_licenses: ["external_deqp_license"],
3}
4
5// Added automatically by a large-scale-change that took the approach of
6// 'apply every license found to every target'. While this makes sure we respect
7// every license restriction, it may not be entirely correct.
8//
9// e.g. GPL in an MIT project might only apply to the contrib/ directory.
10//
11// Please consider splitting the single license below into multiple licenses,
12// taking care not to lose any license_kind information, and overriding the
13// default license using the 'licenses: [...]' property on targets as needed.
14//
15// For unused files, consider creating a 'fileGroup' with "//visibility:private"
16// to attach the license to, and including a comment whether the files may be
17// used in the current project.
18//
19// large-scale-change included anything that looked like it might be a license
20// text as a license_text. e.g. LICENSE, NOTICE, COPYING etc.
21//
22// Please consider removing redundant or irrelevant files from 'license_text:'.
23// See: http://go/android-license-faq
24license {
25    name: "external_deqp_license",
26    visibility: [":__subpackages__"],
27    license_kinds: [
28        "SPDX-license-identifier-Apache-2.0",
29        "SPDX-license-identifier-BSD",
30        "SPDX-license-identifier-MIT",
31    ],
32    license_text: [
33        "LICENSE",
34        "NOTICE",
35    ],
36}
37
38build = ["AndroidGen.bp"]
39
40// Used by Amber.
41// Amber includes "vkDefs.h".
42cc_library_headers {
43    name: "deqp_vulkan_headers",
44    defaults: ["deqp_and_deps_defaults"],
45    export_include_dirs: [
46        "external/vulkancts/framework/vulkan",
47        "framework/delibs/debase",
48    ],
49}
50
51// These defaults ensure we have a consistent set of defines and compiler flags
52// across dEQP and its dependencies.
53cc_defaults {
54    name: "deqp_and_deps_defaults",
55    cpp_std: "c++11",
56    cflags: [
57        // Amber defines.
58        "-DAMBER_CTS_VULKAN_HEADER=1",
59        "-DAMBER_ENABLE_CLSPV=0",
60        "-DAMBER_ENABLE_DXC=0",
61        "-DAMBER_ENABLE_LODEPNG=1", // This has no effect.
62        "-DAMBER_ENABLE_RTTI=1",
63        "-DAMBER_ENABLE_SHADERC=0",
64        "-DAMBER_ENABLE_SPIRV_TOOLS=0",
65        "-DAMBER_ENABLE_VK_DEBUGGING=0",
66        "-DAMBER_ENGINE_DAWN=0",
67        "-DAMBER_ENGINE_VULKAN=1",
68
69        // glslang defines:
70        "-DENABLE_HLSL",
71        "-DENABLE_OPT=0",
72        "-DGLSLANG_OSINCLUDE_UNIX",
73
74        // SPIRV-Tools defines:
75        "-DSPIRV_ANDROID",
76        "-DSPIRV_CHECK_CONTEXT",
77        "-DSPIRV_COLOR_TERMINAL",
78        "-DSPIRV_TIMER_ENABLED",
79
80        // Android/Clang defines (not needed):
81        // -D_FORTIFY_SOURCE=2
82        // -DANDROID
83        // -DNDEBUG
84
85        // dEQP defines that we don't want/need:
86        // -DDE_DEBUG
87        // -DDEQP_USE_RELEASE_INFO_FILE
88        // -DPNG_DEBUG
89
90        // dEQP defines that are worked out in deDefs.h, without needing
91        // explicit defs:
92        // -DDE_PTR_SIZE=8
93        // -DDE_CPU=DE_CPU_ARM_64
94
95        // dEQP defines:
96        "-D_XOPEN_SOURCE=600",
97        "-DDE_ANDROID_API=28",
98        "-DDE_ASSERT_FAILURE_CALLBACK",
99        "-DDE_COMPILER=DE_COMPILER_CLANG",
100        "-DDE_MINGW=0",
101        "-DDE_OS=DE_OS_ANDROID",
102        "-DDEQP_GLES2_DIRECT_LINK=1",
103        "-DDEQP_HAVE_RENDERDOC_HEADER=0", // Needs to be 0.
104        "-DDEQP_SUPPORT_DRM=0",
105        "-DDEQP_SUPPORT_GLES1=1",
106        "-DDEQP_TARGET_NAME=\"Android\"",
107        "-DQP_SUPPORT_PNG",
108
109        "-Wall",
110        "-Werror",
111        "-Wconversion",
112
113        "-fwrapv",
114    ],
115    cppflags: [
116        "-fexceptions",
117    ],
118    sdk_version: "27",
119    rtti: true,
120    stl: "c++_static",
121}
122
123cc_library_shared {
124    name: "libdeqp",
125    defaults: ["libdeqp_defaults"]
126}
127
128cc_defaults {
129    name: "libdeqp_defaults",
130    defaults: ["libdeqp_gen", "deqp_and_deps_defaults"],
131
132    tidy_checks: [
133        // The clang-tidy google-explicit-constructor warning is issued to nearly
134        // 1000 conversion constructors in this project. They are from more than
135        // 500 source files. Most of them should be declared explicit, but many
136        // of them need to be implicit. Until we correctly mark them as explicit
137        // or NOLINT(implicit), we suppress the google-explicit-constructor check.
138        "-google-explicit-constructor",
139
140        "-google-build-explicit-make-pair",
141        "-google-global-names-in-headers",
142        "-google-runtime-member-string-references",
143        "-google-runtime-operator",
144    ],
145
146    header_libs: ["jni_headers"],
147
148    include_dirs: [
149        "external/deqp-deps/SPIRV-Headers/include",
150    ],
151
152    shared_libs: [
153        "libEGL",
154        "libGLESv2",
155        "libandroid",
156        "liblog",
157        "libm",
158        "libc",
159        "libz",
160        "libdl",
161    ],
162
163    static_libs: [
164        "libpng_ndk",
165        "deqp_glslang_glslang",
166        "deqp_glslang_OGLCompiler",
167        "deqp_glslang_OSDependent",
168        "deqp_glslang_MachineIndependent",
169        "deqp_glslang_GenericCodeGen",
170        "deqp_glslang_SPIRV",
171        "deqp_glslang_SPVRemapper",
172        "deqp_spirv-tools",
173        "deqp_amber",
174    ],
175
176    cflags: [
177        "-Wno-implicit-fallthrough",
178        "-Wno-sign-conversion",
179        "-Wno-unused-private-field",
180        "-Wno-shorten-64-to-32",
181    ],
182
183    cppflags: [
184        "-Wno-non-virtual-dtor",
185        "-Wno-delete-non-virtual-dtor",
186        "-Wno-implicit-int-conversion",
187        "-Wno-missing-field-initializers",
188        "-Wno-switch",
189        "-Wno-unused-parameter",
190        "-Wno-unused-variable",
191    ],
192}
193
194android_test {
195    name: "com.drawelements.deqp",
196
197    test_suites: [
198        "cts",
199        "mts",
200        "vts10",
201    ],
202
203    srcs: ["android/package/src/**/*.java"],
204    resource_dirs: ["android/package/res"],
205    manifest: "android/package/AndroidManifest-integration.xml",
206
207    asset_dirs: [
208        "data",
209        "external/vulkancts/data",
210        "external/graphicsfuzz/data",
211    ],
212
213    jni_libs: ["libdeqp"],
214
215    compile_multilib: "both",
216
217    // We could go down all the way to API-13 for 32bit. 22 is required for 64bit ARM.
218    sdk_version: "test_current",
219}
220
221cc_test {
222    name: "deqp-binary",
223    defaults: ["libdeqp_defaults"],
224
225    cflags: [
226        "-DDEQP_GLES3_RUNTIME_LOAD=1",
227    ],
228
229    cppflags: [
230        "-Wno-macro-redefined",
231    ],
232
233    srcs: [
234        "framework/platform/tcuMain.cpp",
235        "framework/platform/surfaceless/tcuSurfacelessPlatform.cpp",
236    ],
237
238    local_include_dirs: [
239       "framework/platform/surfaceless",
240    ],
241
242    multilib: {
243        lib64: {
244            suffix: "64",
245        },
246    },
247
248    compile_multilib: "both",
249
250    version_script: "deqp_binary.lds",
251
252    host_supported: false,
253    gtest: false,
254    auto_gen_config: false,
255    test_options: {
256        unit_test: false,
257    },
258    data: [
259        ":deqp_binary_incremental_test_lists",
260        ":deqp_binary_data",
261        ":deqp_binary_data_vulkancts",
262        ":deqp_binary_data_graphicsfuzz",
263    ],
264}
265
266filegroup {
267    name: "deqp_binary_incremental_test_lists",
268    srcs: [
269        "android/cts/master/gles3-incremental-deqp.txt",
270        "android/cts/master/vk-incremental-deqp.txt",
271    ],
272    path: "android/cts/master",
273}
274
275filegroup {
276    name: "deqp_binary_data",
277    srcs: [
278        "data/**/*",
279    ],
280    path: "data",
281}
282
283filegroup {
284    name: "deqp_binary_data_vulkancts",
285    srcs: [
286        "external/vulkancts/data/**/*",
287    ],
288    path: "external/vulkancts/data",
289}
290
291filegroup {
292    name: "deqp_binary_data_graphicsfuzz",
293    srcs: [
294        "external/graphicsfuzz/data/**/*",
295    ],
296    path: "external/graphicsfuzz/data",
297}
298