1 2package { 3 default_applicable_licenses: ["external_deqp-deps_SPIRV-Tools_license"], 4} 5 6// Added automatically by a large-scale-change that took the approach of 7// 'apply every license found to every target'. While this makes sure we respect 8// every license restriction, it may not be entirely correct. 9// 10// e.g. GPL in an MIT project might only apply to the contrib/ directory. 11// 12// Please consider splitting the single license below into multiple licenses, 13// taking care not to lose any license_kind information, and overriding the 14// default license using the 'licenses: [...]' property on targets as needed. 15// 16// For unused files, consider creating a 'fileGroup' with "//visibility:private" 17// to attach the license to, and including a comment whether the files may be 18// used in the current project. 19// See: http://go/android-license-faq 20license { 21 name: "external_deqp-deps_SPIRV-Tools_license", 22 visibility: [":__subpackages__"], 23 license_kinds: [ 24 "SPDX-license-identifier-Apache-2.0", 25 "SPDX-license-identifier-BSD", 26 "SPDX-license-identifier-MIT", 27 ], 28 license_text: [ 29 "LICENSE", 30 ], 31} 32 33genrule { 34 name: "deqp_spvtools_generate_grammar_tables", 35 out: [ 36 "core.insts-unified1.inc", 37 "debuginfo.insts.inc", 38 "enum_string_mapping.inc", 39 "extension_enum.inc", 40 "glsl.std.450.insts.inc", 41 "nonsemantic.clspvreflection.insts.inc", 42 "nonsemantic.shader.debuginfo.100.insts.inc", 43 "opencl.debuginfo.100.insts.inc", 44 "opencl.std.insts.inc", 45 "operand.kinds-unified1.inc", 46 "spv-amd-gcn-shader.insts.inc", 47 "spv-amd-shader-ballot.insts.inc", 48 "spv-amd-shader-explicit-vertex-parameter.insts.inc", 49 "spv-amd-shader-trinary-minmax.insts.inc", 50 ], 51 srcs: [ 52 ":deqp_spirv_headers_unified1_extinst.debuginfo.grammar.json", 53 ":deqp_spirv_headers_unified1_extinst.glsl.std.450.grammar.json", 54 ":deqp_spirv_headers_unified1_extinst.nonsemantic.clspvreflection.grammar.json", 55 ":deqp_spirv_headers_unified1_extinst.nonsemantic.shader.debuginfo.100.grammar.json", 56 ":deqp_spirv_headers_unified1_extinst.opencl.debuginfo.100.grammar.json", 57 ":deqp_spirv_headers_unified1_extinst.opencl.std.100.grammar.json", 58 ":deqp_spirv_headers_unified1_extinst.spv-amd-gcn-shader.grammar.json", 59 ":deqp_spirv_headers_unified1_extinst.spv-amd-shader-ballot.grammar.json", 60 ":deqp_spirv_headers_unified1_extinst.spv-amd-shader-explicit-vertex-parameter.grammar.json", 61 ":deqp_spirv_headers_unified1_extinst.spv-amd-shader-trinary-minmax.grammar.json", 62 ":deqp_spirv_headers_unified1_spirv.core.grammar.json", 63 ], 64 tool_files: ["utils/generate_grammar_tables.py"], 65 cmd: 66 "$(location) --extinst-glsl-grammar=$(location :deqp_spirv_headers_unified1_extinst.glsl.std.450.grammar.json) --glsl-insts-output=$(location glsl.std.450.insts.inc); "+ 67 "$(location) --extinst-opencl-grammar=$(location :deqp_spirv_headers_unified1_extinst.opencl.std.100.grammar.json) --opencl-insts-output=$(location opencl.std.insts.inc); "+ 68 "$(location) --extinst-vendor-grammar=$(location :deqp_spirv_headers_unified1_extinst.debuginfo.grammar.json) --vendor-insts-output=$(location debuginfo.insts.inc) --vendor-operand-kind-prefix=; "+ 69 "$(location) --extinst-vendor-grammar=$(location :deqp_spirv_headers_unified1_extinst.nonsemantic.clspvreflection.grammar.json) --vendor-insts-output=$(location nonsemantic.clspvreflection.insts.inc) --vendor-operand-kind-prefix=; "+ 70 "$(location) --extinst-vendor-grammar=$(location :deqp_spirv_headers_unified1_extinst.nonsemantic.shader.debuginfo.100.grammar.json) --vendor-insts-output=$(location nonsemantic.shader.debuginfo.100.insts.inc) --vendor-operand-kind-prefix=SHDEBUG100_; "+ 71 "$(location) --extinst-vendor-grammar=$(location :deqp_spirv_headers_unified1_extinst.opencl.debuginfo.100.grammar.json) --vendor-insts-output=$(location opencl.debuginfo.100.insts.inc) --vendor-operand-kind-prefix=CLDEBUG100_; "+ 72 "$(location) --extinst-vendor-grammar=$(location :deqp_spirv_headers_unified1_extinst.spv-amd-gcn-shader.grammar.json) --vendor-insts-output=$(location spv-amd-gcn-shader.insts.inc) --vendor-operand-kind-prefix=; "+ 73 "$(location) --extinst-vendor-grammar=$(location :deqp_spirv_headers_unified1_extinst.spv-amd-shader-ballot.grammar.json) --vendor-insts-output=$(location spv-amd-shader-ballot.insts.inc) --vendor-operand-kind-prefix=; "+ 74 "$(location) --extinst-vendor-grammar=$(location :deqp_spirv_headers_unified1_extinst.spv-amd-shader-explicit-vertex-parameter.grammar.json) --vendor-insts-output=$(location spv-amd-shader-explicit-vertex-parameter.insts.inc) --vendor-operand-kind-prefix=; "+ 75 "$(location) --extinst-vendor-grammar=$(location :deqp_spirv_headers_unified1_extinst.spv-amd-shader-trinary-minmax.grammar.json) --vendor-insts-output=$(location spv-amd-shader-trinary-minmax.insts.inc) --vendor-operand-kind-prefix=; "+ 76 "$(location) --spirv-core-grammar=$(location :deqp_spirv_headers_unified1_spirv.core.grammar.json) --extinst-debuginfo-grammar=$(location :deqp_spirv_headers_unified1_extinst.debuginfo.grammar.json) --extinst-cldebuginfo100-grammar=$(location :deqp_spirv_headers_unified1_extinst.opencl.debuginfo.100.grammar.json) --core-insts-output=$(location core.insts-unified1.inc) --operand-kinds-output=$(location operand.kinds-unified1.inc); "+ 77 "$(location) --spirv-core-grammar=$(location :deqp_spirv_headers_unified1_spirv.core.grammar.json) --extinst-debuginfo-grammar=$(location :deqp_spirv_headers_unified1_extinst.debuginfo.grammar.json) --extinst-cldebuginfo100-grammar=$(location :deqp_spirv_headers_unified1_extinst.opencl.debuginfo.100.grammar.json) --extension-enum-output=$(location extension_enum.inc) --enum-string-mapping-output=$(location enum_string_mapping.inc); " 78} 79 80genrule { 81 name: "deqp_spvtools_generate_language_headers", 82 out: [ 83 "DebugInfo.h", 84 "NonSemanticShaderDebugInfo100.h", 85 "OpenCLDebugInfo100.h", 86 ], 87 srcs: [ 88 ":deqp_spirv_headers_unified1_extinst.debuginfo.grammar.json", 89 ":deqp_spirv_headers_unified1_extinst.nonsemantic.shader.debuginfo.100.grammar.json", 90 ":deqp_spirv_headers_unified1_extinst.opencl.debuginfo.100.grammar.json", 91 ], 92 tool_files: ["utils/generate_language_headers.py"], 93 cmd: 94 "$(location) --extinst-grammar=$(location :deqp_spirv_headers_unified1_extinst.debuginfo.grammar.json) --extinst-output-path=$(location DebugInfo.h); "+ 95 "$(location) --extinst-grammar=$(location :deqp_spirv_headers_unified1_extinst.nonsemantic.shader.debuginfo.100.grammar.json) --extinst-output-path=$(location NonSemanticShaderDebugInfo100.h); "+ 96 "$(location) --extinst-grammar=$(location :deqp_spirv_headers_unified1_extinst.opencl.debuginfo.100.grammar.json) --extinst-output-path=$(location OpenCLDebugInfo100.h); " 97} 98 99genrule { 100 name: "deqp_spvtools_generate_registry_tables", 101 out: [ 102 "generators.inc" 103 ], 104 srcs: [ 105 ":deqp_spirv_headers_spir-v.xml" 106 ], 107 tool_files: ["utils/generate_registry_tables.py"], 108 cmd: "$(location) --xml=$(location :deqp_spirv_headers_spir-v.xml) --generator-output=$(location generators.inc)", 109} 110 111genrule { // FIXME this relies on `git` which is no good on build machines 112 name: "deqp_spvtools_update_build_version", 113 out: ["build-version.inc"], 114 srcs: ["CHANGES"], 115 tool_files: ["utils/update_build_version.py"], 116 cmd: "$(location) $(location CHANGES) $(location build-version.inc)", 117} 118 119cc_library { 120 name: "deqp_spirv-tools", 121 defaults: ["deqp_and_deps_defaults"], 122 srcs: [ 123 "source/*.cpp", 124 "source/util/*.cpp", 125 "source/val/*.cpp", 126 "source/opt/*.cpp", 127 ], 128 local_include_dirs: [ 129 ".", 130 ], 131 export_include_dirs: [ 132 "include", 133 ], 134 include_dirs: [ 135 "external/deqp-deps/SPIRV-Headers/include" 136 ], 137 generated_headers: [ 138 "deqp_spvtools_generate_grammar_tables", 139 "deqp_spvtools_generate_language_headers", 140 "deqp_spvtools_update_build_version", 141 "deqp_spvtools_generate_registry_tables", 142 ], 143 cppflags: [ 144 "-Wno-implicit-fallthrough", 145 "-Wno-sign-conversion", 146 "-Wno-switch", 147 ], 148} 149