| 1 |
# Copyright 2018 Google Inc. All rights reserved. |
| 2 |
# |
| 3 |
# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 |
# you may not use this file except in compliance with the License. |
| 5 |
# You may obtain a copy of the License at |
| 6 |
# |
| 7 |
# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 |
# |
| 9 |
# Unless required by applicable law or agreed to in writing, software |
| 10 |
# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 |
# See the License for the specific language governing permissions and |
| 13 |
# limitations under the License. |
| 14 |
|
| 15 |
import("//build_overrides/build.gni") |
| 16 |
import("//build_overrides/spirv_tools.gni") |
| 17 |
if (build_with_chromium) { |
| 18 |
import("//testing/test.gni") |
| 19 |
} |
| 20 |
|
| 21 |
spirv_headers = spirv_tools_spirv_headers_dir |
| 22 |
|
| 23 |
template("spvtools_core_tables") { |
| 24 |
assert(defined(invoker.version), "Need version in $target_name generation.") |
| 25 |
|
| 26 |
action("spvtools_core_tables_" + target_name) { |
| 27 |
script = "utils/generate_grammar_tables.py" |
| 28 |
|
| 29 |
version = invoker.version |
| 30 |
|
| 31 |
core_json_file = |
| 32 |
"${spirv_headers}/include/spirv/$version/spirv.core.grammar.json" |
| 33 |
core_insts_file = "${target_gen_dir}/core.insts-$version.inc" |
| 34 |
operand_kinds_file = "${target_gen_dir}/operand.kinds-$version.inc" |
| 35 |
debuginfo_insts_file = "${spirv_headers}/include/spirv/unified1/extinst.debuginfo.grammar.json" |
| 36 |
cldebuginfo100_insts_file = "${spirv_headers}/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json" |
| 37 |
|
| 38 |
sources = [ |
| 39 |
core_json_file, |
| 40 |
debuginfo_insts_file, |
| 41 |
cldebuginfo100_insts_file, |
| 42 |
] |
| 43 |
outputs = [ |
| 44 |
core_insts_file, |
| 45 |
operand_kinds_file, |
| 46 |
] |
| 47 |
args = [ |
| 48 |
"--spirv-core-grammar", |
| 49 |
rebase_path(core_json_file, root_build_dir), |
| 50 |
"--core-insts-output", |
| 51 |
rebase_path(core_insts_file, root_build_dir), |
| 52 |
"--extinst-debuginfo-grammar", |
| 53 |
rebase_path(debuginfo_insts_file, root_build_dir), |
| 54 |
"--extinst-cldebuginfo100-grammar", |
| 55 |
rebase_path(cldebuginfo100_insts_file, root_build_dir), |
| 56 |
"--operand-kinds-output", |
| 57 |
rebase_path(operand_kinds_file, root_build_dir), |
| 58 |
] |
| 59 |
} |
| 60 |
} |
| 61 |
|
| 62 |
template("spvtools_core_enums") { |
| 63 |
assert(defined(invoker.version), "Need version in $target_name generation.") |
| 64 |
|
| 65 |
action("spvtools_core_enums_" + target_name) { |
| 66 |
script = "utils/generate_grammar_tables.py" |
| 67 |
|
| 68 |
version = invoker.version |
| 69 |
|
| 70 |
core_json_file = |
| 71 |
"${spirv_headers}/include/spirv/$version/spirv.core.grammar.json" |
| 72 |
debuginfo_insts_file = "${spirv_headers}/include/spirv/unified1/extinst.debuginfo.grammar.json" |
| 73 |
cldebuginfo100_insts_file = "${spirv_headers}/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json" |
| 74 |
|
| 75 |
extension_enum_file = "${target_gen_dir}/extension_enum.inc" |
| 76 |
extension_map_file = "${target_gen_dir}/enum_string_mapping.inc" |
| 77 |
|
| 78 |
args = [ |
| 79 |
"--spirv-core-grammar", |
| 80 |
rebase_path(core_json_file, root_build_dir), |
| 81 |
"--extinst-debuginfo-grammar", |
| 82 |
rebase_path(debuginfo_insts_file, root_build_dir), |
| 83 |
"--extinst-cldebuginfo100-grammar", |
| 84 |
rebase_path(cldebuginfo100_insts_file, root_build_dir), |
| 85 |
"--extension-enum-output", |
| 86 |
rebase_path(extension_enum_file, root_build_dir), |
| 87 |
"--enum-string-mapping-output", |
| 88 |
rebase_path(extension_map_file, root_build_dir), |
| 89 |
] |
| 90 |
inputs = [ |
| 91 |
core_json_file, |
| 92 |
debuginfo_insts_file, |
| 93 |
cldebuginfo100_insts_file, |
| 94 |
] |
| 95 |
outputs = [ |
| 96 |
extension_enum_file, |
| 97 |
extension_map_file, |
| 98 |
] |
| 99 |
} |
| 100 |
} |
| 101 |
|
| 102 |
template("spvtools_glsl_tables") { |
| 103 |
assert(defined(invoker.version), "Need version in $target_name generation.") |
| 104 |
|
| 105 |
action("spvtools_glsl_tables_" + target_name) { |
| 106 |
script = "utils/generate_grammar_tables.py" |
| 107 |
|
| 108 |
version = invoker.version |
| 109 |
|
| 110 |
core_json_file = |
| 111 |
"${spirv_headers}/include/spirv/$version/spirv.core.grammar.json" |
| 112 |
glsl_json_file = "${spirv_headers}/include/spirv/${version}/extinst.glsl.std.450.grammar.json" |
| 113 |
debuginfo_insts_file = "${spirv_headers}/include/spirv/unified1/extinst.debuginfo.grammar.json" |
| 114 |
cldebuginfo100_insts_file = "${spirv_headers}/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json" |
| 115 |
|
| 116 |
glsl_insts_file = "${target_gen_dir}/glsl.std.450.insts.inc" |
| 117 |
|
| 118 |
args = [ |
| 119 |
"--spirv-core-grammar", |
| 120 |
rebase_path(core_json_file, root_build_dir), |
| 121 |
"--extinst-debuginfo-grammar", |
| 122 |
rebase_path(debuginfo_insts_file, root_build_dir), |
| 123 |
"--extinst-cldebuginfo100-grammar", |
| 124 |
rebase_path(cldebuginfo100_insts_file, root_build_dir), |
| 125 |
"--extinst-glsl-grammar", |
| 126 |
rebase_path(glsl_json_file, root_build_dir), |
| 127 |
"--glsl-insts-output", |
| 128 |
rebase_path(glsl_insts_file, root_build_dir), |
| 129 |
] |
| 130 |
inputs = [ |
| 131 |
core_json_file, |
| 132 |
glsl_json_file, |
| 133 |
debuginfo_insts_file, |
| 134 |
cldebuginfo100_insts_file, |
| 135 |
] |
| 136 |
outputs = [ |
| 137 |
glsl_insts_file, |
| 138 |
] |
| 139 |
} |
| 140 |
} |
| 141 |
|
| 142 |
template("spvtools_opencl_tables") { |
| 143 |
assert(defined(invoker.version), "Need version in $target_name generation.") |
| 144 |
|
| 145 |
action("spvtools_opencl_tables_" + target_name) { |
| 146 |
script = "utils/generate_grammar_tables.py" |
| 147 |
|
| 148 |
version = invoker.version |
| 149 |
|
| 150 |
core_json_file = |
| 151 |
"${spirv_headers}/include/spirv/$version/spirv.core.grammar.json" |
| 152 |
opencl_json_file = "${spirv_headers}/include/spirv/${version}/extinst.opencl.std.100.grammar.json" |
| 153 |
debuginfo_insts_file = "${spirv_headers}/include/spirv/unified1/extinst.debuginfo.grammar.json" |
| 154 |
cldebuginfo100_insts_file = "${spirv_headers}/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json" |
| 155 |
|
| 156 |
opencl_insts_file = "${target_gen_dir}/opencl.std.insts.inc" |
| 157 |
|
| 158 |
args = [ |
| 159 |
"--spirv-core-grammar", |
| 160 |
rebase_path(core_json_file, root_build_dir), |
| 161 |
"--extinst-debuginfo-grammar", |
| 162 |
rebase_path(debuginfo_insts_file, root_build_dir), |
| 163 |
"--extinst-cldebuginfo100-grammar", |
| 164 |
rebase_path(cldebuginfo100_insts_file, root_build_dir), |
| 165 |
"--extinst-opencl-grammar", |
| 166 |
rebase_path(opencl_json_file, root_build_dir), |
| 167 |
"--opencl-insts-output", |
| 168 |
rebase_path(opencl_insts_file, root_build_dir), |
| 169 |
] |
| 170 |
inputs = [ |
| 171 |
core_json_file, |
| 172 |
opencl_json_file, |
| 173 |
debuginfo_insts_file, |
| 174 |
cldebuginfo100_insts_file, |
| 175 |
] |
| 176 |
outputs = [ |
| 177 |
opencl_insts_file, |
| 178 |
] |
| 179 |
} |
| 180 |
} |
| 181 |
|
| 182 |
template("spvtools_language_header") { |
| 183 |
assert(defined(invoker.name), "Need name in $target_name generation.") |
| 184 |
|
| 185 |
action("spvtools_language_header_" + target_name) { |
| 186 |
script = "utils/generate_language_headers.py" |
| 187 |
|
| 188 |
name = invoker.name |
| 189 |
extinst_output_path = "${target_gen_dir}/${name}.h" |
| 190 |
|
| 191 |
args = [ |
| 192 |
"--extinst-grammar", |
| 193 |
rebase_path(invoker.grammar_file, root_build_dir), |
| 194 |
"--extinst-output-path", |
| 195 |
rebase_path(extinst_output_path, root_build_dir), |
| 196 |
] |
| 197 |
inputs = [ |
| 198 |
invoker.grammar_file, |
| 199 |
] |
| 200 |
outputs = [ |
| 201 |
"${extinst_output_path}", |
| 202 |
] |
| 203 |
} |
| 204 |
} |
| 205 |
|
| 206 |
template("spvtools_vendor_table") { |
| 207 |
assert(defined(invoker.name), "Need name in $target_name generation.") |
| 208 |
|
| 209 |
action("spvtools_vendor_tables_" + target_name) { |
| 210 |
script = "utils/generate_grammar_tables.py" |
| 211 |
|
| 212 |
name = invoker.name |
| 213 |
extinst_vendor_grammar = "${spirv_headers}/include/spirv/unified1/extinst.${name}.grammar.json" |
| 214 |
extinst_file = "${target_gen_dir}/${name}.insts.inc" |
| 215 |
|
| 216 |
args = [ |
| 217 |
"--extinst-vendor-grammar", |
| 218 |
rebase_path(extinst_vendor_grammar, root_build_dir), |
| 219 |
"--vendor-insts-output", |
| 220 |
rebase_path(extinst_file, root_build_dir), |
| 221 |
"--vendor-operand-kind-prefix", |
| 222 |
invoker.operand_kind_prefix |
| 223 |
] |
| 224 |
inputs = [ |
| 225 |
extinst_vendor_grammar, |
| 226 |
] |
| 227 |
outputs = [ |
| 228 |
extinst_file, |
| 229 |
] |
| 230 |
} |
| 231 |
} |
| 232 |
|
| 233 |
action("spvtools_generators_inc") { |
| 234 |
script = "utils/generate_registry_tables.py" |
| 235 |
|
| 236 |
# TODO(dsinclair): Make work for chrome |
| 237 |
xml_file = "${spirv_headers}/include/spirv/spir-v.xml" |
| 238 |
inc_file = "${target_gen_dir}/generators.inc" |
| 239 |
|
| 240 |
sources = [ |
| 241 |
xml_file, |
| 242 |
] |
| 243 |
outputs = [ |
| 244 |
inc_file, |
| 245 |
] |
| 246 |
args = [ |
| 247 |
"--xml", |
| 248 |
rebase_path(xml_file, root_build_dir), |
| 249 |
"--generator", |
| 250 |
rebase_path(inc_file, root_build_dir), |
| 251 |
] |
| 252 |
} |
| 253 |
|
| 254 |
action("spvtools_build_version") { |
| 255 |
script = "utils/update_build_version.py" |
| 256 |
|
| 257 |
src_dir = "." |
| 258 |
inc_file = "${target_gen_dir}/build-version.inc" |
| 259 |
|
| 260 |
outputs = [ |
| 261 |
inc_file, |
| 262 |
] |
| 263 |
args = [ |
| 264 |
rebase_path(src_dir, root_build_dir), |
| 265 |
rebase_path(inc_file, root_build_dir), |
| 266 |
] |
| 267 |
} |
| 268 |
|
| 269 |
spvtools_core_tables("unified1") { |
| 270 |
version = "unified1" |
| 271 |
} |
| 272 |
spvtools_core_enums("unified1") { |
| 273 |
version = "unified1" |
| 274 |
} |
| 275 |
spvtools_glsl_tables("glsl1-0") { |
| 276 |
version = "1.0" |
| 277 |
} |
| 278 |
spvtools_opencl_tables("opencl1-0") { |
| 279 |
version = "1.0" |
| 280 |
} |
| 281 |
spvtools_language_header("debuginfo") { |
| 282 |
name = "DebugInfo" |
| 283 |
grammar_file = "${spirv_headers}/include/spirv/unified1/extinst.debuginfo.grammar.json" |
| 284 |
} |
| 285 |
spvtools_language_header("cldebuginfo100") { |
| 286 |
name = "OpenCLDebugInfo100" |
| 287 |
grammar_file = "${spirv_headers}/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json" |
| 288 |
} |
| 289 |
|
| 290 |
spvtools_vendor_tables = [ |
| 291 |
["spv-amd-shader-explicit-vertex-parameter", "...nil..."], |
| 292 |
["spv-amd-shader-trinary-minmax", "...nil..."], |
| 293 |
["spv-amd-gcn-shader", "...nil..."], |
| 294 |
["spv-amd-shader-ballot", "...nil..."], |
| 295 |
["debuginfo", "...nil..."], |
| 296 |
["opencl.debuginfo.100", "CLDEBUG100_"], |
| 297 |
["nonsemantic.clspvreflection", "...nil..."], |
| 298 |
] |
| 299 |
|
| 300 |
foreach(table_def, spvtools_vendor_tables) { |
| 301 |
spvtools_vendor_table(table_def[0]) { |
| 302 |
name = table_def[0] |
| 303 |
operand_kind_prefix = table_def[1] |
| 304 |
} |
| 305 |
} |
| 306 |
|
| 307 |
config("spvtools_public_config") { |
| 308 |
include_dirs = [ "include" ] |
| 309 |
} |
| 310 |
|
| 311 |
config("spvtools_internal_config") { |
| 312 |
include_dirs = [ |
| 313 |
".", |
| 314 |
"$target_gen_dir", |
| 315 |
"${spirv_headers}/include", |
| 316 |
] |
| 317 |
|
| 318 |
configs = [ ":spvtools_public_config" ] |
| 319 |
|
| 320 |
if (is_clang) { |
| 321 |
cflags = [ |
| 322 |
"-Wno-implicit-fallthrough", |
| 323 |
"-Wno-newline-eof", |
| 324 |
] |
| 325 |
} |
| 326 |
} |
| 327 |
|
| 328 |
source_set("spvtools_headers") { |
| 329 |
sources = [ |
| 330 |
"include/spirv-tools/instrument.hpp", |
| 331 |
"include/spirv-tools/libspirv.h", |
| 332 |
"include/spirv-tools/libspirv.hpp", |
| 333 |
"include/spirv-tools/linker.hpp", |
| 334 |
"include/spirv-tools/optimizer.hpp", |
| 335 |
] |
| 336 |
|
| 337 |
public_configs = [ ":spvtools_public_config" ] |
| 338 |
} |
| 339 |
|
| 340 |
static_library("spvtools") { |
| 341 |
deps = [ |
| 342 |
":spvtools_core_tables_unified1", |
| 343 |
":spvtools_generators_inc", |
| 344 |
":spvtools_glsl_tables_glsl1-0", |
| 345 |
":spvtools_language_header_debuginfo", |
| 346 |
":spvtools_language_header_cldebuginfo100", |
| 347 |
":spvtools_opencl_tables_opencl1-0", |
| 348 |
] |
| 349 |
foreach(table_def, spvtools_vendor_tables) { |
| 350 |
target_name = table_def[0] |
| 351 |
deps += [ ":spvtools_vendor_tables_$target_name" ] |
| 352 |
} |
| 353 |
|
| 354 |
sources = [ |
| 355 |
"source/assembly_grammar.cpp", |
| 356 |
"source/assembly_grammar.h", |
| 357 |
"source/binary.cpp", |
| 358 |
"source/binary.h", |
| 359 |
"source/cfa.h", |
| 360 |
"source/diagnostic.cpp", |
| 361 |
"source/diagnostic.h", |
| 362 |
"source/disassemble.cpp", |
| 363 |
"source/disassemble.h", |
| 364 |
"source/enum_set.h", |
| 365 |
"source/enum_string_mapping.cpp", |
| 366 |
"source/enum_string_mapping.h", |
| 367 |
"source/ext_inst.cpp", |
| 368 |
"source/ext_inst.h", |
| 369 |
"source/extensions.cpp", |
| 370 |
"source/extensions.h", |
| 371 |
"source/instruction.h", |
| 372 |
"source/latest_version_glsl_std_450_header.h", |
| 373 |
"source/latest_version_opencl_std_header.h", |
| 374 |
"source/latest_version_spirv_header.h", |
| 375 |
"source/libspirv.cpp", |
| 376 |
"source/macro.h", |
| 377 |
"source/name_mapper.cpp", |
| 378 |
"source/name_mapper.h", |
| 379 |
"source/opcode.cpp", |
| 380 |
"source/opcode.h", |
| 381 |
"source/operand.cpp", |
| 382 |
"source/operand.h", |
| 383 |
"source/parsed_operand.cpp", |
| 384 |
"source/parsed_operand.h", |
| 385 |
"source/print.cpp", |
| 386 |
"source/print.h", |
| 387 |
"source/spirv_constant.h", |
| 388 |
"source/spirv_definition.h", |
| 389 |
"source/spirv_endian.cpp", |
| 390 |
"source/spirv_endian.h", |
| 391 |
"source/spirv_optimizer_options.cpp", |
| 392 |
"source/spirv_optimizer_options.h", |
| 393 |
"source/spirv_target_env.cpp", |
| 394 |
"source/spirv_target_env.h", |
| 395 |
"source/spirv_validator_options.cpp", |
| 396 |
"source/spirv_validator_options.h", |
| 397 |
"source/table.cpp", |
| 398 |
"source/table.h", |
| 399 |
"source/text.cpp", |
| 400 |
"source/text.h", |
| 401 |
"source/text_handler.cpp", |
| 402 |
"source/text_handler.h", |
| 403 |
"source/util/bit_vector.cpp", |
| 404 |
"source/util/bit_vector.h", |
| 405 |
"source/util/bitutils.h", |
| 406 |
"source/util/hex_float.h", |
| 407 |
"source/util/ilist.h", |
| 408 |
"source/util/ilist_node.h", |
| 409 |
"source/util/make_unique.h", |
| 410 |
"source/util/parse_number.cpp", |
| 411 |
"source/util/parse_number.h", |
| 412 |
"source/util/small_vector.h", |
| 413 |
"source/util/string_utils.cpp", |
| 414 |
"source/util/string_utils.h", |
| 415 |
"source/util/timer.cpp", |
| 416 |
"source/util/timer.h", |
| 417 |
] |
| 418 |
|
| 419 |
public_deps = [ |
| 420 |
":spvtools_core_enums_unified1", |
| 421 |
":spvtools_headers", |
| 422 |
"${spirv_headers}:spv_headers", |
| 423 |
] |
| 424 |
|
| 425 |
if (build_with_chromium) { |
| 426 |
configs -= [ "//build/config/compiler:chromium_code" ] |
| 427 |
configs += [ "//build/config/compiler:no_chromium_code" ] |
| 428 |
} |
| 429 |
configs += [ ":spvtools_internal_config" ] |
| 430 |
} |
| 431 |
|
| 432 |
static_library("spvtools_val") { |
| 433 |
sources = [ |
| 434 |
"source/val/basic_block.cpp", |
| 435 |
"source/val/basic_block.h", |
| 436 |
"source/val/construct.cpp", |
| 437 |
"source/val/construct.h", |
| 438 |
"source/val/decoration.h", |
| 439 |
"source/val/function.cpp", |
| 440 |
"source/val/function.h", |
| 441 |
"source/val/instruction.cpp", |
| 442 |
"source/val/validate.cpp", |
| 443 |
"source/val/validate.h", |
| 444 |
"source/val/validate_adjacency.cpp", |
| 445 |
"source/val/validate_annotation.cpp", |
| 446 |
"source/val/validate_arithmetics.cpp", |
| 447 |
"source/val/validate_atomics.cpp", |
| 448 |
"source/val/validate_barriers.cpp", |
| 449 |
"source/val/validate_bitwise.cpp", |
| 450 |
"source/val/validate_builtins.cpp", |
| 451 |
"source/val/validate_capability.cpp", |
| 452 |
"source/val/validate_cfg.cpp", |
| 453 |
"source/val/validate_composites.cpp", |
| 454 |
"source/val/validate_constants.cpp", |
| 455 |
"source/val/validate_conversion.cpp", |
| 456 |
"source/val/validate_debug.cpp", |
| 457 |
"source/val/validate_decorations.cpp", |
| 458 |
"source/val/validate_derivatives.cpp", |
| 459 |
"source/val/validate_execution_limitations.cpp", |
| 460 |
"source/val/validate_extensions.cpp", |
| 461 |
"source/val/validate_function.cpp", |
| 462 |
"source/val/validate_id.cpp", |
| 463 |
"source/val/validate_image.cpp", |
| 464 |
"source/val/validate_instruction.cpp", |
| 465 |
"source/val/validate_interfaces.cpp", |
| 466 |
"source/val/validate_layout.cpp", |
| 467 |
"source/val/validate_literals.cpp", |
| 468 |
"source/val/validate_logicals.cpp", |
| 469 |
"source/val/validate_memory.cpp", |
| 470 |
"source/val/validate_memory_semantics.cpp", |
| 471 |
"source/val/validate_memory_semantics.h", |
| 472 |
"source/val/validate_misc.cpp", |
| 473 |
"source/val/validate_mode_setting.cpp", |
| 474 |
"source/val/validate_non_uniform.cpp", |
| 475 |
"source/val/validate_primitives.cpp", |
| 476 |
"source/val/validate_scopes.cpp", |
| 477 |
"source/val/validate_scopes.h", |
| 478 |
"source/val/validate_small_type_uses.cpp", |
| 479 |
"source/val/validate_type.cpp", |
| 480 |
"source/val/validation_state.cpp", |
| 481 |
"source/val/validation_state.h", |
| 482 |
] |
| 483 |
|
| 484 |
deps = [ |
| 485 |
":spvtools", |
| 486 |
":spvtools_language_header_cldebuginfo100", |
| 487 |
":spvtools_language_header_debuginfo", |
| 488 |
] |
| 489 |
public_deps = [ |
| 490 |
":spvtools_headers", |
| 491 |
] |
| 492 |
|
| 493 |
if (build_with_chromium) { |
| 494 |
configs -= [ "//build/config/compiler:chromium_code" ] |
| 495 |
configs += [ "//build/config/compiler:no_chromium_code" ] |
| 496 |
} |
| 497 |
configs += [ ":spvtools_internal_config" ] |
| 498 |
} |
| 499 |
|
| 500 |
static_library("spvtools_opt") { |
| 501 |
sources = [ |
| 502 |
"source/opt/aggressive_dead_code_elim_pass.cpp", |
| 503 |
"source/opt/aggressive_dead_code_elim_pass.h", |
| 504 |
"source/opt/amd_ext_to_khr.cpp", |
| 505 |
"source/opt/amd_ext_to_khr.h", |
| 506 |
"source/opt/basic_block.cpp", |
| 507 |
"source/opt/basic_block.h", |
| 508 |
"source/opt/block_merge_pass.cpp", |
| 509 |
"source/opt/block_merge_pass.h", |
| 510 |
"source/opt/block_merge_util.cpp", |
| 511 |
"source/opt/block_merge_util.h", |
| 512 |
"source/opt/build_module.cpp", |
| 513 |
"source/opt/build_module.h", |
| 514 |
"source/opt/ccp_pass.cpp", |
| 515 |
"source/opt/ccp_pass.h", |
| 516 |
"source/opt/cfg.cpp", |
| 517 |
"source/opt/cfg.h", |
| 518 |
"source/opt/cfg_cleanup_pass.cpp", |
| 519 |
"source/opt/cfg_cleanup_pass.h", |
| 520 |
"source/opt/code_sink.cpp", |
| 521 |
"source/opt/code_sink.h", |
| 522 |
"source/opt/combine_access_chains.cpp", |
| 523 |
"source/opt/combine_access_chains.h", |
| 524 |
"source/opt/compact_ids_pass.cpp", |
| 525 |
"source/opt/compact_ids_pass.h", |
| 526 |
"source/opt/composite.cpp", |
| 527 |
"source/opt/composite.h", |
| 528 |
"source/opt/const_folding_rules.cpp", |
| 529 |
"source/opt/const_folding_rules.h", |
| 530 |
"source/opt/constants.cpp", |
| 531 |
"source/opt/constants.h", |
| 532 |
"source/opt/convert_to_half_pass.cpp", |
| 533 |
"source/opt/convert_to_half_pass.h", |
| 534 |
"source/opt/copy_prop_arrays.cpp", |
| 535 |
"source/opt/copy_prop_arrays.h", |
| 536 |
"source/opt/dead_branch_elim_pass.cpp", |
| 537 |
"source/opt/dead_branch_elim_pass.h", |
| 538 |
"source/opt/dead_insert_elim_pass.cpp", |
| 539 |
"source/opt/dead_insert_elim_pass.h", |
| 540 |
"source/opt/dead_variable_elimination.cpp", |
| 541 |
"source/opt/dead_variable_elimination.h", |
| 542 |
"source/opt/decompose_initialized_variables_pass.cpp", |
| 543 |
"source/opt/decompose_initialized_variables_pass.h", |
| 544 |
"source/opt/decoration_manager.cpp", |
| 545 |
"source/opt/decoration_manager.h", |
| 546 |
"source/opt/debug_info_manager.cpp", |
| 547 |
"source/opt/debug_info_manager.h", |
| 548 |
"source/opt/def_use_manager.cpp", |
| 549 |
"source/opt/def_use_manager.h", |
| 550 |
"source/opt/desc_sroa.cpp", |
| 551 |
"source/opt/desc_sroa.h", |
| 552 |
"source/opt/dominator_analysis.cpp", |
| 553 |
"source/opt/dominator_analysis.h", |
| 554 |
"source/opt/dominator_tree.cpp", |
| 555 |
"source/opt/dominator_tree.h", |
| 556 |
"source/opt/eliminate_dead_constant_pass.cpp", |
| 557 |
"source/opt/eliminate_dead_constant_pass.h", |
| 558 |
"source/opt/eliminate_dead_functions_pass.cpp", |
| 559 |
"source/opt/eliminate_dead_functions_pass.h", |
| 560 |
"source/opt/eliminate_dead_functions_util.cpp", |
| 561 |
"source/opt/eliminate_dead_functions_util.h", |
| 562 |
"source/opt/eliminate_dead_members_pass.cpp", |
| 563 |
"source/opt/eliminate_dead_members_pass.h", |
| 564 |
"source/opt/empty_pass.h", |
| 565 |
"source/opt/feature_manager.cpp", |
| 566 |
"source/opt/feature_manager.h", |
| 567 |
"source/opt/fix_storage_class.cpp", |
| 568 |
"source/opt/fix_storage_class.h", |
| 569 |
"source/opt/flatten_decoration_pass.cpp", |
| 570 |
"source/opt/flatten_decoration_pass.h", |
| 571 |
"source/opt/fold.cpp", |
| 572 |
"source/opt/fold.h", |
| 573 |
"source/opt/fold_spec_constant_op_and_composite_pass.cpp", |
| 574 |
"source/opt/fold_spec_constant_op_and_composite_pass.h", |
| 575 |
"source/opt/folding_rules.cpp", |
| 576 |
"source/opt/folding_rules.h", |
| 577 |
"source/opt/freeze_spec_constant_value_pass.cpp", |
| 578 |
"source/opt/freeze_spec_constant_value_pass.h", |
| 579 |
"source/opt/function.cpp", |
| 580 |
"source/opt/function.h", |
| 581 |
"source/opt/generate_webgpu_initializers_pass.cpp", |
| 582 |
"source/opt/generate_webgpu_initializers_pass.h", |
| 583 |
"source/opt/graphics_robust_access_pass.cpp", |
| 584 |
"source/opt/graphics_robust_access_pass.h", |
| 585 |
"source/opt/if_conversion.cpp", |
| 586 |
"source/opt/if_conversion.h", |
| 587 |
"source/opt/inline_exhaustive_pass.cpp", |
| 588 |
"source/opt/inline_exhaustive_pass.h", |
| 589 |
"source/opt/inline_opaque_pass.cpp", |
| 590 |
"source/opt/inline_opaque_pass.h", |
| 591 |
"source/opt/inline_pass.cpp", |
| 592 |
"source/opt/inline_pass.h", |
| 593 |
"source/opt/inst_bindless_check_pass.cpp", |
| 594 |
"source/opt/inst_bindless_check_pass.h", |
| 595 |
"source/opt/inst_buff_addr_check_pass.cpp", |
| 596 |
"source/opt/inst_buff_addr_check_pass.h", |
| 597 |
"source/opt/inst_debug_printf_pass.cpp", |
| 598 |
"source/opt/inst_debug_printf_pass.h", |
| 599 |
"source/opt/instruction.cpp", |
| 600 |
"source/opt/instruction.h", |
| 601 |
"source/opt/instruction_list.cpp", |
| 602 |
"source/opt/instruction_list.h", |
| 603 |
"source/opt/instrument_pass.cpp", |
| 604 |
"source/opt/instrument_pass.h", |
| 605 |
"source/opt/ir_builder.h", |
| 606 |
"source/opt/ir_context.cpp", |
| 607 |
"source/opt/ir_context.h", |
| 608 |
"source/opt/ir_loader.cpp", |
| 609 |
"source/opt/ir_loader.h", |
| 610 |
"source/opt/iterator.h", |
| 611 |
"source/opt/legalize_vector_shuffle_pass.cpp", |
| 612 |
"source/opt/legalize_vector_shuffle_pass.h", |
| 613 |
"source/opt/licm_pass.cpp", |
| 614 |
"source/opt/licm_pass.h", |
| 615 |
"source/opt/local_access_chain_convert_pass.cpp", |
| 616 |
"source/opt/local_access_chain_convert_pass.h", |
| 617 |
"source/opt/local_redundancy_elimination.cpp", |
| 618 |
"source/opt/local_redundancy_elimination.h", |
| 619 |
"source/opt/local_single_block_elim_pass.cpp", |
| 620 |
"source/opt/local_single_block_elim_pass.h", |
| 621 |
"source/opt/local_single_store_elim_pass.cpp", |
| 622 |
"source/opt/local_single_store_elim_pass.h", |
| 623 |
"source/opt/log.h", |
| 624 |
"source/opt/loop_dependence.cpp", |
| 625 |
"source/opt/loop_dependence.h", |
| 626 |
"source/opt/loop_dependence_helpers.cpp", |
| 627 |
"source/opt/loop_descriptor.cpp", |
| 628 |
"source/opt/loop_descriptor.h", |
| 629 |
"source/opt/loop_fission.cpp", |
| 630 |
"source/opt/loop_fission.h", |
| 631 |
"source/opt/loop_fusion.cpp", |
| 632 |
"source/opt/loop_fusion.h", |
| 633 |
"source/opt/loop_fusion_pass.cpp", |
| 634 |
"source/opt/loop_fusion_pass.h", |
| 635 |
"source/opt/loop_peeling.cpp", |
| 636 |
"source/opt/loop_peeling.h", |
| 637 |
"source/opt/loop_unroller.cpp", |
| 638 |
"source/opt/loop_unroller.h", |
| 639 |
"source/opt/loop_unswitch_pass.cpp", |
| 640 |
"source/opt/loop_unswitch_pass.h", |
| 641 |
"source/opt/loop_utils.cpp", |
| 642 |
"source/opt/loop_utils.h", |
| 643 |
"source/opt/mem_pass.cpp", |
| 644 |
"source/opt/mem_pass.h", |
| 645 |
"source/opt/merge_return_pass.cpp", |
| 646 |
"source/opt/merge_return_pass.h", |
| 647 |
"source/opt/module.cpp", |
| 648 |
"source/opt/module.h", |
| 649 |
"source/opt/null_pass.h", |
| 650 |
"source/opt/optimizer.cpp", |
| 651 |
"source/opt/pass.cpp", |
| 652 |
"source/opt/pass.h", |
| 653 |
"source/opt/pass_manager.cpp", |
| 654 |
"source/opt/pass_manager.h", |
| 655 |
"source/opt/passes.h", |
| 656 |
"source/opt/private_to_local_pass.cpp", |
| 657 |
"source/opt/private_to_local_pass.h", |
| 658 |
"source/opt/propagator.cpp", |
| 659 |
"source/opt/propagator.h", |
| 660 |
"source/opt/reduce_load_size.cpp", |
| 661 |
"source/opt/reduce_load_size.h", |
| 662 |
"source/opt/redundancy_elimination.cpp", |
| 663 |
"source/opt/redundancy_elimination.h", |
| 664 |
"source/opt/reflect.h", |
| 665 |
"source/opt/register_pressure.cpp", |
| 666 |
"source/opt/register_pressure.h", |
| 667 |
"source/opt/relax_float_ops_pass.cpp", |
| 668 |
"source/opt/relax_float_ops_pass.h", |
| 669 |
"source/opt/remove_duplicates_pass.cpp", |
| 670 |
"source/opt/remove_duplicates_pass.h", |
| 671 |
"source/opt/replace_invalid_opc.cpp", |
| 672 |
"source/opt/replace_invalid_opc.h", |
| 673 |
"source/opt/scalar_analysis.cpp", |
| 674 |
"source/opt/scalar_analysis.h", |
| 675 |
"source/opt/scalar_analysis_nodes.h", |
| 676 |
"source/opt/scalar_analysis_simplification.cpp", |
| 677 |
"source/opt/scalar_replacement_pass.cpp", |
| 678 |
"source/opt/scalar_replacement_pass.h", |
| 679 |
"source/opt/set_spec_constant_default_value_pass.cpp", |
| 680 |
"source/opt/set_spec_constant_default_value_pass.h", |
| 681 |
"source/opt/simplification_pass.cpp", |
| 682 |
"source/opt/simplification_pass.h", |
| 683 |
"source/opt/split_invalid_unreachable_pass.cpp", |
| 684 |
"source/opt/split_invalid_unreachable_pass.h", |
| 685 |
"source/opt/ssa_rewrite_pass.cpp", |
| 686 |
"source/opt/ssa_rewrite_pass.h", |
| 687 |
"source/opt/strength_reduction_pass.cpp", |
| 688 |
"source/opt/strength_reduction_pass.h", |
| 689 |
"source/opt/strip_atomic_counter_memory_pass.cpp", |
| 690 |
"source/opt/strip_atomic_counter_memory_pass.h", |
| 691 |
"source/opt/strip_debug_info_pass.cpp", |
| 692 |
"source/opt/strip_debug_info_pass.h", |
| 693 |
"source/opt/strip_reflect_info_pass.cpp", |
| 694 |
"source/opt/strip_reflect_info_pass.h", |
| 695 |
"source/opt/struct_cfg_analysis.cpp", |
| 696 |
"source/opt/struct_cfg_analysis.h", |
| 697 |
"source/opt/tree_iterator.h", |
| 698 |
"source/opt/type_manager.cpp", |
| 699 |
"source/opt/type_manager.h", |
| 700 |
"source/opt/types.cpp", |
| 701 |
"source/opt/types.h", |
| 702 |
"source/opt/unify_const_pass.cpp", |
| 703 |
"source/opt/unify_const_pass.h", |
| 704 |
"source/opt/upgrade_memory_model.cpp", |
| 705 |
"source/opt/upgrade_memory_model.h", |
| 706 |
"source/opt/value_number_table.cpp", |
| 707 |
"source/opt/value_number_table.h", |
| 708 |
"source/opt/vector_dce.cpp", |
| 709 |
"source/opt/vector_dce.h", |
| 710 |
"source/opt/workaround1209.cpp", |
| 711 |
"source/opt/workaround1209.h", |
| 712 |
"source/opt/wrap_opkill.cpp", |
| 713 |
"source/opt/wrap_opkill.h", |
| 714 |
] |
| 715 |
|
| 716 |
deps = [ |
| 717 |
":spvtools", |
| 718 |
":spvtools_language_header_cldebuginfo100", |
| 719 |
":spvtools_language_header_debuginfo", |
| 720 |
":spvtools_vendor_tables_spv-amd-shader-ballot", |
| 721 |
] |
| 722 |
public_deps = [ |
| 723 |
":spvtools_headers", |
| 724 |
] |
| 725 |
|
| 726 |
if (build_with_chromium) { |
| 727 |
configs -= [ "//build/config/compiler:chromium_code" ] |
| 728 |
configs += [ "//build/config/compiler:no_chromium_code" ] |
| 729 |
} |
| 730 |
configs += [ ":spvtools_internal_config" ] |
| 731 |
} |
| 732 |
|
| 733 |
static_library("spvtools_link") { |
| 734 |
sources = [ |
| 735 |
"source/link/linker.cpp", |
| 736 |
] |
| 737 |
deps = [ |
| 738 |
":spvtools", |
| 739 |
":spvtools_opt", |
| 740 |
":spvtools_val", |
| 741 |
] |
| 742 |
public_deps = [ |
| 743 |
":spvtools_headers", |
| 744 |
] |
| 745 |
if (build_with_chromium) { |
| 746 |
configs -= [ "//build/config/compiler:chromium_code" ] |
| 747 |
configs += [ "//build/config/compiler:no_chromium_code" ] |
| 748 |
} |
| 749 |
configs += [ ":spvtools_internal_config" ] |
| 750 |
} |
| 751 |
|
| 752 |
static_library("spvtools_reduce") { |
| 753 |
sources = [ |
| 754 |
"source/reduce/change_operand_reduction_opportunity.cpp", |
| 755 |
"source/reduce/change_operand_reduction_opportunity.h", |
| 756 |
"source/reduce/change_operand_to_undef_reduction_opportunity.cpp", |
| 757 |
"source/reduce/change_operand_to_undef_reduction_opportunity.h", |
| 758 |
"source/reduce/conditional_branch_to_simple_conditional_branch_opportunity_finder.cpp", |
| 759 |
"source/reduce/conditional_branch_to_simple_conditional_branch_opportunity_finder.h", |
| 760 |
"source/reduce/conditional_branch_to_simple_conditional_branch_reduction_opportunity.cpp", |
| 761 |
"source/reduce/conditional_branch_to_simple_conditional_branch_reduction_opportunity.h", |
| 762 |
"source/reduce/merge_blocks_reduction_opportunity.cpp", |
| 763 |
"source/reduce/merge_blocks_reduction_opportunity.h", |
| 764 |
"source/reduce/merge_blocks_reduction_opportunity_finder.cpp", |
| 765 |
"source/reduce/merge_blocks_reduction_opportunity_finder.h", |
| 766 |
"source/reduce/operand_to_const_reduction_opportunity_finder.cpp", |
| 767 |
"source/reduce/operand_to_const_reduction_opportunity_finder.h", |
| 768 |
"source/reduce/operand_to_dominating_id_reduction_opportunity_finder.cpp", |
| 769 |
"source/reduce/operand_to_dominating_id_reduction_opportunity_finder.h", |
| 770 |
"source/reduce/operand_to_undef_reduction_opportunity_finder.cpp", |
| 771 |
"source/reduce/operand_to_undef_reduction_opportunity_finder.h", |
| 772 |
"source/reduce/reducer.cpp", |
| 773 |
"source/reduce/reducer.h", |
| 774 |
"source/reduce/reduction_opportunity.cpp", |
| 775 |
"source/reduce/reduction_opportunity.h", |
| 776 |
"source/reduce/reduction_opportunity_finder.cpp", |
| 777 |
"source/reduce/reduction_opportunity_finder.h", |
| 778 |
"source/reduce/reduction_pass.cpp", |
| 779 |
"source/reduce/reduction_pass.h", |
| 780 |
"source/reduce/reduction_util.cpp", |
| 781 |
"source/reduce/reduction_util.h", |
| 782 |
"source/reduce/remove_block_reduction_opportunity.cpp", |
| 783 |
"source/reduce/remove_block_reduction_opportunity.h", |
| 784 |
"source/reduce/remove_block_reduction_opportunity_finder.cpp", |
| 785 |
"source/reduce/remove_block_reduction_opportunity_finder.h", |
| 786 |
"source/reduce/remove_function_reduction_opportunity.cpp", |
| 787 |
"source/reduce/remove_function_reduction_opportunity.h", |
| 788 |
"source/reduce/remove_function_reduction_opportunity_finder.cpp", |
| 789 |
"source/reduce/remove_function_reduction_opportunity_finder.h", |
| 790 |
"source/reduce/remove_instruction_reduction_opportunity.cpp", |
| 791 |
"source/reduce/remove_instruction_reduction_opportunity.h", |
| 792 |
"source/reduce/remove_selection_reduction_opportunity.cpp", |
| 793 |
"source/reduce/remove_selection_reduction_opportunity.h", |
| 794 |
"source/reduce/remove_selection_reduction_opportunity_finder.cpp", |
| 795 |
"source/reduce/remove_selection_reduction_opportunity_finder.h", |
| 796 |
"source/reduce/remove_struct_member_reduction_opportunity.cpp", |
| 797 |
"source/reduce/remove_struct_member_reduction_opportunity.h", |
| 798 |
"source/reduce/remove_unused_instruction_reduction_opportunity_finder.cpp", |
| 799 |
"source/reduce/remove_unused_instruction_reduction_opportunity_finder.h", |
| 800 |
"source/reduce/remove_unused_struct_member_reduction_opportunity_finder.cpp", |
| 801 |
"source/reduce/remove_unused_struct_member_reduction_opportunity_finder.h", |
| 802 |
"source/reduce/simple_conditional_branch_to_branch_opportunity_finder.cpp", |
| 803 |
"source/reduce/simple_conditional_branch_to_branch_opportunity_finder.h", |
| 804 |
"source/reduce/simple_conditional_branch_to_branch_reduction_opportunity.cpp", |
| 805 |
"source/reduce/simple_conditional_branch_to_branch_reduction_opportunity.h", |
| 806 |
"source/reduce/structured_loop_to_selection_reduction_opportunity.cpp", |
| 807 |
"source/reduce/structured_loop_to_selection_reduction_opportunity.h", |
| 808 |
"source/reduce/structured_loop_to_selection_reduction_opportunity_finder.cpp", |
| 809 |
"source/reduce/structured_loop_to_selection_reduction_opportunity_finder.h", |
| 810 |
"source/spirv_reducer_options.cpp", |
| 811 |
"source/spirv_reducer_options.h", |
| 812 |
] |
| 813 |
deps = [ |
| 814 |
":spvtools", |
| 815 |
":spvtools_opt", |
| 816 |
] |
| 817 |
public_deps = [ |
| 818 |
":spvtools_headers", |
| 819 |
] |
| 820 |
if (build_with_chromium) { |
| 821 |
configs -= [ "//build/config/compiler:chromium_code" ] |
| 822 |
configs += [ "//build/config/compiler:no_chromium_code" ] |
| 823 |
} |
| 824 |
configs += [ ":spvtools_internal_config" ] |
| 825 |
} |
| 826 |
|
| 827 |
group("SPIRV-Tools") { |
| 828 |
public_deps = [ |
| 829 |
":spvtools", |
| 830 |
":spvtools_link", |
| 831 |
":spvtools_opt", |
| 832 |
":spvtools_reduce", |
| 833 |
":spvtools_val", |
| 834 |
] |
| 835 |
} |
| 836 |
|
| 837 |
# The tests are scoped to Chromium to avoid needing to write gtest integration. |
| 838 |
# See Chromium's third_party/googletest/BUILD.gn for a complete integration. |
| 839 |
if (build_with_chromium) { |
| 840 |
test("spvtools_test") { |
| 841 |
sources = [ |
| 842 |
"test/assembly_context_test.cpp", |
| 843 |
"test/assembly_format_test.cpp", |
| 844 |
"test/binary_destroy_test.cpp", |
| 845 |
"test/binary_endianness_test.cpp", |
| 846 |
"test/binary_header_get_test.cpp", |
| 847 |
"test/binary_parse_test.cpp", |
| 848 |
"test/binary_strnlen_s_test.cpp", |
| 849 |
"test/binary_to_text.literal_test.cpp", |
| 850 |
"test/binary_to_text_test.cpp", |
| 851 |
"test/comment_test.cpp", |
| 852 |
"test/enum_set_test.cpp", |
| 853 |
"test/enum_string_mapping_test.cpp", |
| 854 |
"test/ext_inst.debuginfo_test.cpp", |
| 855 |
"test/ext_inst.glsl_test.cpp", |
| 856 |
"test/ext_inst.opencl_test.cpp", |
| 857 |
"test/ext_inst.cldebug100_test.cpp", |
| 858 |
"test/fix_word_test.cpp", |
| 859 |
"test/generator_magic_number_test.cpp", |
| 860 |
"test/hex_float_test.cpp", |
| 861 |
"test/immediate_int_test.cpp", |
| 862 |
"test/libspirv_macros_test.cpp", |
| 863 |
"test/name_mapper_test.cpp", |
| 864 |
"test/named_id_test.cpp", |
| 865 |
"test/opcode_make_test.cpp", |
| 866 |
"test/opcode_require_capabilities_test.cpp", |
| 867 |
"test/opcode_split_test.cpp", |
| 868 |
"test/opcode_table_get_test.cpp", |
| 869 |
"test/operand_capabilities_test.cpp", |
| 870 |
"test/operand_pattern_test.cpp", |
| 871 |
"test/operand_test.cpp", |
| 872 |
"test/target_env_test.cpp", |
| 873 |
"test/test_fixture.h", |
| 874 |
"test/text_advance_test.cpp", |
| 875 |
"test/text_destroy_test.cpp", |
| 876 |
"test/text_literal_test.cpp", |
| 877 |
"test/text_start_new_inst_test.cpp", |
| 878 |
"test/text_to_binary.annotation_test.cpp", |
| 879 |
"test/text_to_binary.barrier_test.cpp", |
| 880 |
"test/text_to_binary.constant_test.cpp", |
| 881 |
"test/text_to_binary.control_flow_test.cpp", |
| 882 |
"test/text_to_binary.debug_test.cpp", |
| 883 |
"test/text_to_binary.device_side_enqueue_test.cpp", |
| 884 |
"test/text_to_binary.extension_test.cpp", |
| 885 |
"test/text_to_binary.function_test.cpp", |
| 886 |
"test/text_to_binary.group_test.cpp", |
| 887 |
"test/text_to_binary.image_test.cpp", |
| 888 |
"test/text_to_binary.literal_test.cpp", |
| 889 |
"test/text_to_binary.memory_test.cpp", |
| 890 |
"test/text_to_binary.misc_test.cpp", |
| 891 |
"test/text_to_binary.mode_setting_test.cpp", |
| 892 |
"test/text_to_binary.pipe_storage_test.cpp", |
| 893 |
"test/text_to_binary.reserved_sampling_test.cpp", |
| 894 |
"test/text_to_binary.subgroup_dispatch_test.cpp", |
| 895 |
"test/text_to_binary.type_declaration_test.cpp", |
| 896 |
"test/text_to_binary_test.cpp", |
| 897 |
"test/text_word_get_test.cpp", |
| 898 |
"test/unit_spirv.cpp", |
| 899 |
"test/unit_spirv.h", |
| 900 |
] |
| 901 |
|
| 902 |
deps = [ |
| 903 |
":spvtools", |
| 904 |
":spvtools_language_header_debuginfo", |
| 905 |
":spvtools_language_header_cldebuginfo100", |
| 906 |
":spvtools_val", |
| 907 |
"//testing/gmock", |
| 908 |
"//testing/gtest", |
| 909 |
"//testing/gtest:gtest_main", |
| 910 |
"//third_party/googletest:gmock", |
| 911 |
"//third_party/googletest:gtest", |
| 912 |
] |
| 913 |
|
| 914 |
if (is_clang) { |
| 915 |
cflags_cc = [ "-Wno-self-assign" ] |
| 916 |
} |
| 917 |
|
| 918 |
configs += [ ":spvtools_internal_config" ] |
| 919 |
} |
| 920 |
} |
| 921 |
|
| 922 |
if (spirv_tools_standalone) { |
| 923 |
group("fuzzers") { |
| 924 |
testonly = true |
| 925 |
deps = [ |
| 926 |
"test/fuzzers", |
| 927 |
] |
| 928 |
} |
| 929 |
} |
| 930 |
|
| 931 |
source_set("spvtools_util_cli_consumer") { |
| 932 |
sources = [ |
| 933 |
"tools/util/cli_consumer.cpp", |
| 934 |
"tools/util/cli_consumer.h", |
| 935 |
] |
| 936 |
deps = [ |
| 937 |
":spvtools_headers", |
| 938 |
] |
| 939 |
configs += [ ":spvtools_internal_config" ] |
| 940 |
} |
| 941 |
|
| 942 |
source_set("spvtools_software_version") { |
| 943 |
sources = [ |
| 944 |
"source/software_version.cpp", |
| 945 |
] |
| 946 |
deps = [ |
| 947 |
":spvtools_build_version", |
| 948 |
":spvtools_headers", |
| 949 |
] |
| 950 |
configs += [ ":spvtools_internal_config" ] |
| 951 |
} |
| 952 |
|
| 953 |
executable("spirv-as") { |
| 954 |
sources = [ |
| 955 |
"tools/as/as.cpp", |
| 956 |
] |
| 957 |
deps = [ |
| 958 |
":spvtools", |
| 959 |
":spvtools_software_version", |
| 960 |
] |
| 961 |
configs += [ ":spvtools_internal_config" ] |
| 962 |
} |
| 963 |
|
| 964 |
executable("spirv-dis") { |
| 965 |
sources = [ |
| 966 |
"tools/dis/dis.cpp", |
| 967 |
] |
| 968 |
deps = [ |
| 969 |
":spvtools", |
| 970 |
":spvtools_software_version", |
| 971 |
] |
| 972 |
configs += [ ":spvtools_internal_config" ] |
| 973 |
} |
| 974 |
|
| 975 |
executable("spirv-val") { |
| 976 |
sources = [ |
| 977 |
"tools/val/val.cpp", |
| 978 |
] |
| 979 |
deps = [ |
| 980 |
":spvtools", |
| 981 |
":spvtools_software_version", |
| 982 |
":spvtools_util_cli_consumer", |
| 983 |
":spvtools_val", |
| 984 |
] |
| 985 |
configs += [ ":spvtools_internal_config" ] |
| 986 |
} |
| 987 |
|
| 988 |
executable("spirv-cfg") { |
| 989 |
sources = [ |
| 990 |
"tools/cfg/bin_to_dot.cpp", |
| 991 |
"tools/cfg/bin_to_dot.h", |
| 992 |
"tools/cfg/cfg.cpp", |
| 993 |
] |
| 994 |
deps = [ |
| 995 |
":spvtools", |
| 996 |
":spvtools_software_version", |
| 997 |
] |
| 998 |
configs += [ ":spvtools_internal_config" ] |
| 999 |
} |
| 1000 |
|
| 1001 |
executable("spirv-opt") { |
| 1002 |
sources = [ |
| 1003 |
"tools/opt/opt.cpp", |
| 1004 |
] |
| 1005 |
deps = [ |
| 1006 |
":spvtools", |
| 1007 |
":spvtools_opt", |
| 1008 |
":spvtools_software_version", |
| 1009 |
":spvtools_util_cli_consumer", |
| 1010 |
":spvtools_val", |
| 1011 |
] |
| 1012 |
configs += [ ":spvtools_internal_config" ] |
| 1013 |
} |
| 1014 |
|
| 1015 |
executable("spirv-link") { |
| 1016 |
sources = [ |
| 1017 |
"tools/link/linker.cpp", |
| 1018 |
] |
| 1019 |
deps = [ |
| 1020 |
":spvtools", |
| 1021 |
":spvtools_link", |
| 1022 |
":spvtools_opt", |
| 1023 |
":spvtools_software_version", |
| 1024 |
":spvtools_val", |
| 1025 |
] |
| 1026 |
configs += [ ":spvtools_internal_config" ] |
| 1027 |
} |
| 1028 |
|
| 1029 |
if (!is_ios) { |
| 1030 |
# iOS does not allow std::system calls which spirv-reduce requires |
| 1031 |
executable("spirv-reduce") { |
| 1032 |
sources = [ |
| 1033 |
"tools/reduce/reduce.cpp", |
| 1034 |
] |
| 1035 |
deps = [ |
| 1036 |
":spvtools", |
| 1037 |
":spvtools_opt", |
| 1038 |
":spvtools_reduce", |
| 1039 |
":spvtools_software_version", |
| 1040 |
":spvtools_util_cli_consumer", |
| 1041 |
":spvtools_val", |
| 1042 |
] |
| 1043 |
configs += [ ":spvtools_internal_config" ] |
| 1044 |
} |
| 1045 |
} |
| 1046 |
|
| 1047 |
group("all_spirv_tools") { |
| 1048 |
deps = [ |
| 1049 |
":spirv-as", |
| 1050 |
":spirv-cfg", |
| 1051 |
":spirv-dis", |
| 1052 |
":spirv-link", |
| 1053 |
":spirv-opt", |
| 1054 |
":spirv-val", |
| 1055 |
] |
| 1056 |
if (!is_ios) { |
| 1057 |
deps += [ ":spirv-reduce" ] |
| 1058 |
} |
| 1059 |
} |