Bob Badour | c880fb0 | 2021-02-12 15:07:13 -0800 | [diff] [blame] | 1 | package { |
| 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 |
| 24 | license { |
| 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 | |
Dan Willemsen | c140d85 | 2018-11-19 16:36:35 -0800 | [diff] [blame] | 38 | build = ["AndroidGen.bp"] |
| 39 | |
Paul Thomson | d5b3510 | 2021-02-04 10:13:03 +0000 | [diff] [blame] | 40 | // Used by Amber. |
| 41 | // Amber includes "vkDefs.h". |
| 42 | cc_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. |
| 53 | cc_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", |
Paul Thomson | a53209e | 2021-10-12 13:32:43 +0100 | [diff] [blame] | 100 | "-DDE_MINGW=0", |
Paul Thomson | d5b3510 | 2021-02-04 10:13:03 +0000 | [diff] [blame] | 101 | "-DDE_OS=DE_OS_ANDROID", |
| 102 | "-DDEQP_GLES2_DIRECT_LINK=1", |
Paul Thomson | a53209e | 2021-10-12 13:32:43 +0100 | [diff] [blame] | 103 | "-DDEQP_HAVE_RENDERDOC_HEADER=0", // Needs to be 0. |
| 104 | "-DDEQP_SUPPORT_DRM=0", |
Paul Thomson | d5b3510 | 2021-02-04 10:13:03 +0000 | [diff] [blame] | 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 | |
Dan Willemsen | c140d85 | 2018-11-19 16:36:35 -0800 | [diff] [blame] | 123 | cc_library_shared { |
| 124 | name: "libdeqp", |
Paul Thomson | 736e987 | 2021-04-13 14:56:34 +0100 | [diff] [blame] | 125 | defaults: ["libdeqp_defaults"] |
| 126 | } |
| 127 | |
| 128 | cc_defaults { |
| 129 | name: "libdeqp_defaults", |
Paul Thomson | d5b3510 | 2021-02-04 10:13:03 +0000 | [diff] [blame] | 130 | defaults: ["libdeqp_gen", "deqp_and_deps_defaults"], |
Dan Willemsen | c140d85 | 2018-11-19 16:36:35 -0800 | [diff] [blame] | 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 | |
Orion Hodson | e4d8af6 | 2020-04-11 18:31:10 +0100 | [diff] [blame] | 146 | header_libs: ["jni_headers"], |
| 147 | |
Dan Willemsen | c140d85 | 2018-11-19 16:36:35 -0800 | [diff] [blame] | 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", |
Paul Thomson | d5b3510 | 2021-02-04 10:13:03 +0000 | [diff] [blame] | 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", |
Dan Willemsen | c140d85 | 2018-11-19 16:36:35 -0800 | [diff] [blame] | 172 | "deqp_spirv-tools", |
Chris Forbes | 2637abb | 2019-08-02 21:42:03 -0700 | [diff] [blame] | 173 | "deqp_amber", |
Dan Willemsen | c140d85 | 2018-11-19 16:36:35 -0800 | [diff] [blame] | 174 | ], |
| 175 | |
| 176 | cflags: [ |
Dan Willemsen | c140d85 | 2018-11-19 16:36:35 -0800 | [diff] [blame] | 177 | "-Wno-implicit-fallthrough", |
| 178 | "-Wno-sign-conversion", |
Chris Forbes | aed9d9d | 2019-08-02 18:37:39 -0700 | [diff] [blame] | 179 | "-Wno-unused-private-field", |
Paul Thomson | d5b3510 | 2021-02-04 10:13:03 +0000 | [diff] [blame] | 180 | "-Wno-shorten-64-to-32", |
Dan Willemsen | c140d85 | 2018-11-19 16:36:35 -0800 | [diff] [blame] | 181 | ], |
| 182 | |
Dan Willemsen | c140d85 | 2018-11-19 16:36:35 -0800 | [diff] [blame] | 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", |
Yabin Cui | 1572042 | 2020-04-21 13:24:19 -0700 | [diff] [blame] | 189 | "-Wno-unused-parameter", |
Dan Willemsen | c140d85 | 2018-11-19 16:36:35 -0800 | [diff] [blame] | 190 | "-Wno-unused-variable", |
Dan Willemsen | c140d85 | 2018-11-19 16:36:35 -0800 | [diff] [blame] | 191 | ], |
Dan Willemsen | c140d85 | 2018-11-19 16:36:35 -0800 | [diff] [blame] | 192 | } |
| 193 | |
| 194 | android_test { |
| 195 | name: "com.drawelements.deqp", |
| 196 | |
| 197 | test_suites: [ |
| 198 | "cts", |
Dan Shi | 6ed0831 | 2020-03-23 23:48:08 -0700 | [diff] [blame] | 199 | "mts", |
| 200 | "vts10", |
Dan Willemsen | c140d85 | 2018-11-19 16:36:35 -0800 | [diff] [blame] | 201 | ], |
| 202 | |
| 203 | srcs: ["android/package/src/**/*.java"], |
| 204 | resource_dirs: ["android/package/res"], |
Yiwei Zhang | c13ba4b | 2019-06-21 16:47:29 -0700 | [diff] [blame] | 205 | manifest: "android/package/AndroidManifest-integration.xml", |
Dan Willemsen | c140d85 | 2018-11-19 16:36:35 -0800 | [diff] [blame] | 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 | } |
Paul Thomson | 736e987 | 2021-04-13 14:56:34 +0100 | [diff] [blame] | 220 | |
| 221 | cc_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 | |
| 266 | filegroup { |
| 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 | |
| 275 | filegroup { |
| 276 | name: "deqp_binary_data", |
| 277 | srcs: [ |
| 278 | "data/**/*", |
| 279 | ], |
| 280 | path: "data", |
| 281 | } |
| 282 | |
| 283 | filegroup { |
| 284 | name: "deqp_binary_data_vulkancts", |
| 285 | srcs: [ |
| 286 | "external/vulkancts/data/**/*", |
| 287 | ], |
| 288 | path: "external/vulkancts/data", |
| 289 | } |
| 290 | |
| 291 | filegroup { |
| 292 | name: "deqp_binary_data_graphicsfuzz", |
| 293 | srcs: [ |
| 294 | "external/graphicsfuzz/data/**/*", |
| 295 | ], |
| 296 | path: "external/graphicsfuzz/data", |
| 297 | } |