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 15import("//build_overrides/build.gni") 16import("//build_overrides/spirv_tools.gni") 17if (build_with_chromium) { 18 import("//testing/test.gni") 19 import("//third_party/protobuf/proto_library.gni") 20} 21 22# SPIRV-Tools may be part of multiple projects in the Chromium tree. 23# Only enable building executables if this is the main copy. 24abspath = get_path_info(".", "abspath") 25spvtools_chromium_third_party = (abspath == "//third_party/vulkan-deps/spirv-tools/src/") 26spvtools_build_executables = build_with_chromium && spvtools_chromium_third_party 27# Fuchsia also requires building the executables. 28# TODO(b/158002593): Avoid the use of dependent-specific variables. 29if (defined(is_fuchsia_tree) && is_fuchsia_tree) { 30 spvtools_build_executables = true 31} 32 33spirv_headers = spirv_tools_spirv_headers_dir 34spirv_is_winuwp = is_win && target_os == "winuwp" 35 36template("spvtools_core_tables") { 37 assert(defined(invoker.version), "Need version in $target_name generation.") 38 39 action("spvtools_core_tables_" + target_name) { 40 script = "utils/generate_grammar_tables.py" 41 42 version = invoker.version 43 44 core_json_file = 45 "${spirv_headers}/include/spirv/$version/spirv.core.grammar.json" 46 core_insts_file = "${target_gen_dir}/core.insts-$version.inc" 47 operand_kinds_file = "${target_gen_dir}/operand.kinds-$version.inc" 48 debuginfo_insts_file = 49 "${spirv_headers}/include/spirv/unified1/extinst.debuginfo.grammar.json" 50 cldebuginfo100_insts_file = "${spirv_headers}/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json" 51 52 sources = [ 53 cldebuginfo100_insts_file, 54 core_json_file, 55 debuginfo_insts_file, 56 ] 57 outputs = [ 58 core_insts_file, 59 operand_kinds_file, 60 ] 61 args = [ 62 "--spirv-core-grammar", 63 rebase_path(core_json_file, root_build_dir), 64 "--core-insts-output", 65 rebase_path(core_insts_file, root_build_dir), 66 "--extinst-debuginfo-grammar", 67 rebase_path(debuginfo_insts_file, root_build_dir), 68 "--extinst-cldebuginfo100-grammar", 69 rebase_path(cldebuginfo100_insts_file, root_build_dir), 70 "--operand-kinds-output", 71 rebase_path(operand_kinds_file, root_build_dir), 72 ] 73 } 74} 75 76template("spvtools_core_enums") { 77 assert(defined(invoker.version), "Need version in $target_name generation.") 78 79 action("spvtools_core_enums_" + target_name) { 80 script = "utils/generate_grammar_tables.py" 81 82 version = invoker.version 83 84 core_json_file = 85 "${spirv_headers}/include/spirv/$version/spirv.core.grammar.json" 86 debuginfo_insts_file = 87 "${spirv_headers}/include/spirv/unified1/extinst.debuginfo.grammar.json" 88 cldebuginfo100_insts_file = "${spirv_headers}/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json" 89 90 extension_enum_file = "${target_gen_dir}/extension_enum.inc" 91 extension_map_file = "${target_gen_dir}/enum_string_mapping.inc" 92 93 args = [ 94 "--spirv-core-grammar", 95 rebase_path(core_json_file, root_build_dir), 96 "--extinst-debuginfo-grammar", 97 rebase_path(debuginfo_insts_file, root_build_dir), 98 "--extinst-cldebuginfo100-grammar", 99 rebase_path(cldebuginfo100_insts_file, root_build_dir), 100 "--extension-enum-output", 101 rebase_path(extension_enum_file, root_build_dir), 102 "--enum-string-mapping-output", 103 rebase_path(extension_map_file, root_build_dir), 104 ] 105 inputs = [ 106 core_json_file, 107 debuginfo_insts_file, 108 cldebuginfo100_insts_file, 109 ] 110 outputs = [ 111 extension_enum_file, 112 extension_map_file, 113 ] 114 } 115} 116 117template("spvtools_glsl_tables") { 118 assert(defined(invoker.version), "Need version in $target_name generation.") 119 120 action("spvtools_glsl_tables_" + target_name) { 121 script = "utils/generate_grammar_tables.py" 122 123 version = invoker.version 124 125 core_json_file = 126 "${spirv_headers}/include/spirv/$version/spirv.core.grammar.json" 127 glsl_json_file = "${spirv_headers}/include/spirv/${version}/extinst.glsl.std.450.grammar.json" 128 debuginfo_insts_file = 129 "${spirv_headers}/include/spirv/unified1/extinst.debuginfo.grammar.json" 130 cldebuginfo100_insts_file = "${spirv_headers}/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json" 131 132 glsl_insts_file = "${target_gen_dir}/glsl.std.450.insts.inc" 133 134 args = [ 135 "--spirv-core-grammar", 136 rebase_path(core_json_file, root_build_dir), 137 "--extinst-debuginfo-grammar", 138 rebase_path(debuginfo_insts_file, root_build_dir), 139 "--extinst-cldebuginfo100-grammar", 140 rebase_path(cldebuginfo100_insts_file, root_build_dir), 141 "--extinst-glsl-grammar", 142 rebase_path(glsl_json_file, root_build_dir), 143 "--glsl-insts-output", 144 rebase_path(glsl_insts_file, root_build_dir), 145 ] 146 inputs = [ 147 core_json_file, 148 glsl_json_file, 149 debuginfo_insts_file, 150 cldebuginfo100_insts_file, 151 ] 152 outputs = [ glsl_insts_file ] 153 } 154} 155 156template("spvtools_opencl_tables") { 157 assert(defined(invoker.version), "Need version in $target_name generation.") 158 159 action("spvtools_opencl_tables_" + target_name) { 160 script = "utils/generate_grammar_tables.py" 161 162 version = invoker.version 163 164 core_json_file = 165 "${spirv_headers}/include/spirv/$version/spirv.core.grammar.json" 166 opencl_json_file = "${spirv_headers}/include/spirv/${version}/extinst.opencl.std.100.grammar.json" 167 debuginfo_insts_file = 168 "${spirv_headers}/include/spirv/unified1/extinst.debuginfo.grammar.json" 169 cldebuginfo100_insts_file = "${spirv_headers}/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json" 170 171 opencl_insts_file = "${target_gen_dir}/opencl.std.insts.inc" 172 173 args = [ 174 "--spirv-core-grammar", 175 rebase_path(core_json_file, root_build_dir), 176 "--extinst-debuginfo-grammar", 177 rebase_path(debuginfo_insts_file, root_build_dir), 178 "--extinst-cldebuginfo100-grammar", 179 rebase_path(cldebuginfo100_insts_file, root_build_dir), 180 "--extinst-opencl-grammar", 181 rebase_path(opencl_json_file, root_build_dir), 182 "--opencl-insts-output", 183 rebase_path(opencl_insts_file, root_build_dir), 184 ] 185 inputs = [ 186 core_json_file, 187 opencl_json_file, 188 debuginfo_insts_file, 189 cldebuginfo100_insts_file, 190 ] 191 outputs = [ opencl_insts_file ] 192 } 193} 194 195template("spvtools_language_header") { 196 assert(defined(invoker.name), "Need name in $target_name generation.") 197 198 action("spvtools_language_header_" + target_name) { 199 script = "utils/generate_language_headers.py" 200 201 name = invoker.name 202 extinst_output_path = "${target_gen_dir}/${name}.h" 203 204 args = [ 205 "--extinst-grammar", 206 rebase_path(invoker.grammar_file, root_build_dir), 207 "--extinst-output-path", 208 rebase_path(extinst_output_path, root_build_dir), 209 ] 210 inputs = [ invoker.grammar_file ] 211 outputs = [ "${extinst_output_path}" ] 212 } 213} 214 215template("spvtools_vendor_table") { 216 assert(defined(invoker.name), "Need name in $target_name generation.") 217 218 action("spvtools_vendor_tables_" + target_name) { 219 script = "utils/generate_grammar_tables.py" 220 221 name = invoker.name 222 extinst_vendor_grammar = 223 "${spirv_headers}/include/spirv/unified1/extinst.${name}.grammar.json" 224 extinst_file = "${target_gen_dir}/${name}.insts.inc" 225 226 args = [ 227 "--extinst-vendor-grammar", 228 rebase_path(extinst_vendor_grammar, root_build_dir), 229 "--vendor-insts-output", 230 rebase_path(extinst_file, root_build_dir), 231 "--vendor-operand-kind-prefix", 232 invoker.operand_kind_prefix, 233 ] 234 inputs = [ extinst_vendor_grammar ] 235 outputs = [ extinst_file ] 236 } 237} 238 239action("spvtools_generators_inc") { 240 script = "utils/generate_registry_tables.py" 241 242 # TODO(dsinclair): Make work for chrome 243 xml_file = "${spirv_headers}/include/spirv/spir-v.xml" 244 inc_file = "${target_gen_dir}/generators.inc" 245 246 sources = [ xml_file ] 247 outputs = [ inc_file ] 248 args = [ 249 "--xml", 250 rebase_path(xml_file, root_build_dir), 251 "--generator", 252 rebase_path(inc_file, root_build_dir), 253 ] 254} 255 256action("spvtools_build_version") { 257 script = "utils/update_build_version.py" 258 259 src_dir = "." 260 inc_file = "${target_gen_dir}/build-version.inc" 261 262 outputs = [ inc_file ] 263 args = [ 264 rebase_path(src_dir, root_build_dir), 265 rebase_path(inc_file, root_build_dir), 266 ] 267} 268 269spvtools_core_tables("unified1") { 270 version = "unified1" 271} 272spvtools_core_enums("unified1") { 273 version = "unified1" 274} 275spvtools_glsl_tables("glsl1-0") { 276 version = "1.0" 277} 278spvtools_opencl_tables("opencl1-0") { 279 version = "1.0" 280} 281spvtools_language_header("debuginfo") { 282 name = "DebugInfo" 283 grammar_file = 284 "${spirv_headers}/include/spirv/unified1/extinst.debuginfo.grammar.json" 285} 286spvtools_language_header("cldebuginfo100") { 287 name = "OpenCLDebugInfo100" 288 grammar_file = "${spirv_headers}/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json" 289} 290spvtools_language_header("vkdebuginfo100") { 291 name = "NonSemanticShaderDebugInfo100" 292 grammar_file = "${spirv_headers}/include/spirv/unified1/extinst.nonsemantic.shader.debuginfo.100.grammar.json" 293} 294 295spvtools_vendor_tables = [ 296 [ 297 "spv-amd-shader-explicit-vertex-parameter", 298 "...nil...", 299 ], 300 [ 301 "spv-amd-shader-trinary-minmax", 302 "...nil...", 303 ], 304 [ 305 "spv-amd-gcn-shader", 306 "...nil...", 307 ], 308 [ 309 "spv-amd-shader-ballot", 310 "...nil...", 311 ], 312 [ 313 "debuginfo", 314 "...nil...", 315 ], 316 [ 317 "opencl.debuginfo.100", 318 "CLDEBUG100_", 319 ], 320 [ 321 "nonsemantic.clspvreflection", 322 "...nil...", 323 ], 324 [ 325 "nonsemantic.shader.debuginfo.100", 326 "SHDEBUG100_", 327 ], 328] 329 330foreach(table_def, spvtools_vendor_tables) { 331 spvtools_vendor_table(table_def[0]) { 332 name = table_def[0] 333 operand_kind_prefix = table_def[1] 334 } 335} 336 337config("spvtools_public_config") { 338 include_dirs = [ "include" ] 339} 340 341config("spvtools_include_gen_dirs") { 342 include_dirs = [ "$target_gen_dir" ] 343} 344 345config("spvtools_internal_config") { 346 include_dirs = [ 347 ".", 348 "${spirv_headers}/include", 349 ] 350 351 configs = [ 352 ":spvtools_public_config", 353 ":spvtools_include_gen_dirs", 354 ] 355 356 cflags = [] 357 if (is_clang) { 358 cflags += [ 359 "-Wno-implicit-fallthrough", 360 "-Wno-newline-eof", 361 "-Wno-unreachable-code-break", 362 "-Wno-unreachable-code-return", 363 ] 364 } else if (!is_win) { 365 # Work around a false-positive on a Skia GCC 10 builder. 366 cflags += [ "-Wno-format-truncation" ] 367 } 368} 369 370source_set("spvtools_headers") { 371 sources = [ 372 "include/spirv-tools/instrument.hpp", 373 "include/spirv-tools/libspirv.h", 374 "include/spirv-tools/libspirv.hpp", 375 "include/spirv-tools/linker.hpp", 376 "include/spirv-tools/optimizer.hpp", 377 ] 378 379 public_configs = [ ":spvtools_public_config" ] 380} 381 382group("spvtools_language_headers") { 383 public_deps = [ 384 ":spvtools_language_header_cldebuginfo100", 385 ":spvtools_language_header_debuginfo", 386 ":spvtools_language_header_vkdebuginfo100", 387 ] 388} 389 390static_library("spvtools") { 391 deps = [ 392 ":spvtools_core_tables_unified1", 393 ":spvtools_generators_inc", 394 ":spvtools_glsl_tables_glsl1-0", 395 ":spvtools_language_header_cldebuginfo100", 396 ":spvtools_language_header_debuginfo", 397 ":spvtools_language_header_vkdebuginfo100", 398 ":spvtools_opencl_tables_opencl1-0", 399 ] 400 foreach(table_def, spvtools_vendor_tables) { 401 target_name = table_def[0] 402 deps += [ ":spvtools_vendor_tables_$target_name" ] 403 } 404 405 sources = [ 406 "source/assembly_grammar.cpp", 407 "source/assembly_grammar.h", 408 "source/binary.cpp", 409 "source/binary.h", 410 "source/cfa.h", 411 "source/common_debug_info.h", 412 "source/diagnostic.cpp", 413 "source/diagnostic.h", 414 "source/disassemble.cpp", 415 "source/disassemble.h", 416 "source/enum_set.h", 417 "source/enum_string_mapping.cpp", 418 "source/enum_string_mapping.h", 419 "source/ext_inst.cpp", 420 "source/ext_inst.h", 421 "source/extensions.cpp", 422 "source/extensions.h", 423 "source/instruction.h", 424 "source/latest_version_glsl_std_450_header.h", 425 "source/latest_version_opencl_std_header.h", 426 "source/latest_version_spirv_header.h", 427 "source/libspirv.cpp", 428 "source/macro.h", 429 "source/name_mapper.cpp", 430 "source/name_mapper.h", 431 "source/opcode.cpp", 432 "source/opcode.h", 433 "source/operand.cpp", 434 "source/operand.h", 435 "source/parsed_operand.cpp", 436 "source/parsed_operand.h", 437 "source/print.cpp", 438 "source/print.h", 439 "source/spirv_constant.h", 440 "source/spirv_definition.h", 441 "source/spirv_endian.cpp", 442 "source/spirv_endian.h", 443 "source/spirv_fuzzer_options.cpp", 444 "source/spirv_fuzzer_options.h", 445 "source/spirv_optimizer_options.cpp", 446 "source/spirv_optimizer_options.h", 447 "source/spirv_reducer_options.cpp", 448 "source/spirv_reducer_options.h", 449 "source/spirv_target_env.cpp", 450 "source/spirv_target_env.h", 451 "source/spirv_validator_options.cpp", 452 "source/spirv_validator_options.h", 453 "source/table.cpp", 454 "source/table.h", 455 "source/text.cpp", 456 "source/text.h", 457 "source/text_handler.cpp", 458 "source/text_handler.h", 459 "source/util/bit_vector.cpp", 460 "source/util/bit_vector.h", 461 "source/util/bitutils.h", 462 "source/util/hash_combine.h", 463 "source/util/hex_float.h", 464 "source/util/ilist.h", 465 "source/util/ilist_node.h", 466 "source/util/make_unique.h", 467 "source/util/parse_number.cpp", 468 "source/util/parse_number.h", 469 "source/util/pooled_linked_list.h", 470 "source/util/small_vector.h", 471 "source/util/string_utils.cpp", 472 "source/util/string_utils.h", 473 "source/util/timer.cpp", 474 "source/util/timer.h", 475 ] 476 477 public_deps = [ 478 ":spvtools_core_enums_unified1", 479 ":spvtools_headers", 480 "${spirv_headers}:spv_headers", 481 ] 482 483 if (build_with_chromium) { 484 configs -= [ "//build/config/compiler:chromium_code" ] 485 configs += [ "//build/config/compiler:no_chromium_code" ] 486 } 487 configs += [ ":spvtools_internal_config" ] 488} 489 490static_library("spvtools_val") { 491 sources = [ 492 "source/val/basic_block.cpp", 493 "source/val/basic_block.h", 494 "source/val/construct.cpp", 495 "source/val/construct.h", 496 "source/val/decoration.h", 497 "source/val/function.cpp", 498 "source/val/function.h", 499 "source/val/instruction.cpp", 500 "source/val/validate.cpp", 501 "source/val/validate.h", 502 "source/val/validate_adjacency.cpp", 503 "source/val/validate_annotation.cpp", 504 "source/val/validate_arithmetics.cpp", 505 "source/val/validate_atomics.cpp", 506 "source/val/validate_barriers.cpp", 507 "source/val/validate_bitwise.cpp", 508 "source/val/validate_builtins.cpp", 509 "source/val/validate_capability.cpp", 510 "source/val/validate_cfg.cpp", 511 "source/val/validate_composites.cpp", 512 "source/val/validate_constants.cpp", 513 "source/val/validate_conversion.cpp", 514 "source/val/validate_debug.cpp", 515 "source/val/validate_decorations.cpp", 516 "source/val/validate_derivatives.cpp", 517 "source/val/validate_execution_limitations.cpp", 518 "source/val/validate_extensions.cpp", 519 "source/val/validate_function.cpp", 520 "source/val/validate_id.cpp", 521 "source/val/validate_image.cpp", 522 "source/val/validate_instruction.cpp", 523 "source/val/validate_interfaces.cpp", 524 "source/val/validate_layout.cpp", 525 "source/val/validate_literals.cpp", 526 "source/val/validate_logicals.cpp", 527 "source/val/validate_memory.cpp", 528 "source/val/validate_memory_semantics.cpp", 529 "source/val/validate_memory_semantics.h", 530 "source/val/validate_misc.cpp", 531 "source/val/validate_mode_setting.cpp", 532 "source/val/validate_non_uniform.cpp", 533 "source/val/validate_primitives.cpp", 534 "source/val/validate_scopes.cpp", 535 "source/val/validate_scopes.h", 536 "source/val/validate_small_type_uses.cpp", 537 "source/val/validate_type.cpp", 538 "source/val/validation_state.cpp", 539 "source/val/validation_state.h", 540 ] 541 542 deps = [ 543 ":spvtools", 544 ":spvtools_language_header_cldebuginfo100", 545 ":spvtools_language_header_debuginfo", 546 ":spvtools_language_header_vkdebuginfo100", 547 ] 548 public_deps = [ ":spvtools_headers" ] 549 550 if (build_with_chromium) { 551 configs -= [ "//build/config/compiler:chromium_code" ] 552 configs += [ "//build/config/compiler:no_chromium_code" ] 553 } 554 configs += [ ":spvtools_internal_config" ] 555} 556 557static_library("spvtools_opt") { 558 sources = [ 559 "source/opt/aggressive_dead_code_elim_pass.cpp", 560 "source/opt/aggressive_dead_code_elim_pass.h", 561 "source/opt/amd_ext_to_khr.cpp", 562 "source/opt/amd_ext_to_khr.h", 563 "source/opt/basic_block.cpp", 564 "source/opt/basic_block.h", 565 "source/opt/block_merge_pass.cpp", 566 "source/opt/block_merge_pass.h", 567 "source/opt/block_merge_util.cpp", 568 "source/opt/block_merge_util.h", 569 "source/opt/build_module.cpp", 570 "source/opt/build_module.h", 571 "source/opt/ccp_pass.cpp", 572 "source/opt/ccp_pass.h", 573 "source/opt/cfg.cpp", 574 "source/opt/cfg.h", 575 "source/opt/cfg_cleanup_pass.cpp", 576 "source/opt/cfg_cleanup_pass.h", 577 "source/opt/code_sink.cpp", 578 "source/opt/code_sink.h", 579 "source/opt/combine_access_chains.cpp", 580 "source/opt/combine_access_chains.h", 581 "source/opt/compact_ids_pass.cpp", 582 "source/opt/compact_ids_pass.h", 583 "source/opt/composite.cpp", 584 "source/opt/composite.h", 585 "source/opt/const_folding_rules.cpp", 586 "source/opt/const_folding_rules.h", 587 "source/opt/constants.cpp", 588 "source/opt/constants.h", 589 "source/opt/control_dependence.cpp", 590 "source/opt/control_dependence.h", 591 "source/opt/convert_to_half_pass.cpp", 592 "source/opt/convert_to_half_pass.h", 593 "source/opt/convert_to_sampled_image_pass.cpp", 594 "source/opt/convert_to_sampled_image_pass.h", 595 "source/opt/copy_prop_arrays.cpp", 596 "source/opt/copy_prop_arrays.h", 597 "source/opt/dataflow.cpp", 598 "source/opt/dataflow.h", 599 "source/opt/dead_branch_elim_pass.cpp", 600 "source/opt/dead_branch_elim_pass.h", 601 "source/opt/dead_insert_elim_pass.cpp", 602 "source/opt/dead_insert_elim_pass.h", 603 "source/opt/dead_variable_elimination.cpp", 604 "source/opt/dead_variable_elimination.h", 605 "source/opt/debug_info_manager.cpp", 606 "source/opt/debug_info_manager.h", 607 "source/opt/decoration_manager.cpp", 608 "source/opt/decoration_manager.h", 609 "source/opt/def_use_manager.cpp", 610 "source/opt/def_use_manager.h", 611 "source/opt/desc_sroa.cpp", 612 "source/opt/desc_sroa.h", 613 "source/opt/desc_sroa_util.cpp", 614 "source/opt/desc_sroa_util.h", 615 "source/opt/dominator_analysis.cpp", 616 "source/opt/dominator_analysis.h", 617 "source/opt/dominator_tree.cpp", 618 "source/opt/dominator_tree.h", 619 "source/opt/eliminate_dead_constant_pass.cpp", 620 "source/opt/eliminate_dead_constant_pass.h", 621 "source/opt/eliminate_dead_functions_pass.cpp", 622 "source/opt/eliminate_dead_functions_pass.h", 623 "source/opt/eliminate_dead_functions_util.cpp", 624 "source/opt/eliminate_dead_functions_util.h", 625 "source/opt/eliminate_dead_input_components_pass.cpp", 626 "source/opt/eliminate_dead_input_components_pass.h", 627 "source/opt/eliminate_dead_members_pass.cpp", 628 "source/opt/eliminate_dead_members_pass.h", 629 "source/opt/empty_pass.h", 630 "source/opt/feature_manager.cpp", 631 "source/opt/feature_manager.h", 632 "source/opt/fix_storage_class.cpp", 633 "source/opt/fix_storage_class.h", 634 "source/opt/flatten_decoration_pass.cpp", 635 "source/opt/flatten_decoration_pass.h", 636 "source/opt/fold.cpp", 637 "source/opt/fold.h", 638 "source/opt/fold_spec_constant_op_and_composite_pass.cpp", 639 "source/opt/fold_spec_constant_op_and_composite_pass.h", 640 "source/opt/folding_rules.cpp", 641 "source/opt/folding_rules.h", 642 "source/opt/freeze_spec_constant_value_pass.cpp", 643 "source/opt/freeze_spec_constant_value_pass.h", 644 "source/opt/function.cpp", 645 "source/opt/function.h", 646 "source/opt/graphics_robust_access_pass.cpp", 647 "source/opt/graphics_robust_access_pass.h", 648 "source/opt/if_conversion.cpp", 649 "source/opt/if_conversion.h", 650 "source/opt/inline_exhaustive_pass.cpp", 651 "source/opt/inline_exhaustive_pass.h", 652 "source/opt/inline_opaque_pass.cpp", 653 "source/opt/inline_opaque_pass.h", 654 "source/opt/inline_pass.cpp", 655 "source/opt/inline_pass.h", 656 "source/opt/inst_bindless_check_pass.cpp", 657 "source/opt/inst_bindless_check_pass.h", 658 "source/opt/inst_buff_addr_check_pass.cpp", 659 "source/opt/inst_buff_addr_check_pass.h", 660 "source/opt/inst_debug_printf_pass.cpp", 661 "source/opt/inst_debug_printf_pass.h", 662 "source/opt/instruction.cpp", 663 "source/opt/instruction.h", 664 "source/opt/instruction_list.cpp", 665 "source/opt/instruction_list.h", 666 "source/opt/instrument_pass.cpp", 667 "source/opt/instrument_pass.h", 668 "source/opt/interp_fixup_pass.cpp", 669 "source/opt/interp_fixup_pass.h", 670 "source/opt/ir_builder.h", 671 "source/opt/ir_context.cpp", 672 "source/opt/ir_context.h", 673 "source/opt/ir_loader.cpp", 674 "source/opt/ir_loader.h", 675 "source/opt/iterator.h", 676 "source/opt/licm_pass.cpp", 677 "source/opt/licm_pass.h", 678 "source/opt/local_access_chain_convert_pass.cpp", 679 "source/opt/local_access_chain_convert_pass.h", 680 "source/opt/local_redundancy_elimination.cpp", 681 "source/opt/local_redundancy_elimination.h", 682 "source/opt/local_single_block_elim_pass.cpp", 683 "source/opt/local_single_block_elim_pass.h", 684 "source/opt/local_single_store_elim_pass.cpp", 685 "source/opt/local_single_store_elim_pass.h", 686 "source/opt/log.h", 687 "source/opt/loop_dependence.cpp", 688 "source/opt/loop_dependence.h", 689 "source/opt/loop_dependence_helpers.cpp", 690 "source/opt/loop_descriptor.cpp", 691 "source/opt/loop_descriptor.h", 692 "source/opt/loop_fission.cpp", 693 "source/opt/loop_fission.h", 694 "source/opt/loop_fusion.cpp", 695 "source/opt/loop_fusion.h", 696 "source/opt/loop_fusion_pass.cpp", 697 "source/opt/loop_fusion_pass.h", 698 "source/opt/loop_peeling.cpp", 699 "source/opt/loop_peeling.h", 700 "source/opt/loop_unroller.cpp", 701 "source/opt/loop_unroller.h", 702 "source/opt/loop_unswitch_pass.cpp", 703 "source/opt/loop_unswitch_pass.h", 704 "source/opt/loop_utils.cpp", 705 "source/opt/loop_utils.h", 706 "source/opt/mem_pass.cpp", 707 "source/opt/mem_pass.h", 708 "source/opt/merge_return_pass.cpp", 709 "source/opt/merge_return_pass.h", 710 "source/opt/module.cpp", 711 "source/opt/module.h", 712 "source/opt/null_pass.h", 713 "source/opt/optimizer.cpp", 714 "source/opt/pass.cpp", 715 "source/opt/pass.h", 716 "source/opt/pass_manager.cpp", 717 "source/opt/pass_manager.h", 718 "source/opt/passes.h", 719 "source/opt/private_to_local_pass.cpp", 720 "source/opt/private_to_local_pass.h", 721 "source/opt/propagator.cpp", 722 "source/opt/propagator.h", 723 "source/opt/reduce_load_size.cpp", 724 "source/opt/reduce_load_size.h", 725 "source/opt/redundancy_elimination.cpp", 726 "source/opt/redundancy_elimination.h", 727 "source/opt/reflect.h", 728 "source/opt/register_pressure.cpp", 729 "source/opt/register_pressure.h", 730 "source/opt/relax_float_ops_pass.cpp", 731 "source/opt/relax_float_ops_pass.h", 732 "source/opt/remove_dontinline_pass.cpp", 733 "source/opt/remove_dontinline_pass.h", 734 "source/opt/remove_duplicates_pass.cpp", 735 "source/opt/remove_duplicates_pass.h", 736 "source/opt/remove_unused_interface_variables_pass.cpp", 737 "source/opt/remove_unused_interface_variables_pass.h", 738 "source/opt/replace_desc_array_access_using_var_index.cpp", 739 "source/opt/replace_desc_array_access_using_var_index.h", 740 "source/opt/replace_invalid_opc.cpp", 741 "source/opt/replace_invalid_opc.h", 742 "source/opt/scalar_analysis.cpp", 743 "source/opt/scalar_analysis.h", 744 "source/opt/scalar_analysis_nodes.h", 745 "source/opt/scalar_analysis_simplification.cpp", 746 "source/opt/scalar_replacement_pass.cpp", 747 "source/opt/scalar_replacement_pass.h", 748 "source/opt/set_spec_constant_default_value_pass.cpp", 749 "source/opt/set_spec_constant_default_value_pass.h", 750 "source/opt/simplification_pass.cpp", 751 "source/opt/simplification_pass.h", 752 "source/opt/spread_volatile_semantics.cpp", 753 "source/opt/spread_volatile_semantics.h", 754 "source/opt/ssa_rewrite_pass.cpp", 755 "source/opt/ssa_rewrite_pass.h", 756 "source/opt/strength_reduction_pass.cpp", 757 "source/opt/strength_reduction_pass.h", 758 "source/opt/strip_debug_info_pass.cpp", 759 "source/opt/strip_debug_info_pass.h", 760 "source/opt/strip_nonsemantic_info_pass.cpp", 761 "source/opt/strip_nonsemantic_info_pass.h", 762 "source/opt/struct_cfg_analysis.cpp", 763 "source/opt/struct_cfg_analysis.h", 764 "source/opt/tree_iterator.h", 765 "source/opt/type_manager.cpp", 766 "source/opt/type_manager.h", 767 "source/opt/types.cpp", 768 "source/opt/types.h", 769 "source/opt/unify_const_pass.cpp", 770 "source/opt/unify_const_pass.h", 771 "source/opt/upgrade_memory_model.cpp", 772 "source/opt/upgrade_memory_model.h", 773 "source/opt/value_number_table.cpp", 774 "source/opt/value_number_table.h", 775 "source/opt/vector_dce.cpp", 776 "source/opt/vector_dce.h", 777 "source/opt/workaround1209.cpp", 778 "source/opt/workaround1209.h", 779 "source/opt/wrap_opkill.cpp", 780 "source/opt/wrap_opkill.h", 781 ] 782 783 deps = [ 784 ":spvtools", 785 ":spvtools_language_header_debuginfo", 786 ":spvtools_vendor_tables_spv-amd-shader-ballot", 787 ] 788 public_deps = [ 789 ":spvtools_headers", 790 ":spvtools_language_header_cldebuginfo100", 791 ":spvtools_language_header_vkdebuginfo100", 792 ] 793 794 if (build_with_chromium) { 795 configs -= [ "//build/config/compiler:chromium_code" ] 796 configs += [ "//build/config/compiler:no_chromium_code" ] 797 } 798 configs += [ ":spvtools_internal_config" ] 799} 800 801static_library("spvtools_link") { 802 sources = [ "source/link/linker.cpp" ] 803 deps = [ 804 ":spvtools", 805 ":spvtools_opt", 806 ":spvtools_val", 807 ] 808 public_deps = [ ":spvtools_headers" ] 809 if (build_with_chromium) { 810 configs -= [ "//build/config/compiler:chromium_code" ] 811 configs += [ "//build/config/compiler:no_chromium_code" ] 812 } 813 configs += [ ":spvtools_internal_config" ] 814} 815 816static_library("spvtools_reduce") { 817 sources = [ 818 "source/reduce/change_operand_reduction_opportunity.cpp", 819 "source/reduce/change_operand_reduction_opportunity.h", 820 "source/reduce/change_operand_to_undef_reduction_opportunity.cpp", 821 "source/reduce/change_operand_to_undef_reduction_opportunity.h", 822 "source/reduce/conditional_branch_to_simple_conditional_branch_opportunity_finder.cpp", 823 "source/reduce/conditional_branch_to_simple_conditional_branch_opportunity_finder.h", 824 "source/reduce/conditional_branch_to_simple_conditional_branch_reduction_opportunity.cpp", 825 "source/reduce/conditional_branch_to_simple_conditional_branch_reduction_opportunity.h", 826 "source/reduce/merge_blocks_reduction_opportunity.cpp", 827 "source/reduce/merge_blocks_reduction_opportunity.h", 828 "source/reduce/merge_blocks_reduction_opportunity_finder.cpp", 829 "source/reduce/merge_blocks_reduction_opportunity_finder.h", 830 "source/reduce/operand_to_const_reduction_opportunity_finder.cpp", 831 "source/reduce/operand_to_const_reduction_opportunity_finder.h", 832 "source/reduce/operand_to_dominating_id_reduction_opportunity_finder.cpp", 833 "source/reduce/operand_to_dominating_id_reduction_opportunity_finder.h", 834 "source/reduce/operand_to_undef_reduction_opportunity_finder.cpp", 835 "source/reduce/operand_to_undef_reduction_opportunity_finder.h", 836 "source/reduce/reducer.cpp", 837 "source/reduce/reducer.h", 838 "source/reduce/reduction_opportunity.cpp", 839 "source/reduce/reduction_opportunity.h", 840 "source/reduce/reduction_opportunity_finder.cpp", 841 "source/reduce/reduction_opportunity_finder.h", 842 "source/reduce/reduction_pass.cpp", 843 "source/reduce/reduction_pass.h", 844 "source/reduce/reduction_util.cpp", 845 "source/reduce/reduction_util.h", 846 "source/reduce/remove_block_reduction_opportunity.cpp", 847 "source/reduce/remove_block_reduction_opportunity.h", 848 "source/reduce/remove_block_reduction_opportunity_finder.cpp", 849 "source/reduce/remove_block_reduction_opportunity_finder.h", 850 "source/reduce/remove_function_reduction_opportunity.cpp", 851 "source/reduce/remove_function_reduction_opportunity.h", 852 "source/reduce/remove_function_reduction_opportunity_finder.cpp", 853 "source/reduce/remove_function_reduction_opportunity_finder.h", 854 "source/reduce/remove_instruction_reduction_opportunity.cpp", 855 "source/reduce/remove_instruction_reduction_opportunity.h", 856 "source/reduce/remove_selection_reduction_opportunity.cpp", 857 "source/reduce/remove_selection_reduction_opportunity.h", 858 "source/reduce/remove_selection_reduction_opportunity_finder.cpp", 859 "source/reduce/remove_selection_reduction_opportunity_finder.h", 860 "source/reduce/remove_struct_member_reduction_opportunity.cpp", 861 "source/reduce/remove_struct_member_reduction_opportunity.h", 862 "source/reduce/remove_unused_instruction_reduction_opportunity_finder.cpp", 863 "source/reduce/remove_unused_instruction_reduction_opportunity_finder.h", 864 "source/reduce/remove_unused_struct_member_reduction_opportunity_finder.cpp", 865 "source/reduce/remove_unused_struct_member_reduction_opportunity_finder.h", 866 "source/reduce/simple_conditional_branch_to_branch_opportunity_finder.cpp", 867 "source/reduce/simple_conditional_branch_to_branch_opportunity_finder.h", 868 "source/reduce/simple_conditional_branch_to_branch_reduction_opportunity.cpp", 869 "source/reduce/simple_conditional_branch_to_branch_reduction_opportunity.h", 870 "source/reduce/structured_construct_to_block_reduction_opportunity.cpp", 871 "source/reduce/structured_construct_to_block_reduction_opportunity.h", 872 "source/reduce/structured_construct_to_block_reduction_opportunity_finder.cpp", 873 "source/reduce/structured_construct_to_block_reduction_opportunity_finder.h", 874 "source/reduce/structured_loop_to_selection_reduction_opportunity.cpp", 875 "source/reduce/structured_loop_to_selection_reduction_opportunity.h", 876 "source/reduce/structured_loop_to_selection_reduction_opportunity_finder.cpp", 877 "source/reduce/structured_loop_to_selection_reduction_opportunity_finder.h", 878 ] 879 deps = [ 880 ":spvtools", 881 ":spvtools_opt", 882 ] 883 public_deps = [ ":spvtools_headers" ] 884 if (build_with_chromium) { 885 configs -= [ "//build/config/compiler:chromium_code" ] 886 configs += [ "//build/config/compiler:no_chromium_code" ] 887 } 888 configs += [ ":spvtools_internal_config" ] 889} 890 891if (build_with_chromium && spvtools_build_executables) { 892 # The spirv-fuzz library is only built when in a Chromium checkout 893 # due to its dependency on protobuf. 894 895 proto_library("spvtools_fuzz_proto") { 896 sources = [ "source/fuzz/protobufs/spvtoolsfuzz.proto" ] 897 generate_python = false 898 use_protobuf_full = true 899 } 900 901 static_library("spvtools_fuzz") { 902 sources = [ 903 "source/fuzz/added_function_reducer.cpp", 904 "source/fuzz/added_function_reducer.h", 905 "source/fuzz/available_instructions.cpp", 906 "source/fuzz/available_instructions.h", 907 "source/fuzz/call_graph.cpp", 908 "source/fuzz/call_graph.h", 909 "source/fuzz/comparator_deep_blocks_first.h", 910 "source/fuzz/counter_overflow_id_source.cpp", 911 "source/fuzz/counter_overflow_id_source.h", 912 "source/fuzz/data_descriptor.cpp", 913 "source/fuzz/data_descriptor.h", 914 "source/fuzz/equivalence_relation.h", 915 "source/fuzz/fact_manager/constant_uniform_facts.cpp", 916 "source/fuzz/fact_manager/constant_uniform_facts.h", 917 "source/fuzz/fact_manager/data_synonym_and_id_equation_facts.cpp", 918 "source/fuzz/fact_manager/data_synonym_and_id_equation_facts.h", 919 "source/fuzz/fact_manager/dead_block_facts.cpp", 920 "source/fuzz/fact_manager/dead_block_facts.h", 921 "source/fuzz/fact_manager/fact_manager.cpp", 922 "source/fuzz/fact_manager/fact_manager.h", 923 "source/fuzz/fact_manager/irrelevant_value_facts.cpp", 924 "source/fuzz/fact_manager/irrelevant_value_facts.h", 925 "source/fuzz/fact_manager/livesafe_function_facts.cpp", 926 "source/fuzz/fact_manager/livesafe_function_facts.h", 927 "source/fuzz/force_render_red.cpp", 928 "source/fuzz/force_render_red.h", 929 "source/fuzz/fuzzer.cpp", 930 "source/fuzz/fuzzer.h", 931 "source/fuzz/fuzzer_context.cpp", 932 "source/fuzz/fuzzer_context.h", 933 "source/fuzz/fuzzer_pass.cpp", 934 "source/fuzz/fuzzer_pass.h", 935 "source/fuzz/fuzzer_pass_add_access_chains.cpp", 936 "source/fuzz/fuzzer_pass_add_access_chains.h", 937 "source/fuzz/fuzzer_pass_add_bit_instruction_synonyms.cpp", 938 "source/fuzz/fuzzer_pass_add_bit_instruction_synonyms.h", 939 "source/fuzz/fuzzer_pass_add_composite_extract.cpp", 940 "source/fuzz/fuzzer_pass_add_composite_extract.h", 941 "source/fuzz/fuzzer_pass_add_composite_inserts.cpp", 942 "source/fuzz/fuzzer_pass_add_composite_inserts.h", 943 "source/fuzz/fuzzer_pass_add_composite_types.cpp", 944 "source/fuzz/fuzzer_pass_add_composite_types.h", 945 "source/fuzz/fuzzer_pass_add_copy_memory.cpp", 946 "source/fuzz/fuzzer_pass_add_copy_memory.h", 947 "source/fuzz/fuzzer_pass_add_dead_blocks.cpp", 948 "source/fuzz/fuzzer_pass_add_dead_blocks.h", 949 "source/fuzz/fuzzer_pass_add_dead_breaks.cpp", 950 "source/fuzz/fuzzer_pass_add_dead_breaks.h", 951 "source/fuzz/fuzzer_pass_add_dead_continues.cpp", 952 "source/fuzz/fuzzer_pass_add_dead_continues.h", 953 "source/fuzz/fuzzer_pass_add_equation_instructions.cpp", 954 "source/fuzz/fuzzer_pass_add_equation_instructions.h", 955 "source/fuzz/fuzzer_pass_add_function_calls.cpp", 956 "source/fuzz/fuzzer_pass_add_function_calls.h", 957 "source/fuzz/fuzzer_pass_add_global_variables.cpp", 958 "source/fuzz/fuzzer_pass_add_global_variables.h", 959 "source/fuzz/fuzzer_pass_add_image_sample_unused_components.cpp", 960 "source/fuzz/fuzzer_pass_add_image_sample_unused_components.h", 961 "source/fuzz/fuzzer_pass_add_loads.cpp", 962 "source/fuzz/fuzzer_pass_add_loads.h", 963 "source/fuzz/fuzzer_pass_add_local_variables.cpp", 964 "source/fuzz/fuzzer_pass_add_local_variables.h", 965 "source/fuzz/fuzzer_pass_add_loop_preheaders.cpp", 966 "source/fuzz/fuzzer_pass_add_loop_preheaders.h", 967 "source/fuzz/fuzzer_pass_add_loops_to_create_int_constant_synonyms.cpp", 968 "source/fuzz/fuzzer_pass_add_loops_to_create_int_constant_synonyms.h", 969 "source/fuzz/fuzzer_pass_add_no_contraction_decorations.cpp", 970 "source/fuzz/fuzzer_pass_add_no_contraction_decorations.h", 971 "source/fuzz/fuzzer_pass_add_opphi_synonyms.cpp", 972 "source/fuzz/fuzzer_pass_add_opphi_synonyms.h", 973 "source/fuzz/fuzzer_pass_add_parameters.cpp", 974 "source/fuzz/fuzzer_pass_add_parameters.h", 975 "source/fuzz/fuzzer_pass_add_relaxed_decorations.cpp", 976 "source/fuzz/fuzzer_pass_add_relaxed_decorations.h", 977 "source/fuzz/fuzzer_pass_add_stores.cpp", 978 "source/fuzz/fuzzer_pass_add_stores.h", 979 "source/fuzz/fuzzer_pass_add_synonyms.cpp", 980 "source/fuzz/fuzzer_pass_add_synonyms.h", 981 "source/fuzz/fuzzer_pass_add_vector_shuffle_instructions.cpp", 982 "source/fuzz/fuzzer_pass_add_vector_shuffle_instructions.h", 983 "source/fuzz/fuzzer_pass_adjust_branch_weights.cpp", 984 "source/fuzz/fuzzer_pass_adjust_branch_weights.h", 985 "source/fuzz/fuzzer_pass_adjust_function_controls.cpp", 986 "source/fuzz/fuzzer_pass_adjust_function_controls.h", 987 "source/fuzz/fuzzer_pass_adjust_loop_controls.cpp", 988 "source/fuzz/fuzzer_pass_adjust_loop_controls.h", 989 "source/fuzz/fuzzer_pass_adjust_memory_operands_masks.cpp", 990 "source/fuzz/fuzzer_pass_adjust_memory_operands_masks.h", 991 "source/fuzz/fuzzer_pass_adjust_selection_controls.cpp", 992 "source/fuzz/fuzzer_pass_adjust_selection_controls.h", 993 "source/fuzz/fuzzer_pass_apply_id_synonyms.cpp", 994 "source/fuzz/fuzzer_pass_apply_id_synonyms.h", 995 "source/fuzz/fuzzer_pass_construct_composites.cpp", 996 "source/fuzz/fuzzer_pass_construct_composites.h", 997 "source/fuzz/fuzzer_pass_copy_objects.cpp", 998 "source/fuzz/fuzzer_pass_copy_objects.h", 999 "source/fuzz/fuzzer_pass_donate_modules.cpp", 1000 "source/fuzz/fuzzer_pass_donate_modules.h", 1001 "source/fuzz/fuzzer_pass_duplicate_regions_with_selections.cpp", 1002 "source/fuzz/fuzzer_pass_duplicate_regions_with_selections.h", 1003 "source/fuzz/fuzzer_pass_expand_vector_reductions.cpp", 1004 "source/fuzz/fuzzer_pass_expand_vector_reductions.h", 1005 "source/fuzz/fuzzer_pass_flatten_conditional_branches.cpp", 1006 "source/fuzz/fuzzer_pass_flatten_conditional_branches.h", 1007 "source/fuzz/fuzzer_pass_inline_functions.cpp", 1008 "source/fuzz/fuzzer_pass_inline_functions.h", 1009 "source/fuzz/fuzzer_pass_interchange_signedness_of_integer_operands.cpp", 1010 "source/fuzz/fuzzer_pass_interchange_signedness_of_integer_operands.h", 1011 "source/fuzz/fuzzer_pass_interchange_zero_like_constants.cpp", 1012 "source/fuzz/fuzzer_pass_interchange_zero_like_constants.h", 1013 "source/fuzz/fuzzer_pass_invert_comparison_operators.cpp", 1014 "source/fuzz/fuzzer_pass_invert_comparison_operators.h", 1015 "source/fuzz/fuzzer_pass_make_vector_operations_dynamic.cpp", 1016 "source/fuzz/fuzzer_pass_make_vector_operations_dynamic.h", 1017 "source/fuzz/fuzzer_pass_merge_blocks.cpp", 1018 "source/fuzz/fuzzer_pass_merge_blocks.h", 1019 "source/fuzz/fuzzer_pass_merge_function_returns.cpp", 1020 "source/fuzz/fuzzer_pass_merge_function_returns.h", 1021 "source/fuzz/fuzzer_pass_mutate_pointers.cpp", 1022 "source/fuzz/fuzzer_pass_mutate_pointers.h", 1023 "source/fuzz/fuzzer_pass_obfuscate_constants.cpp", 1024 "source/fuzz/fuzzer_pass_obfuscate_constants.h", 1025 "source/fuzz/fuzzer_pass_outline_functions.cpp", 1026 "source/fuzz/fuzzer_pass_outline_functions.h", 1027 "source/fuzz/fuzzer_pass_permute_blocks.cpp", 1028 "source/fuzz/fuzzer_pass_permute_blocks.h", 1029 "source/fuzz/fuzzer_pass_permute_function_parameters.cpp", 1030 "source/fuzz/fuzzer_pass_permute_function_parameters.h", 1031 "source/fuzz/fuzzer_pass_permute_function_variables.cpp", 1032 "source/fuzz/fuzzer_pass_permute_function_variables.h", 1033 "source/fuzz/fuzzer_pass_permute_instructions.cpp", 1034 "source/fuzz/fuzzer_pass_permute_instructions.h", 1035 "source/fuzz/fuzzer_pass_permute_phi_operands.cpp", 1036 "source/fuzz/fuzzer_pass_permute_phi_operands.h", 1037 "source/fuzz/fuzzer_pass_propagate_instructions_down.cpp", 1038 "source/fuzz/fuzzer_pass_propagate_instructions_down.h", 1039 "source/fuzz/fuzzer_pass_propagate_instructions_up.cpp", 1040 "source/fuzz/fuzzer_pass_propagate_instructions_up.h", 1041 "source/fuzz/fuzzer_pass_push_ids_through_variables.cpp", 1042 "source/fuzz/fuzzer_pass_push_ids_through_variables.h", 1043 "source/fuzz/fuzzer_pass_replace_adds_subs_muls_with_carrying_extended.cpp", 1044 "source/fuzz/fuzzer_pass_replace_adds_subs_muls_with_carrying_extended.h", 1045 "source/fuzz/fuzzer_pass_replace_branches_from_dead_blocks_with_exits.cpp", 1046 "source/fuzz/fuzzer_pass_replace_branches_from_dead_blocks_with_exits.h", 1047 "source/fuzz/fuzzer_pass_replace_copy_memories_with_loads_stores.cpp", 1048 "source/fuzz/fuzzer_pass_replace_copy_memories_with_loads_stores.h", 1049 "source/fuzz/fuzzer_pass_replace_copy_objects_with_stores_loads.cpp", 1050 "source/fuzz/fuzzer_pass_replace_copy_objects_with_stores_loads.h", 1051 "source/fuzz/fuzzer_pass_replace_irrelevant_ids.cpp", 1052 "source/fuzz/fuzzer_pass_replace_irrelevant_ids.h", 1053 "source/fuzz/fuzzer_pass_replace_linear_algebra_instructions.cpp", 1054 "source/fuzz/fuzzer_pass_replace_linear_algebra_instructions.h", 1055 "source/fuzz/fuzzer_pass_replace_loads_stores_with_copy_memories.cpp", 1056 "source/fuzz/fuzzer_pass_replace_loads_stores_with_copy_memories.h", 1057 "source/fuzz/fuzzer_pass_replace_opphi_ids_from_dead_predecessors.cpp", 1058 "source/fuzz/fuzzer_pass_replace_opphi_ids_from_dead_predecessors.h", 1059 "source/fuzz/fuzzer_pass_replace_opselects_with_conditional_branches.cpp", 1060 "source/fuzz/fuzzer_pass_replace_opselects_with_conditional_branches.h", 1061 "source/fuzz/fuzzer_pass_replace_parameter_with_global.cpp", 1062 "source/fuzz/fuzzer_pass_replace_parameter_with_global.h", 1063 "source/fuzz/fuzzer_pass_replace_params_with_struct.cpp", 1064 "source/fuzz/fuzzer_pass_replace_params_with_struct.h", 1065 "source/fuzz/fuzzer_pass_split_blocks.cpp", 1066 "source/fuzz/fuzzer_pass_split_blocks.h", 1067 "source/fuzz/fuzzer_pass_swap_commutable_operands.cpp", 1068 "source/fuzz/fuzzer_pass_swap_commutable_operands.h", 1069 "source/fuzz/fuzzer_pass_swap_conditional_branch_operands.cpp", 1070 "source/fuzz/fuzzer_pass_swap_conditional_branch_operands.h", 1071 "source/fuzz/fuzzer_pass_swap_functions.cpp", 1072 "source/fuzz/fuzzer_pass_swap_functions.h", 1073 "source/fuzz/fuzzer_pass_toggle_access_chain_instruction.cpp", 1074 "source/fuzz/fuzzer_pass_toggle_access_chain_instruction.h", 1075 "source/fuzz/fuzzer_pass_wrap_regions_in_selections.cpp", 1076 "source/fuzz/fuzzer_pass_wrap_regions_in_selections.h", 1077 "source/fuzz/fuzzer_pass_wrap_vector_synonym.cpp", 1078 "source/fuzz/fuzzer_pass_wrap_vector_synonym.h", 1079 "source/fuzz/fuzzer_util.cpp", 1080 "source/fuzz/fuzzer_util.h", 1081 "source/fuzz/id_use_descriptor.cpp", 1082 "source/fuzz/id_use_descriptor.h", 1083 "source/fuzz/instruction_descriptor.cpp", 1084 "source/fuzz/instruction_descriptor.h", 1085 "source/fuzz/instruction_message.cpp", 1086 "source/fuzz/instruction_message.h", 1087 "source/fuzz/overflow_id_source.cpp", 1088 "source/fuzz/overflow_id_source.h", 1089 "source/fuzz/pass_management/repeated_pass_instances.h", 1090 "source/fuzz/pass_management/repeated_pass_manager.cpp", 1091 "source/fuzz/pass_management/repeated_pass_manager.h", 1092 "source/fuzz/pass_management/repeated_pass_manager_looped_with_recommendations.cpp", 1093 "source/fuzz/pass_management/repeated_pass_manager_looped_with_recommendations.h", 1094 "source/fuzz/pass_management/repeated_pass_manager_random_with_recommendations.cpp", 1095 "source/fuzz/pass_management/repeated_pass_manager_random_with_recommendations.h", 1096 "source/fuzz/pass_management/repeated_pass_manager_simple.cpp", 1097 "source/fuzz/pass_management/repeated_pass_manager_simple.h", 1098 "source/fuzz/pass_management/repeated_pass_recommender.cpp", 1099 "source/fuzz/pass_management/repeated_pass_recommender.h", 1100 "source/fuzz/pass_management/repeated_pass_recommender_standard.cpp", 1101 "source/fuzz/pass_management/repeated_pass_recommender_standard.h", 1102 "source/fuzz/protobufs/spirvfuzz_protobufs.h", 1103 "source/fuzz/pseudo_random_generator.cpp", 1104 "source/fuzz/pseudo_random_generator.h", 1105 "source/fuzz/random_generator.cpp", 1106 "source/fuzz/random_generator.h", 1107 "source/fuzz/replayer.cpp", 1108 "source/fuzz/replayer.h", 1109 "source/fuzz/shrinker.cpp", 1110 "source/fuzz/shrinker.h", 1111 "source/fuzz/transformation.cpp", 1112 "source/fuzz/transformation.h", 1113 "source/fuzz/transformation_access_chain.cpp", 1114 "source/fuzz/transformation_access_chain.h", 1115 "source/fuzz/transformation_add_bit_instruction_synonym.cpp", 1116 "source/fuzz/transformation_add_bit_instruction_synonym.h", 1117 "source/fuzz/transformation_add_constant_boolean.cpp", 1118 "source/fuzz/transformation_add_constant_boolean.h", 1119 "source/fuzz/transformation_add_constant_composite.cpp", 1120 "source/fuzz/transformation_add_constant_composite.h", 1121 "source/fuzz/transformation_add_constant_null.cpp", 1122 "source/fuzz/transformation_add_constant_null.h", 1123 "source/fuzz/transformation_add_constant_scalar.cpp", 1124 "source/fuzz/transformation_add_constant_scalar.h", 1125 "source/fuzz/transformation_add_copy_memory.cpp", 1126 "source/fuzz/transformation_add_copy_memory.h", 1127 "source/fuzz/transformation_add_dead_block.cpp", 1128 "source/fuzz/transformation_add_dead_block.h", 1129 "source/fuzz/transformation_add_dead_break.cpp", 1130 "source/fuzz/transformation_add_dead_break.h", 1131 "source/fuzz/transformation_add_dead_continue.cpp", 1132 "source/fuzz/transformation_add_dead_continue.h", 1133 "source/fuzz/transformation_add_early_terminator_wrapper.cpp", 1134 "source/fuzz/transformation_add_early_terminator_wrapper.h", 1135 "source/fuzz/transformation_add_function.cpp", 1136 "source/fuzz/transformation_add_function.h", 1137 "source/fuzz/transformation_add_global_undef.cpp", 1138 "source/fuzz/transformation_add_global_undef.h", 1139 "source/fuzz/transformation_add_global_variable.cpp", 1140 "source/fuzz/transformation_add_global_variable.h", 1141 "source/fuzz/transformation_add_image_sample_unused_components.cpp", 1142 "source/fuzz/transformation_add_image_sample_unused_components.h", 1143 "source/fuzz/transformation_add_local_variable.cpp", 1144 "source/fuzz/transformation_add_local_variable.h", 1145 "source/fuzz/transformation_add_loop_preheader.cpp", 1146 "source/fuzz/transformation_add_loop_preheader.h", 1147 "source/fuzz/transformation_add_loop_to_create_int_constant_synonym.cpp", 1148 "source/fuzz/transformation_add_loop_to_create_int_constant_synonym.h", 1149 "source/fuzz/transformation_add_no_contraction_decoration.cpp", 1150 "source/fuzz/transformation_add_no_contraction_decoration.h", 1151 "source/fuzz/transformation_add_opphi_synonym.cpp", 1152 "source/fuzz/transformation_add_opphi_synonym.h", 1153 "source/fuzz/transformation_add_parameter.cpp", 1154 "source/fuzz/transformation_add_parameter.h", 1155 "source/fuzz/transformation_add_relaxed_decoration.cpp", 1156 "source/fuzz/transformation_add_relaxed_decoration.h", 1157 "source/fuzz/transformation_add_spec_constant_op.cpp", 1158 "source/fuzz/transformation_add_spec_constant_op.h", 1159 "source/fuzz/transformation_add_synonym.cpp", 1160 "source/fuzz/transformation_add_synonym.h", 1161 "source/fuzz/transformation_add_type_array.cpp", 1162 "source/fuzz/transformation_add_type_array.h", 1163 "source/fuzz/transformation_add_type_boolean.cpp", 1164 "source/fuzz/transformation_add_type_boolean.h", 1165 "source/fuzz/transformation_add_type_float.cpp", 1166 "source/fuzz/transformation_add_type_float.h", 1167 "source/fuzz/transformation_add_type_function.cpp", 1168 "source/fuzz/transformation_add_type_function.h", 1169 "source/fuzz/transformation_add_type_int.cpp", 1170 "source/fuzz/transformation_add_type_int.h", 1171 "source/fuzz/transformation_add_type_matrix.cpp", 1172 "source/fuzz/transformation_add_type_matrix.h", 1173 "source/fuzz/transformation_add_type_pointer.cpp", 1174 "source/fuzz/transformation_add_type_pointer.h", 1175 "source/fuzz/transformation_add_type_struct.cpp", 1176 "source/fuzz/transformation_add_type_struct.h", 1177 "source/fuzz/transformation_add_type_vector.cpp", 1178 "source/fuzz/transformation_add_type_vector.h", 1179 "source/fuzz/transformation_adjust_branch_weights.cpp", 1180 "source/fuzz/transformation_adjust_branch_weights.h", 1181 "source/fuzz/transformation_composite_construct.cpp", 1182 "source/fuzz/transformation_composite_construct.h", 1183 "source/fuzz/transformation_composite_extract.cpp", 1184 "source/fuzz/transformation_composite_extract.h", 1185 "source/fuzz/transformation_composite_insert.cpp", 1186 "source/fuzz/transformation_composite_insert.h", 1187 "source/fuzz/transformation_compute_data_synonym_fact_closure.cpp", 1188 "source/fuzz/transformation_compute_data_synonym_fact_closure.h", 1189 "source/fuzz/transformation_context.cpp", 1190 "source/fuzz/transformation_context.h", 1191 "source/fuzz/transformation_duplicate_region_with_selection.cpp", 1192 "source/fuzz/transformation_duplicate_region_with_selection.h", 1193 "source/fuzz/transformation_equation_instruction.cpp", 1194 "source/fuzz/transformation_equation_instruction.h", 1195 "source/fuzz/transformation_expand_vector_reduction.cpp", 1196 "source/fuzz/transformation_expand_vector_reduction.h", 1197 "source/fuzz/transformation_flatten_conditional_branch.cpp", 1198 "source/fuzz/transformation_flatten_conditional_branch.h", 1199 "source/fuzz/transformation_function_call.cpp", 1200 "source/fuzz/transformation_function_call.h", 1201 "source/fuzz/transformation_inline_function.cpp", 1202 "source/fuzz/transformation_inline_function.h", 1203 "source/fuzz/transformation_invert_comparison_operator.cpp", 1204 "source/fuzz/transformation_invert_comparison_operator.h", 1205 "source/fuzz/transformation_load.cpp", 1206 "source/fuzz/transformation_load.h", 1207 "source/fuzz/transformation_make_vector_operation_dynamic.cpp", 1208 "source/fuzz/transformation_make_vector_operation_dynamic.h", 1209 "source/fuzz/transformation_merge_blocks.cpp", 1210 "source/fuzz/transformation_merge_blocks.h", 1211 "source/fuzz/transformation_merge_function_returns.cpp", 1212 "source/fuzz/transformation_merge_function_returns.h", 1213 "source/fuzz/transformation_move_block_down.cpp", 1214 "source/fuzz/transformation_move_block_down.h", 1215 "source/fuzz/transformation_move_instruction_down.cpp", 1216 "source/fuzz/transformation_move_instruction_down.h", 1217 "source/fuzz/transformation_mutate_pointer.cpp", 1218 "source/fuzz/transformation_mutate_pointer.h", 1219 "source/fuzz/transformation_outline_function.cpp", 1220 "source/fuzz/transformation_outline_function.h", 1221 "source/fuzz/transformation_permute_function_parameters.cpp", 1222 "source/fuzz/transformation_permute_function_parameters.h", 1223 "source/fuzz/transformation_permute_phi_operands.cpp", 1224 "source/fuzz/transformation_permute_phi_operands.h", 1225 "source/fuzz/transformation_propagate_instruction_down.cpp", 1226 "source/fuzz/transformation_propagate_instruction_down.h", 1227 "source/fuzz/transformation_propagate_instruction_up.cpp", 1228 "source/fuzz/transformation_propagate_instruction_up.h", 1229 "source/fuzz/transformation_push_id_through_variable.cpp", 1230 "source/fuzz/transformation_push_id_through_variable.h", 1231 "source/fuzz/transformation_record_synonymous_constants.cpp", 1232 "source/fuzz/transformation_record_synonymous_constants.h", 1233 "source/fuzz/transformation_replace_add_sub_mul_with_carrying_extended.cpp", 1234 "source/fuzz/transformation_replace_add_sub_mul_with_carrying_extended.h", 1235 "source/fuzz/transformation_replace_boolean_constant_with_constant_binary.cpp", 1236 "source/fuzz/transformation_replace_boolean_constant_with_constant_binary.h", 1237 "source/fuzz/transformation_replace_branch_from_dead_block_with_exit.cpp", 1238 "source/fuzz/transformation_replace_branch_from_dead_block_with_exit.h", 1239 "source/fuzz/transformation_replace_constant_with_uniform.cpp", 1240 "source/fuzz/transformation_replace_constant_with_uniform.h", 1241 "source/fuzz/transformation_replace_copy_memory_with_load_store.cpp", 1242 "source/fuzz/transformation_replace_copy_memory_with_load_store.h", 1243 "source/fuzz/transformation_replace_copy_object_with_store_load.cpp", 1244 "source/fuzz/transformation_replace_copy_object_with_store_load.h", 1245 "source/fuzz/transformation_replace_id_with_synonym.cpp", 1246 "source/fuzz/transformation_replace_id_with_synonym.h", 1247 "source/fuzz/transformation_replace_irrelevant_id.cpp", 1248 "source/fuzz/transformation_replace_irrelevant_id.h", 1249 "source/fuzz/transformation_replace_linear_algebra_instruction.cpp", 1250 "source/fuzz/transformation_replace_linear_algebra_instruction.h", 1251 "source/fuzz/transformation_replace_load_store_with_copy_memory.cpp", 1252 "source/fuzz/transformation_replace_load_store_with_copy_memory.h", 1253 "source/fuzz/transformation_replace_opphi_id_from_dead_predecessor.cpp", 1254 "source/fuzz/transformation_replace_opphi_id_from_dead_predecessor.h", 1255 "source/fuzz/transformation_replace_opselect_with_conditional_branch.cpp", 1256 "source/fuzz/transformation_replace_opselect_with_conditional_branch.h", 1257 "source/fuzz/transformation_replace_parameter_with_global.cpp", 1258 "source/fuzz/transformation_replace_parameter_with_global.h", 1259 "source/fuzz/transformation_replace_params_with_struct.cpp", 1260 "source/fuzz/transformation_replace_params_with_struct.h", 1261 "source/fuzz/transformation_set_function_control.cpp", 1262 "source/fuzz/transformation_set_function_control.h", 1263 "source/fuzz/transformation_set_loop_control.cpp", 1264 "source/fuzz/transformation_set_loop_control.h", 1265 "source/fuzz/transformation_set_memory_operands_mask.cpp", 1266 "source/fuzz/transformation_set_memory_operands_mask.h", 1267 "source/fuzz/transformation_set_selection_control.cpp", 1268 "source/fuzz/transformation_set_selection_control.h", 1269 "source/fuzz/transformation_split_block.cpp", 1270 "source/fuzz/transformation_split_block.h", 1271 "source/fuzz/transformation_store.cpp", 1272 "source/fuzz/transformation_store.h", 1273 "source/fuzz/transformation_swap_commutable_operands.cpp", 1274 "source/fuzz/transformation_swap_commutable_operands.h", 1275 "source/fuzz/transformation_swap_conditional_branch_operands.cpp", 1276 "source/fuzz/transformation_swap_conditional_branch_operands.h", 1277 "source/fuzz/transformation_swap_function_variables.cpp", 1278 "source/fuzz/transformation_swap_function_variables.h", 1279 "source/fuzz/transformation_swap_two_functions.cpp", 1280 "source/fuzz/transformation_swap_two_functions.h", 1281 "source/fuzz/transformation_toggle_access_chain_instruction.cpp", 1282 "source/fuzz/transformation_toggle_access_chain_instruction.h", 1283 "source/fuzz/transformation_vector_shuffle.cpp", 1284 "source/fuzz/transformation_vector_shuffle.h", 1285 "source/fuzz/transformation_wrap_early_terminator_in_function.cpp", 1286 "source/fuzz/transformation_wrap_early_terminator_in_function.h", 1287 "source/fuzz/transformation_wrap_region_in_selection.cpp", 1288 "source/fuzz/transformation_wrap_region_in_selection.h", 1289 "source/fuzz/transformation_wrap_vector_synonym.cpp", 1290 "source/fuzz/transformation_wrap_vector_synonym.h", 1291 "source/fuzz/uniform_buffer_element_descriptor.cpp", 1292 "source/fuzz/uniform_buffer_element_descriptor.h", 1293 ] 1294 deps = [ 1295 ":spvtools", 1296 ":spvtools_fuzz_proto", 1297 ":spvtools_opt", 1298 ":spvtools_reduce", 1299 "//third_party/protobuf:protobuf_full", 1300 ] 1301 public_deps = [ ":spvtools_headers" ] 1302 configs -= [ "//build/config/compiler:chromium_code" ] 1303 configs += [ "//build/config/compiler:no_chromium_code" ] 1304 configs += [ ":spvtools_internal_config" ] 1305 } 1306} 1307 1308group("SPIRV-Tools") { 1309 public_deps = [ 1310 ":spvtools", 1311 ":spvtools_link", 1312 ":spvtools_opt", 1313 ":spvtools_reduce", 1314 ":spvtools_val", 1315 ] 1316} 1317 1318# The tests are scoped to Chromium to avoid needing to write gtest integration. 1319# See Chromium's third_party/googletest/BUILD.gn for a complete integration. 1320if (build_with_chromium && spvtools_build_executables) { 1321 test("spvtools_test") { 1322 sources = [ 1323 "test/assembly_context_test.cpp", 1324 "test/assembly_format_test.cpp", 1325 "test/binary_destroy_test.cpp", 1326 "test/binary_endianness_test.cpp", 1327 "test/binary_header_get_test.cpp", 1328 "test/binary_parse_test.cpp", 1329 "test/binary_strnlen_s_test.cpp", 1330 "test/binary_to_text.literal_test.cpp", 1331 "test/binary_to_text_test.cpp", 1332 "test/comment_test.cpp", 1333 "test/enum_set_test.cpp", 1334 "test/enum_string_mapping_test.cpp", 1335 "test/ext_inst.cldebug100_test.cpp", 1336 "test/ext_inst.debuginfo_test.cpp", 1337 "test/ext_inst.glsl_test.cpp", 1338 "test/ext_inst.opencl_test.cpp", 1339 "test/fix_word_test.cpp", 1340 "test/generator_magic_number_test.cpp", 1341 "test/hex_float_test.cpp", 1342 "test/immediate_int_test.cpp", 1343 "test/libspirv_macros_test.cpp", 1344 "test/name_mapper_test.cpp", 1345 "test/named_id_test.cpp", 1346 "test/opcode_make_test.cpp", 1347 "test/opcode_require_capabilities_test.cpp", 1348 "test/opcode_split_test.cpp", 1349 "test/opcode_table_get_test.cpp", 1350 "test/operand_capabilities_test.cpp", 1351 "test/operand_pattern_test.cpp", 1352 "test/operand_test.cpp", 1353 "test/target_env_test.cpp", 1354 "test/test_fixture.h", 1355 "test/text_advance_test.cpp", 1356 "test/text_destroy_test.cpp", 1357 "test/text_literal_test.cpp", 1358 "test/text_start_new_inst_test.cpp", 1359 "test/text_to_binary.annotation_test.cpp", 1360 "test/text_to_binary.barrier_test.cpp", 1361 "test/text_to_binary.constant_test.cpp", 1362 "test/text_to_binary.control_flow_test.cpp", 1363 "test/text_to_binary.debug_test.cpp", 1364 "test/text_to_binary.device_side_enqueue_test.cpp", 1365 "test/text_to_binary.extension_test.cpp", 1366 "test/text_to_binary.function_test.cpp", 1367 "test/text_to_binary.group_test.cpp", 1368 "test/text_to_binary.image_test.cpp", 1369 "test/text_to_binary.literal_test.cpp", 1370 "test/text_to_binary.memory_test.cpp", 1371 "test/text_to_binary.misc_test.cpp", 1372 "test/text_to_binary.mode_setting_test.cpp", 1373 "test/text_to_binary.pipe_storage_test.cpp", 1374 "test/text_to_binary.reserved_sampling_test.cpp", 1375 "test/text_to_binary.subgroup_dispatch_test.cpp", 1376 "test/text_to_binary.type_declaration_test.cpp", 1377 "test/text_to_binary_test.cpp", 1378 "test/text_word_get_test.cpp", 1379 "test/unit_spirv.cpp", 1380 "test/unit_spirv.h", 1381 ] 1382 1383 deps = [ 1384 ":spvtools", 1385 ":spvtools_language_header_cldebuginfo100", 1386 ":spvtools_language_header_debuginfo", 1387 ":spvtools_language_header_vkdebuginfo100", 1388 ":spvtools_val", 1389 "//testing/gmock", 1390 "//testing/gtest", 1391 "//testing/gtest:gtest_main", 1392 "//third_party/googletest:gmock", 1393 "//third_party/googletest:gtest", 1394 ] 1395 1396 if (is_clang) { 1397 cflags_cc = [ "-Wno-self-assign" ] 1398 } 1399 1400 configs += [ ":spvtools_internal_config" ] 1401 } 1402} 1403 1404if (spirv_tools_standalone) { 1405 group("fuzzers") { 1406 testonly = true 1407 deps = [ "test/fuzzers" ] 1408 } 1409} 1410 1411source_set("spvtools_util_cli_consumer") { 1412 sources = [ 1413 "tools/util/cli_consumer.cpp", 1414 "tools/util/cli_consumer.h", 1415 ] 1416 deps = [ ":spvtools_headers" ] 1417 configs += [ ":spvtools_internal_config" ] 1418} 1419 1420source_set("spvtools_software_version") { 1421 sources = [ "source/software_version.cpp" ] 1422 deps = [ 1423 ":spvtools_build_version", 1424 ":spvtools_headers", 1425 ] 1426 configs += [ ":spvtools_internal_config" ] 1427} 1428 1429if (spvtools_build_executables) { 1430 executable("spirv-as") { 1431 sources = [ "tools/as/as.cpp" ] 1432 deps = [ 1433 ":spvtools", 1434 ":spvtools_software_version", 1435 ] 1436 configs += [ ":spvtools_internal_config" ] 1437 } 1438 1439 executable("spirv-dis") { 1440 sources = [ "tools/dis/dis.cpp" ] 1441 deps = [ 1442 ":spvtools", 1443 ":spvtools_software_version", 1444 ] 1445 configs += [ ":spvtools_internal_config" ] 1446 } 1447 1448 executable("spirv-val") { 1449 sources = [ "tools/val/val.cpp" ] 1450 deps = [ 1451 ":spvtools", 1452 ":spvtools_software_version", 1453 ":spvtools_util_cli_consumer", 1454 ":spvtools_val", 1455 ] 1456 configs += [ ":spvtools_internal_config" ] 1457 } 1458 1459 executable("spirv-cfg") { 1460 sources = [ 1461 "tools/cfg/bin_to_dot.cpp", 1462 "tools/cfg/bin_to_dot.h", 1463 "tools/cfg/cfg.cpp", 1464 ] 1465 deps = [ 1466 ":spvtools", 1467 ":spvtools_software_version", 1468 ] 1469 configs += [ ":spvtools_internal_config" ] 1470 } 1471 1472 executable("spirv-opt") { 1473 sources = [ "tools/opt/opt.cpp" ] 1474 deps = [ 1475 ":spvtools", 1476 ":spvtools_opt", 1477 ":spvtools_software_version", 1478 ":spvtools_util_cli_consumer", 1479 ":spvtools_val", 1480 ] 1481 configs += [ ":spvtools_internal_config" ] 1482 } 1483 1484 executable("spirv-link") { 1485 sources = [ "tools/link/linker.cpp" ] 1486 deps = [ 1487 ":spvtools", 1488 ":spvtools_link", 1489 ":spvtools_opt", 1490 ":spvtools_software_version", 1491 ":spvtools_val", 1492 ] 1493 configs += [ ":spvtools_internal_config" ] 1494 } 1495} 1496 1497if (!is_ios && !spirv_is_winuwp && build_with_chromium && spvtools_build_executables) { 1498 # iOS and UWP do not allow std::system calls which spirv-fuzz 1499 # requires. Additionally, spirv-fuzz is only built when in a 1500 # Chromium checkout due to its dependency on protobuf. 1501 1502 executable("spirv-fuzz") { 1503 sources = [ "tools/fuzz/fuzz.cpp" ] 1504 deps = [ 1505 ":spvtools", 1506 ":spvtools_fuzz", 1507 ":spvtools_opt", 1508 ":spvtools_reduce", 1509 ":spvtools_software_version", 1510 ":spvtools_util_cli_consumer", 1511 ":spvtools_val", 1512 "//third_party/protobuf:protobuf_full", 1513 ] 1514 configs += [ ":spvtools_internal_config" ] 1515 } 1516} 1517 1518if (!is_ios && !spirv_is_winuwp && spvtools_build_executables) { 1519 # iOS and UWP do not allow std::system calls which spirv-reduce 1520 # requires. 1521 1522 executable("spirv-reduce") { 1523 sources = [ "tools/reduce/reduce.cpp" ] 1524 deps = [ 1525 ":spvtools", 1526 ":spvtools_opt", 1527 ":spvtools_reduce", 1528 ":spvtools_software_version", 1529 ":spvtools_util_cli_consumer", 1530 ":spvtools_val", 1531 ] 1532 configs += [ ":spvtools_internal_config" ] 1533 } 1534} 1535 1536if (spvtools_build_executables){ 1537 group("all_spirv_tools") { 1538 deps = [ 1539 ":spirv-as", 1540 ":spirv-cfg", 1541 ":spirv-dis", 1542 ":spirv-link", 1543 ":spirv-opt", 1544 ":spirv-val", 1545 ] 1546 if (!is_ios && !spirv_is_winuwp && build_with_chromium) { 1547 deps += [ ":spirv-fuzz" ] 1548 } 1549 if (!is_ios && !spirv_is_winuwp) { 1550 deps += [ ":spirv-reduce" ] 1551 } 1552 } 1553} 1554