Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 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 | |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 15 | import("//build_overrides/build.gni") |
David Turner | 5081512 | 2019-07-10 22:37:10 +0200 | [diff] [blame] | 16 | import("//build_overrides/spirv_tools.gni") |
David Turner | a6bfc26 | 2019-07-03 22:26:06 +0200 | [diff] [blame] | 17 | if (build_with_chromium) { |
| 18 | import("//testing/test.gni") |
| 19 | } |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 20 | |
Corentin Wallez | 2d9a325 | 2018-08-02 18:48:03 +0200 | [diff] [blame] | 21 | spirv_headers = spirv_tools_spirv_headers_dir |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 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" |
David Neto | 64f36ea | 2019-12-19 17:16:26 -0500 | [diff] [blame] | 35 | debuginfo_insts_file = "source/extinst.debuginfo.grammar.json" |
| 36 | cldebuginfo100_insts_file = "source/extinst.opencl.debuginfo.100.grammar.json" |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 37 | |
| 38 | sources = [ |
| 39 | core_json_file, |
Geoff Lang | c316fb1 | 2020-02-21 17:23:42 -0500 | [diff] [blame] | 40 | debuginfo_insts_file, |
| 41 | cldebuginfo100_insts_file, |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 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", |
David Neto | 64f36ea | 2019-12-19 17:16:26 -0500 | [diff] [blame] | 53 | rebase_path(debuginfo_insts_file, root_build_dir), |
| 54 | "--extinst-cldebuginfo100-grammar", |
| 55 | rebase_path(cldebuginfo100_insts_file, root_build_dir), |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 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" |
David Neto | 64f36ea | 2019-12-19 17:16:26 -0500 | [diff] [blame] | 72 | debuginfo_insts_file = "source/extinst.debuginfo.grammar.json" |
| 73 | cldebuginfo100_insts_file = "source/extinst.opencl.debuginfo.100.grammar.json" |
David Neto | fb2e819 | 2020-01-08 17:27:38 -0500 | [diff] [blame] | 74 | |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 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", |
David Neto | 64f36ea | 2019-12-19 17:16:26 -0500 | [diff] [blame] | 82 | rebase_path(debuginfo_insts_file, root_build_dir), |
| 83 | "--extinst-cldebuginfo100-grammar", |
| 84 | rebase_path(cldebuginfo100_insts_file, root_build_dir), |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 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, |
David Neto | fb2e819 | 2020-01-08 17:27:38 -0500 | [diff] [blame] | 92 | debuginfo_insts_file, |
| 93 | cldebuginfo100_insts_file, |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 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" |
David Neto | fb2e819 | 2020-01-08 17:27:38 -0500 | [diff] [blame] | 113 | debuginfo_insts_file = "source/extinst.debuginfo.grammar.json" |
| 114 | cldebuginfo100_insts_file = "source/extinst.opencl.debuginfo.100.grammar.json" |
| 115 | |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 116 | glsl_insts_file = "${target_gen_dir}/glsl.std.450.insts.inc" |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 117 | |
| 118 | args = [ |
| 119 | "--spirv-core-grammar", |
| 120 | rebase_path(core_json_file, root_build_dir), |
David Neto | fb2e819 | 2020-01-08 17:27:38 -0500 | [diff] [blame] | 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), |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 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), |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 129 | ] |
| 130 | inputs = [ |
| 131 | core_json_file, |
| 132 | glsl_json_file, |
David Neto | fb2e819 | 2020-01-08 17:27:38 -0500 | [diff] [blame] | 133 | debuginfo_insts_file, |
| 134 | cldebuginfo100_insts_file, |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 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" |
David Neto | fb2e819 | 2020-01-08 17:27:38 -0500 | [diff] [blame] | 152 | opencl_json_file = "${spirv_headers}/include/spirv/${version}/extinst.opencl.std.100.grammar.json" |
| 153 | debuginfo_insts_file = "source/extinst.debuginfo.grammar.json" |
| 154 | cldebuginfo100_insts_file = "source/extinst.opencl.debuginfo.100.grammar.json" |
| 155 | |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 156 | opencl_insts_file = "${target_gen_dir}/opencl.std.insts.inc" |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 157 | |
| 158 | args = [ |
| 159 | "--spirv-core-grammar", |
| 160 | rebase_path(core_json_file, root_build_dir), |
David Neto | fb2e819 | 2020-01-08 17:27:38 -0500 | [diff] [blame] | 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), |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 165 | "--extinst-opencl-grammar", |
David Neto | fb2e819 | 2020-01-08 17:27:38 -0500 | [diff] [blame] | 166 | rebase_path(opencl_json_file, root_build_dir), |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 167 | "--opencl-insts-output", |
| 168 | rebase_path(opencl_insts_file, root_build_dir), |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 169 | ] |
| 170 | inputs = [ |
| 171 | core_json_file, |
David Neto | fb2e819 | 2020-01-08 17:27:38 -0500 | [diff] [blame] | 172 | opencl_json_file, |
| 173 | debuginfo_insts_file, |
| 174 | cldebuginfo100_insts_file, |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 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 |
Geoff Lang | fb6e3e4 | 2020-02-25 00:46:52 -0500 | [diff] [blame] | 189 | extinst_output_path = "${target_gen_dir}/${name}.h" |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 190 | |
| 191 | args = [ |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 192 | "--extinst-grammar", |
David Neto | 64f36ea | 2019-12-19 17:16:26 -0500 | [diff] [blame] | 193 | rebase_path(invoker.grammar_file, root_build_dir), |
Geoff Lang | fb6e3e4 | 2020-02-25 00:46:52 -0500 | [diff] [blame] | 194 | "--extinst-output-path", |
| 195 | rebase_path(extinst_output_path, root_build_dir), |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 196 | ] |
| 197 | inputs = [ |
David Neto | fb2e819 | 2020-01-08 17:27:38 -0500 | [diff] [blame] | 198 | invoker.grammar_file, |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 199 | ] |
| 200 | outputs = [ |
Geoff Lang | fb6e3e4 | 2020-02-25 00:46:52 -0500 | [diff] [blame] | 201 | "${extinst_output_path}", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 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 = "source/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), |
David Neto | 64f36ea | 2019-12-19 17:16:26 -0500 | [diff] [blame] | 221 | "--vendor-operand-kind-prefix", |
| 222 | invoker.operand_kind_prefix |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 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 | |
dan sinclair | 1bdade7 | 2018-08-15 15:26:28 -0400 | [diff] [blame] | 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 | |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 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 | } |
David Neto | 64f36ea | 2019-12-19 17:16:26 -0500 | [diff] [blame] | 281 | spvtools_language_header("debuginfo") { |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 282 | name = "DebugInfo" |
David Neto | 64f36ea | 2019-12-19 17:16:26 -0500 | [diff] [blame] | 283 | grammar_file = "source/extinst.debuginfo.grammar.json" |
| 284 | } |
| 285 | spvtools_language_header("cldebuginfo100") { |
| 286 | name = "OpenCLDebugInfo100" |
| 287 | grammar_file = "source/extinst.opencl.debuginfo.100.grammar.json" |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 288 | } |
| 289 | |
| 290 | spvtools_vendor_tables = [ |
David Neto | fb2e819 | 2020-01-08 17:27:38 -0500 | [diff] [blame] | 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..."], |
David Neto | 64f36ea | 2019-12-19 17:16:26 -0500 | [diff] [blame] | 296 | ["opencl.debuginfo.100", "CLDEBUG100_"], |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 297 | ] |
| 298 | |
David Neto | 64f36ea | 2019-12-19 17:16:26 -0500 | [diff] [blame] | 299 | foreach(table_def, spvtools_vendor_tables) { |
David Neto | fb2e819 | 2020-01-08 17:27:38 -0500 | [diff] [blame] | 300 | spvtools_vendor_table(table_def[0]) { |
David Neto | 64f36ea | 2019-12-19 17:16:26 -0500 | [diff] [blame] | 301 | name = table_def[0] |
| 302 | operand_kind_prefix = table_def[1] |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 303 | } |
| 304 | } |
| 305 | |
Corentin Wallez | 21bcb9d | 2018-09-06 10:50:27 -0400 | [diff] [blame] | 306 | config("spvtools_public_config") { |
| 307 | include_dirs = [ "include" ] |
| 308 | } |
| 309 | |
| 310 | config("spvtools_internal_config") { |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 311 | include_dirs = [ |
| 312 | ".", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 313 | "$target_gen_dir", |
| 314 | "${spirv_headers}/include", |
| 315 | ] |
| 316 | |
Corentin Wallez | 21bcb9d | 2018-09-06 10:50:27 -0400 | [diff] [blame] | 317 | configs = [ ":spvtools_public_config" ] |
| 318 | |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 319 | if (is_clang) { |
David Turner | 36c1c0e | 2019-09-17 21:57:15 +0200 | [diff] [blame] | 320 | cflags = [ |
| 321 | "-Wno-implicit-fallthrough", |
| 322 | "-Wno-newline-eof", |
| 323 | ] |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 324 | } |
| 325 | } |
| 326 | |
Corentin Wallez | 21bcb9d | 2018-09-06 10:50:27 -0400 | [diff] [blame] | 327 | source_set("spvtools_headers") { |
| 328 | sources = [ |
David Turner | 5081512 | 2019-07-10 22:37:10 +0200 | [diff] [blame] | 329 | "include/spirv-tools/instrument.hpp", |
Corentin Wallez | 21bcb9d | 2018-09-06 10:50:27 -0400 | [diff] [blame] | 330 | "include/spirv-tools/libspirv.h", |
| 331 | "include/spirv-tools/libspirv.hpp", |
| 332 | "include/spirv-tools/linker.hpp", |
| 333 | "include/spirv-tools/optimizer.hpp", |
| 334 | ] |
| 335 | |
| 336 | public_configs = [ ":spvtools_public_config" ] |
| 337 | } |
| 338 | |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 339 | static_library("spvtools") { |
| 340 | deps = [ |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 341 | ":spvtools_core_tables_unified1", |
| 342 | ":spvtools_generators_inc", |
| 343 | ":spvtools_glsl_tables_glsl1-0", |
David Neto | 64f36ea | 2019-12-19 17:16:26 -0500 | [diff] [blame] | 344 | ":spvtools_language_header_debuginfo", |
| 345 | ":spvtools_language_header_cldebuginfo100", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 346 | ":spvtools_opencl_tables_opencl1-0", |
| 347 | ] |
David Neto | 64f36ea | 2019-12-19 17:16:26 -0500 | [diff] [blame] | 348 | foreach(table_def, spvtools_vendor_tables) { |
| 349 | target_name = table_def[0] |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 350 | deps += [ ":spvtools_vendor_tables_$target_name" ] |
| 351 | } |
| 352 | |
| 353 | sources = [ |
| 354 | "source/assembly_grammar.cpp", |
| 355 | "source/assembly_grammar.h", |
| 356 | "source/binary.cpp", |
| 357 | "source/binary.h", |
Jamie Madill | e0d5544 | 2019-11-04 21:01:57 -0500 | [diff] [blame] | 358 | "source/cfa.h", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 359 | "source/diagnostic.cpp", |
| 360 | "source/diagnostic.h", |
| 361 | "source/disassemble.cpp", |
Jamie Madill | e0d5544 | 2019-11-04 21:01:57 -0500 | [diff] [blame] | 362 | "source/disassemble.h", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 363 | "source/enum_set.h", |
| 364 | "source/enum_string_mapping.cpp", |
Jamie Madill | e0d5544 | 2019-11-04 21:01:57 -0500 | [diff] [blame] | 365 | "source/enum_string_mapping.h", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 366 | "source/ext_inst.cpp", |
| 367 | "source/ext_inst.h", |
| 368 | "source/extensions.cpp", |
| 369 | "source/extensions.h", |
| 370 | "source/instruction.h", |
Jamie Madill | e0d5544 | 2019-11-04 21:01:57 -0500 | [diff] [blame] | 371 | "source/latest_version_glsl_std_450_header.h", |
| 372 | "source/latest_version_opencl_std_header.h", |
| 373 | "source/latest_version_spirv_header.h", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 374 | "source/libspirv.cpp", |
| 375 | "source/macro.h", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 376 | "source/name_mapper.cpp", |
| 377 | "source/name_mapper.h", |
| 378 | "source/opcode.cpp", |
| 379 | "source/opcode.h", |
| 380 | "source/operand.cpp", |
| 381 | "source/operand.h", |
| 382 | "source/parsed_operand.cpp", |
| 383 | "source/parsed_operand.h", |
| 384 | "source/print.cpp", |
| 385 | "source/print.h", |
| 386 | "source/spirv_constant.h", |
| 387 | "source/spirv_definition.h", |
| 388 | "source/spirv_endian.cpp", |
| 389 | "source/spirv_endian.h", |
dan sinclair | 324be76 | 2018-09-11 09:34:42 -0400 | [diff] [blame] | 390 | "source/spirv_optimizer_options.cpp", |
| 391 | "source/spirv_optimizer_options.h", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 392 | "source/spirv_target_env.cpp", |
| 393 | "source/spirv_target_env.h", |
| 394 | "source/spirv_validator_options.cpp", |
| 395 | "source/spirv_validator_options.h", |
| 396 | "source/table.cpp", |
| 397 | "source/table.h", |
| 398 | "source/text.cpp", |
| 399 | "source/text.h", |
| 400 | "source/text_handler.cpp", |
| 401 | "source/text_handler.h", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 402 | "source/util/bit_vector.cpp", |
| 403 | "source/util/bit_vector.h", |
| 404 | "source/util/bitutils.h", |
| 405 | "source/util/hex_float.h", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 406 | "source/util/ilist.h", |
| 407 | "source/util/ilist_node.h", |
dan sinclair | 1553025 | 2018-08-14 12:44:54 -0400 | [diff] [blame] | 408 | "source/util/make_unique.h", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 409 | "source/util/parse_number.cpp", |
| 410 | "source/util/parse_number.h", |
| 411 | "source/util/small_vector.h", |
| 412 | "source/util/string_utils.cpp", |
| 413 | "source/util/string_utils.h", |
| 414 | "source/util/timer.cpp", |
| 415 | "source/util/timer.h", |
| 416 | ] |
| 417 | |
Corentin Wallez | 21bcb9d | 2018-09-06 10:50:27 -0400 | [diff] [blame] | 418 | public_deps = [ |
Takuto Ikuta | 0187c19 | 2019-02-14 00:24:06 +0900 | [diff] [blame] | 419 | ":spvtools_core_enums_unified1", |
Corentin Wallez | 21bcb9d | 2018-09-06 10:50:27 -0400 | [diff] [blame] | 420 | ":spvtools_headers", |
Shahbaz Youssefi | b97057e | 2020-01-23 13:40:13 -0500 | [diff] [blame] | 421 | "${spirv_headers}:spv_headers", |
Corentin Wallez | 21bcb9d | 2018-09-06 10:50:27 -0400 | [diff] [blame] | 422 | ] |
| 423 | |
David Turner | a6bfc26 | 2019-07-03 22:26:06 +0200 | [diff] [blame] | 424 | if (build_with_chromium) { |
| 425 | configs -= [ "//build/config/compiler:chromium_code" ] |
| 426 | configs += [ "//build/config/compiler:no_chromium_code" ] |
| 427 | } |
David Turner | 5081512 | 2019-07-10 22:37:10 +0200 | [diff] [blame] | 428 | configs += [ ":spvtools_internal_config" ] |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 429 | } |
| 430 | |
| 431 | static_library("spvtools_val") { |
| 432 | sources = [ |
| 433 | "source/val/basic_block.cpp", |
Jamie Madill | e0d5544 | 2019-11-04 21:01:57 -0500 | [diff] [blame] | 434 | "source/val/basic_block.h", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 435 | "source/val/construct.cpp", |
Jamie Madill | e0d5544 | 2019-11-04 21:01:57 -0500 | [diff] [blame] | 436 | "source/val/construct.h", |
| 437 | "source/val/decoration.h", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 438 | "source/val/function.cpp", |
Jamie Madill | e0d5544 | 2019-11-04 21:01:57 -0500 | [diff] [blame] | 439 | "source/val/function.h", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 440 | "source/val/instruction.cpp", |
| 441 | "source/val/validate.cpp", |
| 442 | "source/val/validate.h", |
| 443 | "source/val/validate_adjacency.cpp", |
Alan Baker | 7d4b046 | 2018-08-08 14:21:27 -0400 | [diff] [blame] | 444 | "source/val/validate_annotation.cpp", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 445 | "source/val/validate_arithmetics.cpp", |
| 446 | "source/val/validate_atomics.cpp", |
| 447 | "source/val/validate_barriers.cpp", |
| 448 | "source/val/validate_bitwise.cpp", |
| 449 | "source/val/validate_builtins.cpp", |
| 450 | "source/val/validate_capability.cpp", |
| 451 | "source/val/validate_cfg.cpp", |
| 452 | "source/val/validate_composites.cpp", |
Alan Baker | c5b3806 | 2018-08-17 11:20:55 -0400 | [diff] [blame] | 453 | "source/val/validate_constants.cpp", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 454 | "source/val/validate_conversion.cpp", |
Alan Baker | ca7278c | 2018-08-08 13:47:09 -0400 | [diff] [blame] | 455 | "source/val/validate_debug.cpp", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 456 | "source/val/validate_decorations.cpp", |
| 457 | "source/val/validate_derivatives.cpp", |
Alan Baker | e7fdcdb | 2018-08-10 09:53:17 -0400 | [diff] [blame] | 458 | "source/val/validate_execution_limitations.cpp", |
dan sinclair | 703305b | 2018-11-28 09:17:13 -0500 | [diff] [blame] | 459 | "source/val/validate_extensions.cpp", |
Alan Baker | e7fdcdb | 2018-08-10 09:53:17 -0400 | [diff] [blame] | 460 | "source/val/validate_function.cpp", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 461 | "source/val/validate_id.cpp", |
| 462 | "source/val/validate_image.cpp", |
| 463 | "source/val/validate_instruction.cpp", |
| 464 | "source/val/validate_interfaces.cpp", |
| 465 | "source/val/validate_layout.cpp", |
| 466 | "source/val/validate_literals.cpp", |
| 467 | "source/val/validate_logicals.cpp", |
Alan Baker | d49bedc | 2018-08-01 14:44:56 -0400 | [diff] [blame] | 468 | "source/val/validate_memory.cpp", |
Ryan Harrison | cf37ab7 | 2018-12-06 14:38:15 -0500 | [diff] [blame] | 469 | "source/val/validate_memory_semantics.cpp", |
Jamie Madill | e0d5544 | 2019-11-04 21:01:57 -0500 | [diff] [blame] | 470 | "source/val/validate_memory_semantics.h", |
Jeff Bolz | 2c0111e | 2019-06-03 09:55:07 -0500 | [diff] [blame] | 471 | "source/val/validate_misc.cpp", |
Alan Baker | 714bf84 | 2018-08-08 14:49:59 -0400 | [diff] [blame] | 472 | "source/val/validate_mode_setting.cpp", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 473 | "source/val/validate_non_uniform.cpp", |
| 474 | "source/val/validate_primitives.cpp", |
Ryan Harrison | 8ce3dba | 2018-11-29 13:48:42 -0500 | [diff] [blame] | 475 | "source/val/validate_scopes.cpp", |
Jamie Madill | e0d5544 | 2019-11-04 21:01:57 -0500 | [diff] [blame] | 476 | "source/val/validate_scopes.h", |
alan-baker | 1a2de48 | 2019-07-11 13:05:14 -0400 | [diff] [blame] | 477 | "source/val/validate_small_type_uses.cpp", |
Alan Baker | f2a9900 | 2018-08-03 11:38:51 -0400 | [diff] [blame] | 478 | "source/val/validate_type.cpp", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 479 | "source/val/validation_state.cpp", |
Jamie Madill | e0d5544 | 2019-11-04 21:01:57 -0500 | [diff] [blame] | 480 | "source/val/validation_state.h", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 481 | ] |
| 482 | |
| 483 | deps = [ |
| 484 | ":spvtools", |
Shahbaz Youssefi | 1b34410 | 2020-01-24 17:14:16 -0500 | [diff] [blame] | 485 | ":spvtools_language_header_cldebuginfo100", |
| 486 | ":spvtools_language_header_debuginfo", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 487 | ] |
Corentin Wallez | 21bcb9d | 2018-09-06 10:50:27 -0400 | [diff] [blame] | 488 | public_deps = [ |
| 489 | ":spvtools_headers", |
| 490 | ] |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 491 | |
David Turner | a6bfc26 | 2019-07-03 22:26:06 +0200 | [diff] [blame] | 492 | if (build_with_chromium) { |
| 493 | configs -= [ "//build/config/compiler:chromium_code" ] |
| 494 | configs += [ "//build/config/compiler:no_chromium_code" ] |
| 495 | } |
David Turner | 5081512 | 2019-07-10 22:37:10 +0200 | [diff] [blame] | 496 | configs += [ ":spvtools_internal_config" ] |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 497 | } |
| 498 | |
| 499 | static_library("spvtools_opt") { |
| 500 | sources = [ |
| 501 | "source/opt/aggressive_dead_code_elim_pass.cpp", |
| 502 | "source/opt/aggressive_dead_code_elim_pass.h", |
Steven Perron | 35d98be | 2019-08-29 12:48:17 -0400 | [diff] [blame] | 503 | "source/opt/amd_ext_to_khr.cpp", |
| 504 | "source/opt/amd_ext_to_khr.h", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 505 | "source/opt/basic_block.cpp", |
| 506 | "source/opt/basic_block.h", |
| 507 | "source/opt/block_merge_pass.cpp", |
| 508 | "source/opt/block_merge_pass.h", |
David Neto | cf78346 | 2019-01-28 18:42:35 -0800 | [diff] [blame] | 509 | "source/opt/block_merge_util.cpp", |
| 510 | "source/opt/block_merge_util.h", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 511 | "source/opt/build_module.cpp", |
| 512 | "source/opt/build_module.h", |
| 513 | "source/opt/ccp_pass.cpp", |
| 514 | "source/opt/ccp_pass.h", |
| 515 | "source/opt/cfg.cpp", |
| 516 | "source/opt/cfg.h", |
| 517 | "source/opt/cfg_cleanup_pass.cpp", |
| 518 | "source/opt/cfg_cleanup_pass.h", |
Steven Perron | dd4157d | 2019-01-17 15:56:36 -0500 | [diff] [blame] | 519 | "source/opt/code_sink.cpp", |
| 520 | "source/opt/code_sink.h", |
dan sinclair | de9496e | 2018-08-02 14:36:43 -0400 | [diff] [blame] | 521 | "source/opt/combine_access_chains.cpp", |
| 522 | "source/opt/combine_access_chains.h", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 523 | "source/opt/compact_ids_pass.cpp", |
| 524 | "source/opt/compact_ids_pass.h", |
| 525 | "source/opt/composite.cpp", |
| 526 | "source/opt/composite.h", |
| 527 | "source/opt/const_folding_rules.cpp", |
| 528 | "source/opt/const_folding_rules.h", |
| 529 | "source/opt/constants.cpp", |
| 530 | "source/opt/constants.h", |
greg-lunarg | d11725b | 2019-09-03 11:22:13 -0600 | [diff] [blame] | 531 | "source/opt/convert_to_half_pass.cpp", |
| 532 | "source/opt/convert_to_half_pass.h", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 533 | "source/opt/copy_prop_arrays.cpp", |
| 534 | "source/opt/copy_prop_arrays.h", |
| 535 | "source/opt/dead_branch_elim_pass.cpp", |
| 536 | "source/opt/dead_branch_elim_pass.h", |
| 537 | "source/opt/dead_insert_elim_pass.cpp", |
| 538 | "source/opt/dead_insert_elim_pass.h", |
| 539 | "source/opt/dead_variable_elimination.cpp", |
| 540 | "source/opt/dead_variable_elimination.h", |
Ryan Harrison | 048dcd3 | 2019-04-16 14:31:36 -0400 | [diff] [blame] | 541 | "source/opt/decompose_initialized_variables_pass.cpp", |
| 542 | "source/opt/decompose_initialized_variables_pass.h", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 543 | "source/opt/decoration_manager.cpp", |
| 544 | "source/opt/decoration_manager.h", |
| 545 | "source/opt/def_use_manager.cpp", |
| 546 | "source/opt/def_use_manager.h", |
Steven Perron | 4b64beb | 2019-08-08 10:53:19 -0400 | [diff] [blame] | 547 | "source/opt/desc_sroa.cpp", |
| 548 | "source/opt/desc_sroa.h", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 549 | "source/opt/dominator_analysis.cpp", |
| 550 | "source/opt/dominator_analysis.h", |
| 551 | "source/opt/dominator_tree.cpp", |
| 552 | "source/opt/dominator_tree.h", |
| 553 | "source/opt/eliminate_dead_constant_pass.cpp", |
| 554 | "source/opt/eliminate_dead_constant_pass.h", |
| 555 | "source/opt/eliminate_dead_functions_pass.cpp", |
| 556 | "source/opt/eliminate_dead_functions_pass.h", |
Alastair Donaldson | 34c5ac6 | 2019-02-08 16:20:29 +0000 | [diff] [blame] | 557 | "source/opt/eliminate_dead_functions_util.cpp", |
| 558 | "source/opt/eliminate_dead_functions_util.h", |
Steven Perron | 1b0047f | 2019-02-14 13:42:35 -0500 | [diff] [blame] | 559 | "source/opt/eliminate_dead_members_pass.cpp", |
| 560 | "source/opt/eliminate_dead_members_pass.h", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 561 | "source/opt/feature_manager.cpp", |
| 562 | "source/opt/feature_manager.h", |
Steven Perron | 3a0bc9e | 2019-04-05 13:12:08 -0400 | [diff] [blame] | 563 | "source/opt/fix_storage_class.cpp", |
| 564 | "source/opt/fix_storage_class.h", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 565 | "source/opt/flatten_decoration_pass.cpp", |
| 566 | "source/opt/flatten_decoration_pass.h", |
| 567 | "source/opt/fold.cpp", |
| 568 | "source/opt/fold.h", |
| 569 | "source/opt/fold_spec_constant_op_and_composite_pass.cpp", |
| 570 | "source/opt/fold_spec_constant_op_and_composite_pass.h", |
| 571 | "source/opt/folding_rules.cpp", |
| 572 | "source/opt/folding_rules.h", |
| 573 | "source/opt/freeze_spec_constant_value_pass.cpp", |
| 574 | "source/opt/freeze_spec_constant_value_pass.h", |
| 575 | "source/opt/function.cpp", |
| 576 | "source/opt/function.h", |
Ryan Harrison | 01964e3 | 2019-04-03 11:44:09 -0400 | [diff] [blame] | 577 | "source/opt/generate_webgpu_initializers_pass.cpp", |
Shahbaz Youssefi | e8c2d95 | 2019-04-04 11:46:51 -0400 | [diff] [blame] | 578 | "source/opt/generate_webgpu_initializers_pass.h", |
David Neto | 3159010 | 2019-07-30 19:52:46 -0400 | [diff] [blame] | 579 | "source/opt/graphics_robust_access_pass.cpp", |
| 580 | "source/opt/graphics_robust_access_pass.h", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 581 | "source/opt/if_conversion.cpp", |
| 582 | "source/opt/if_conversion.h", |
| 583 | "source/opt/inline_exhaustive_pass.cpp", |
| 584 | "source/opt/inline_exhaustive_pass.h", |
| 585 | "source/opt/inline_opaque_pass.cpp", |
| 586 | "source/opt/inline_opaque_pass.h", |
| 587 | "source/opt/inline_pass.cpp", |
| 588 | "source/opt/inline_pass.h", |
greg-lunarg | 1e9fc1a | 2018-11-08 11:54:54 -0700 | [diff] [blame] | 589 | "source/opt/inst_bindless_check_pass.cpp", |
| 590 | "source/opt/inst_bindless_check_pass.h", |
greg-lunarg | 0640725 | 2019-08-16 07:18:34 -0600 | [diff] [blame] | 591 | "source/opt/inst_buff_addr_check_pass.cpp", |
| 592 | "source/opt/inst_buff_addr_check_pass.h", |
greg-lunarg | 1fe9bcc | 2020-03-12 07:19:52 -0600 | [diff] [blame] | 593 | "source/opt/inst_debug_printf_pass.cpp", |
| 594 | "source/opt/inst_debug_printf_pass.h", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 595 | "source/opt/instruction.cpp", |
| 596 | "source/opt/instruction.h", |
| 597 | "source/opt/instruction_list.cpp", |
| 598 | "source/opt/instruction_list.h", |
greg-lunarg | 1e9fc1a | 2018-11-08 11:54:54 -0700 | [diff] [blame] | 599 | "source/opt/instrument_pass.cpp", |
| 600 | "source/opt/instrument_pass.h", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 601 | "source/opt/ir_builder.h", |
| 602 | "source/opt/ir_context.cpp", |
| 603 | "source/opt/ir_context.h", |
| 604 | "source/opt/ir_loader.cpp", |
| 605 | "source/opt/ir_loader.h", |
| 606 | "source/opt/iterator.h", |
Ryan Harrison | 102e430 | 2019-04-12 12:14:23 -0400 | [diff] [blame] | 607 | "source/opt/legalize_vector_shuffle_pass.cpp", |
| 608 | "source/opt/legalize_vector_shuffle_pass.h", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 609 | "source/opt/licm_pass.cpp", |
| 610 | "source/opt/licm_pass.h", |
| 611 | "source/opt/local_access_chain_convert_pass.cpp", |
| 612 | "source/opt/local_access_chain_convert_pass.h", |
| 613 | "source/opt/local_redundancy_elimination.cpp", |
| 614 | "source/opt/local_redundancy_elimination.h", |
| 615 | "source/opt/local_single_block_elim_pass.cpp", |
| 616 | "source/opt/local_single_block_elim_pass.h", |
| 617 | "source/opt/local_single_store_elim_pass.cpp", |
| 618 | "source/opt/local_single_store_elim_pass.h", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 619 | "source/opt/log.h", |
| 620 | "source/opt/loop_dependence.cpp", |
| 621 | "source/opt/loop_dependence.h", |
| 622 | "source/opt/loop_dependence_helpers.cpp", |
| 623 | "source/opt/loop_descriptor.cpp", |
| 624 | "source/opt/loop_descriptor.h", |
| 625 | "source/opt/loop_fission.cpp", |
| 626 | "source/opt/loop_fission.h", |
| 627 | "source/opt/loop_fusion.cpp", |
| 628 | "source/opt/loop_fusion.h", |
| 629 | "source/opt/loop_fusion_pass.cpp", |
| 630 | "source/opt/loop_fusion_pass.h", |
| 631 | "source/opt/loop_peeling.cpp", |
| 632 | "source/opt/loop_peeling.h", |
| 633 | "source/opt/loop_unroller.cpp", |
| 634 | "source/opt/loop_unroller.h", |
| 635 | "source/opt/loop_unswitch_pass.cpp", |
| 636 | "source/opt/loop_unswitch_pass.h", |
| 637 | "source/opt/loop_utils.cpp", |
| 638 | "source/opt/loop_utils.h", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 639 | "source/opt/mem_pass.cpp", |
| 640 | "source/opt/mem_pass.h", |
| 641 | "source/opt/merge_return_pass.cpp", |
| 642 | "source/opt/merge_return_pass.h", |
| 643 | "source/opt/module.cpp", |
| 644 | "source/opt/module.h", |
| 645 | "source/opt/null_pass.h", |
| 646 | "source/opt/optimizer.cpp", |
| 647 | "source/opt/pass.cpp", |
| 648 | "source/opt/pass.h", |
| 649 | "source/opt/pass_manager.cpp", |
| 650 | "source/opt/pass_manager.h", |
| 651 | "source/opt/passes.h", |
| 652 | "source/opt/private_to_local_pass.cpp", |
| 653 | "source/opt/private_to_local_pass.h", |
greg-lunarg | c37388f | 2018-11-15 12:06:17 -0700 | [diff] [blame] | 654 | "source/opt/process_lines_pass.cpp", |
| 655 | "source/opt/process_lines_pass.h", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 656 | "source/opt/propagator.cpp", |
| 657 | "source/opt/propagator.h", |
| 658 | "source/opt/reduce_load_size.cpp", |
| 659 | "source/opt/reduce_load_size.h", |
| 660 | "source/opt/redundancy_elimination.cpp", |
| 661 | "source/opt/redundancy_elimination.h", |
| 662 | "source/opt/reflect.h", |
| 663 | "source/opt/register_pressure.cpp", |
| 664 | "source/opt/register_pressure.h", |
greg-lunarg | d11725b | 2019-09-03 11:22:13 -0600 | [diff] [blame] | 665 | "source/opt/relax_float_ops_pass.cpp", |
| 666 | "source/opt/relax_float_ops_pass.h", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 667 | "source/opt/remove_duplicates_pass.cpp", |
| 668 | "source/opt/remove_duplicates_pass.h", |
| 669 | "source/opt/replace_invalid_opc.cpp", |
| 670 | "source/opt/replace_invalid_opc.h", |
| 671 | "source/opt/scalar_analysis.cpp", |
| 672 | "source/opt/scalar_analysis.h", |
| 673 | "source/opt/scalar_analysis_nodes.h", |
| 674 | "source/opt/scalar_analysis_simplification.cpp", |
| 675 | "source/opt/scalar_replacement_pass.cpp", |
| 676 | "source/opt/scalar_replacement_pass.h", |
| 677 | "source/opt/set_spec_constant_default_value_pass.cpp", |
| 678 | "source/opt/set_spec_constant_default_value_pass.h", |
| 679 | "source/opt/simplification_pass.cpp", |
| 680 | "source/opt/simplification_pass.h", |
Ryan Harrison | f6d9a17 | 2019-05-09 12:56:10 -0400 | [diff] [blame] | 681 | "source/opt/split_invalid_unreachable_pass.cpp", |
| 682 | "source/opt/split_invalid_unreachable_pass.h", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 683 | "source/opt/ssa_rewrite_pass.cpp", |
| 684 | "source/opt/ssa_rewrite_pass.h", |
| 685 | "source/opt/strength_reduction_pass.cpp", |
| 686 | "source/opt/strength_reduction_pass.h", |
Ryan Harrison | e545522 | 2019-03-14 13:34:33 -0400 | [diff] [blame] | 687 | "source/opt/strip_atomic_counter_memory_pass.cpp", |
| 688 | "source/opt/strip_atomic_counter_memory_pass.h", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 689 | "source/opt/strip_debug_info_pass.cpp", |
| 690 | "source/opt/strip_debug_info_pass.h", |
| 691 | "source/opt/strip_reflect_info_pass.cpp", |
| 692 | "source/opt/strip_reflect_info_pass.h", |
Steven Perron | 5f599e7 | 2018-09-17 13:00:24 -0400 | [diff] [blame] | 693 | "source/opt/struct_cfg_analysis.cpp", |
| 694 | "source/opt/struct_cfg_analysis.h", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 695 | "source/opt/tree_iterator.h", |
| 696 | "source/opt/type_manager.cpp", |
| 697 | "source/opt/type_manager.h", |
| 698 | "source/opt/types.cpp", |
| 699 | "source/opt/types.h", |
| 700 | "source/opt/unify_const_pass.cpp", |
| 701 | "source/opt/unify_const_pass.h", |
dan sinclair | 67b2e15 | 2018-12-03 09:11:56 -0500 | [diff] [blame] | 702 | "source/opt/upgrade_memory_model.cpp", |
| 703 | "source/opt/upgrade_memory_model.h", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 704 | "source/opt/value_number_table.cpp", |
| 705 | "source/opt/value_number_table.h", |
| 706 | "source/opt/vector_dce.cpp", |
| 707 | "source/opt/vector_dce.h", |
| 708 | "source/opt/workaround1209.cpp", |
| 709 | "source/opt/workaround1209.h", |
Steven Perron | 60043ed | 2019-08-14 09:27:12 -0400 | [diff] [blame] | 710 | "source/opt/wrap_opkill.cpp", |
| 711 | "source/opt/wrap_opkill.h", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 712 | ] |
Corentin Wallez | 21bcb9d | 2018-09-06 10:50:27 -0400 | [diff] [blame] | 713 | |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 714 | deps = [ |
| 715 | ":spvtools", |
Shahbaz Youssefi | 1b34410 | 2020-01-24 17:14:16 -0500 | [diff] [blame] | 716 | ":spvtools_language_header_cldebuginfo100", |
| 717 | ":spvtools_language_header_debuginfo", |
Corentin Wallez | 4ae9b71 | 2019-08-30 15:09:34 +0200 | [diff] [blame] | 718 | ":spvtools_vendor_tables_spv-amd-shader-ballot", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 719 | ] |
Corentin Wallez | 21bcb9d | 2018-09-06 10:50:27 -0400 | [diff] [blame] | 720 | public_deps = [ |
| 721 | ":spvtools_headers", |
| 722 | ] |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 723 | |
David Turner | a6bfc26 | 2019-07-03 22:26:06 +0200 | [diff] [blame] | 724 | if (build_with_chromium) { |
| 725 | configs -= [ "//build/config/compiler:chromium_code" ] |
| 726 | configs += [ "//build/config/compiler:no_chromium_code" ] |
| 727 | } |
David Turner | 5081512 | 2019-07-10 22:37:10 +0200 | [diff] [blame] | 728 | configs += [ ":spvtools_internal_config" ] |
| 729 | } |
| 730 | |
| 731 | static_library("spvtools_link") { |
| 732 | sources = [ |
| 733 | "source/link/linker.cpp", |
Corentin Wallez | 21bcb9d | 2018-09-06 10:50:27 -0400 | [diff] [blame] | 734 | ] |
David Turner | 5081512 | 2019-07-10 22:37:10 +0200 | [diff] [blame] | 735 | deps = [ |
| 736 | ":spvtools", |
Corentin Wallez | 59de04a | 2019-07-12 16:35:59 +0200 | [diff] [blame] | 737 | ":spvtools_opt", |
David Turner | 5081512 | 2019-07-10 22:37:10 +0200 | [diff] [blame] | 738 | ":spvtools_val", |
| 739 | ] |
| 740 | public_deps = [ |
| 741 | ":spvtools_headers", |
| 742 | ] |
| 743 | if (build_with_chromium) { |
| 744 | configs -= [ "//build/config/compiler:chromium_code" ] |
| 745 | configs += [ "//build/config/compiler:no_chromium_code" ] |
| 746 | } |
| 747 | configs += [ ":spvtools_internal_config" ] |
| 748 | } |
| 749 | |
| 750 | static_library("spvtools_reduce") { |
| 751 | sources = [ |
| 752 | "source/reduce/change_operand_reduction_opportunity.cpp", |
| 753 | "source/reduce/change_operand_reduction_opportunity.h", |
| 754 | "source/reduce/change_operand_to_undef_reduction_opportunity.cpp", |
| 755 | "source/reduce/change_operand_to_undef_reduction_opportunity.h", |
| 756 | "source/reduce/conditional_branch_to_simple_conditional_branch_opportunity_finder.cpp", |
| 757 | "source/reduce/conditional_branch_to_simple_conditional_branch_opportunity_finder.h", |
| 758 | "source/reduce/conditional_branch_to_simple_conditional_branch_reduction_opportunity.cpp", |
| 759 | "source/reduce/conditional_branch_to_simple_conditional_branch_reduction_opportunity.h", |
| 760 | "source/reduce/merge_blocks_reduction_opportunity.cpp", |
| 761 | "source/reduce/merge_blocks_reduction_opportunity.h", |
| 762 | "source/reduce/merge_blocks_reduction_opportunity_finder.cpp", |
| 763 | "source/reduce/merge_blocks_reduction_opportunity_finder.h", |
| 764 | "source/reduce/operand_to_const_reduction_opportunity_finder.cpp", |
| 765 | "source/reduce/operand_to_const_reduction_opportunity_finder.h", |
| 766 | "source/reduce/operand_to_dominating_id_reduction_opportunity_finder.cpp", |
| 767 | "source/reduce/operand_to_dominating_id_reduction_opportunity_finder.h", |
| 768 | "source/reduce/operand_to_undef_reduction_opportunity_finder.cpp", |
| 769 | "source/reduce/operand_to_undef_reduction_opportunity_finder.h", |
| 770 | "source/reduce/reducer.cpp", |
| 771 | "source/reduce/reducer.h", |
| 772 | "source/reduce/reduction_opportunity.cpp", |
| 773 | "source/reduce/reduction_opportunity.h", |
Jamie Madill | e0d5544 | 2019-11-04 21:01:57 -0500 | [diff] [blame] | 774 | "source/reduce/reduction_opportunity_finder.h", |
David Turner | 5081512 | 2019-07-10 22:37:10 +0200 | [diff] [blame] | 775 | "source/reduce/reduction_pass.cpp", |
| 776 | "source/reduce/reduction_pass.h", |
| 777 | "source/reduce/reduction_util.cpp", |
| 778 | "source/reduce/reduction_util.h", |
| 779 | "source/reduce/remove_block_reduction_opportunity.cpp", |
| 780 | "source/reduce/remove_block_reduction_opportunity.h", |
| 781 | "source/reduce/remove_block_reduction_opportunity_finder.cpp", |
| 782 | "source/reduce/remove_block_reduction_opportunity_finder.h", |
| 783 | "source/reduce/remove_function_reduction_opportunity.cpp", |
| 784 | "source/reduce/remove_function_reduction_opportunity.h", |
| 785 | "source/reduce/remove_function_reduction_opportunity_finder.cpp", |
| 786 | "source/reduce/remove_function_reduction_opportunity_finder.h", |
| 787 | "source/reduce/remove_instruction_reduction_opportunity.cpp", |
| 788 | "source/reduce/remove_instruction_reduction_opportunity.h", |
David Turner | 5081512 | 2019-07-10 22:37:10 +0200 | [diff] [blame] | 789 | "source/reduce/remove_selection_reduction_opportunity.cpp", |
| 790 | "source/reduce/remove_selection_reduction_opportunity.h", |
| 791 | "source/reduce/remove_selection_reduction_opportunity_finder.cpp", |
| 792 | "source/reduce/remove_selection_reduction_opportunity_finder.h", |
| 793 | "source/reduce/remove_unreferenced_instruction_reduction_opportunity_finder.cpp", |
| 794 | "source/reduce/remove_unreferenced_instruction_reduction_opportunity_finder.h", |
| 795 | "source/reduce/simple_conditional_branch_to_branch_opportunity_finder.cpp", |
| 796 | "source/reduce/simple_conditional_branch_to_branch_opportunity_finder.h", |
| 797 | "source/reduce/simple_conditional_branch_to_branch_reduction_opportunity.cpp", |
| 798 | "source/reduce/simple_conditional_branch_to_branch_reduction_opportunity.h", |
| 799 | "source/reduce/structured_loop_to_selection_reduction_opportunity.cpp", |
| 800 | "source/reduce/structured_loop_to_selection_reduction_opportunity.h", |
| 801 | "source/reduce/structured_loop_to_selection_reduction_opportunity_finder.cpp", |
| 802 | "source/reduce/structured_loop_to_selection_reduction_opportunity_finder.h", |
Corentin Wallez | 59de04a | 2019-07-12 16:35:59 +0200 | [diff] [blame] | 803 | "source/spirv_reducer_options.cpp", |
| 804 | "source/spirv_reducer_options.h", |
David Turner | 5081512 | 2019-07-10 22:37:10 +0200 | [diff] [blame] | 805 | ] |
| 806 | deps = [ |
| 807 | ":spvtools", |
| 808 | ":spvtools_opt", |
| 809 | ] |
| 810 | public_deps = [ |
| 811 | ":spvtools_headers", |
| 812 | ] |
| 813 | if (build_with_chromium) { |
| 814 | configs -= [ "//build/config/compiler:chromium_code" ] |
| 815 | configs += [ "//build/config/compiler:no_chromium_code" ] |
| 816 | } |
| 817 | configs += [ ":spvtools_internal_config" ] |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 818 | } |
| 819 | |
dan sinclair | a97c1d9 | 2018-08-01 14:28:10 -0400 | [diff] [blame] | 820 | group("SPIRV-Tools") { |
Jamie Madill | 1c9ca42 | 2019-09-03 12:57:32 -0400 | [diff] [blame] | 821 | public_deps = [ |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 822 | ":spvtools", |
David Turner | 5081512 | 2019-07-10 22:37:10 +0200 | [diff] [blame] | 823 | ":spvtools_link", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 824 | ":spvtools_opt", |
David Turner | 5081512 | 2019-07-10 22:37:10 +0200 | [diff] [blame] | 825 | ":spvtools_reduce", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 826 | ":spvtools_val", |
| 827 | ] |
| 828 | } |
| 829 | |
Jamie Madill | 4b42cd1 | 2019-02-19 10:38:38 -0500 | [diff] [blame] | 830 | # The tests are scoped to Chromium to avoid needing to write gtest integration. |
| 831 | # See Chromium's third_party/googletest/BUILD.gn for a complete integration. |
| 832 | if (build_with_chromium) { |
| 833 | test("spvtools_test") { |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 834 | sources = [ |
Jamie Madill | 4b42cd1 | 2019-02-19 10:38:38 -0500 | [diff] [blame] | 835 | "test/assembly_context_test.cpp", |
| 836 | "test/assembly_format_test.cpp", |
| 837 | "test/binary_destroy_test.cpp", |
| 838 | "test/binary_endianness_test.cpp", |
| 839 | "test/binary_header_get_test.cpp", |
| 840 | "test/binary_parse_test.cpp", |
| 841 | "test/binary_strnlen_s_test.cpp", |
| 842 | "test/binary_to_text.literal_test.cpp", |
| 843 | "test/binary_to_text_test.cpp", |
| 844 | "test/comment_test.cpp", |
| 845 | "test/enum_set_test.cpp", |
| 846 | "test/enum_string_mapping_test.cpp", |
| 847 | "test/ext_inst.debuginfo_test.cpp", |
| 848 | "test/ext_inst.glsl_test.cpp", |
| 849 | "test/ext_inst.opencl_test.cpp", |
David Neto | 64f36ea | 2019-12-19 17:16:26 -0500 | [diff] [blame] | 850 | "test/ext_inst.cldebug100_test.cpp", |
Jamie Madill | 4b42cd1 | 2019-02-19 10:38:38 -0500 | [diff] [blame] | 851 | "test/fix_word_test.cpp", |
| 852 | "test/generator_magic_number_test.cpp", |
| 853 | "test/hex_float_test.cpp", |
| 854 | "test/immediate_int_test.cpp", |
| 855 | "test/libspirv_macros_test.cpp", |
| 856 | "test/name_mapper_test.cpp", |
| 857 | "test/named_id_test.cpp", |
| 858 | "test/opcode_make_test.cpp", |
| 859 | "test/opcode_require_capabilities_test.cpp", |
| 860 | "test/opcode_split_test.cpp", |
| 861 | "test/opcode_table_get_test.cpp", |
| 862 | "test/operand_capabilities_test.cpp", |
| 863 | "test/operand_pattern_test.cpp", |
| 864 | "test/operand_test.cpp", |
| 865 | "test/target_env_test.cpp", |
| 866 | "test/test_fixture.h", |
| 867 | "test/text_advance_test.cpp", |
| 868 | "test/text_destroy_test.cpp", |
| 869 | "test/text_literal_test.cpp", |
| 870 | "test/text_start_new_inst_test.cpp", |
| 871 | "test/text_to_binary.annotation_test.cpp", |
| 872 | "test/text_to_binary.barrier_test.cpp", |
| 873 | "test/text_to_binary.constant_test.cpp", |
| 874 | "test/text_to_binary.control_flow_test.cpp", |
| 875 | "test/text_to_binary.debug_test.cpp", |
| 876 | "test/text_to_binary.device_side_enqueue_test.cpp", |
| 877 | "test/text_to_binary.extension_test.cpp", |
| 878 | "test/text_to_binary.function_test.cpp", |
| 879 | "test/text_to_binary.group_test.cpp", |
| 880 | "test/text_to_binary.image_test.cpp", |
| 881 | "test/text_to_binary.literal_test.cpp", |
| 882 | "test/text_to_binary.memory_test.cpp", |
| 883 | "test/text_to_binary.misc_test.cpp", |
| 884 | "test/text_to_binary.mode_setting_test.cpp", |
| 885 | "test/text_to_binary.pipe_storage_test.cpp", |
| 886 | "test/text_to_binary.reserved_sampling_test.cpp", |
| 887 | "test/text_to_binary.subgroup_dispatch_test.cpp", |
| 888 | "test/text_to_binary.type_declaration_test.cpp", |
| 889 | "test/text_to_binary_test.cpp", |
| 890 | "test/text_word_get_test.cpp", |
| 891 | "test/unit_spirv.cpp", |
| 892 | "test/unit_spirv.h", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 893 | ] |
| 894 | |
Jamie Madill | 4b42cd1 | 2019-02-19 10:38:38 -0500 | [diff] [blame] | 895 | deps = [ |
Jamie Madill | 4b42cd1 | 2019-02-19 10:38:38 -0500 | [diff] [blame] | 896 | ":spvtools", |
David Neto | 64f36ea | 2019-12-19 17:16:26 -0500 | [diff] [blame] | 897 | ":spvtools_language_header_debuginfo", |
| 898 | ":spvtools_language_header_cldebuginfo100", |
Jamie Madill | 4b42cd1 | 2019-02-19 10:38:38 -0500 | [diff] [blame] | 899 | ":spvtools_val", |
David Turner | 5081512 | 2019-07-10 22:37:10 +0200 | [diff] [blame] | 900 | "//testing/gmock", |
| 901 | "//testing/gtest", |
| 902 | "//testing/gtest:gtest_main", |
Jamie Madill | 635b583 | 2019-09-04 12:43:26 -0400 | [diff] [blame] | 903 | "//third_party/googletest:gmock", |
| 904 | "//third_party/googletest:gtest", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 905 | ] |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 906 | |
Jamie Madill | 4b42cd1 | 2019-02-19 10:38:38 -0500 | [diff] [blame] | 907 | if (is_clang) { |
| 908 | cflags_cc = [ "-Wno-self-assign" ] |
| 909 | } |
Corentin Wallez | 21bcb9d | 2018-09-06 10:50:27 -0400 | [diff] [blame] | 910 | |
Jamie Madill | 4b42cd1 | 2019-02-19 10:38:38 -0500 | [diff] [blame] | 911 | configs += [ ":spvtools_internal_config" ] |
| 912 | } |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 913 | } |
| 914 | |
Corentin Wallez | 2d9a325 | 2018-08-02 18:48:03 +0200 | [diff] [blame] | 915 | if (spirv_tools_standalone) { |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 916 | group("fuzzers") { |
| 917 | testonly = true |
| 918 | deps = [ |
Corentin Wallez | 2d9a325 | 2018-08-02 18:48:03 +0200 | [diff] [blame] | 919 | "test/fuzzers", |
Dan Sinclair | a114e1f | 2018-07-17 13:53:15 -0400 | [diff] [blame] | 920 | ] |
| 921 | } |
| 922 | } |
dan sinclair | 1bdade7 | 2018-08-15 15:26:28 -0400 | [diff] [blame] | 923 | |
David Turner | 5081512 | 2019-07-10 22:37:10 +0200 | [diff] [blame] | 924 | source_set("spvtools_util_cli_consumer") { |
| 925 | sources = [ |
| 926 | "tools/util/cli_consumer.cpp", |
| 927 | "tools/util/cli_consumer.h", |
| 928 | ] |
Jamie Madill | e0d5544 | 2019-11-04 21:01:57 -0500 | [diff] [blame] | 929 | deps = [ |
| 930 | ":spvtools_headers", |
| 931 | ] |
David Turner | 5081512 | 2019-07-10 22:37:10 +0200 | [diff] [blame] | 932 | configs += [ ":spvtools_internal_config" ] |
| 933 | } |
| 934 | |
| 935 | source_set("spvtools_software_version") { |
dan sinclair | 1bdade7 | 2018-08-15 15:26:28 -0400 | [diff] [blame] | 936 | sources = [ |
| 937 | "source/software_version.cpp", |
David Turner | 5081512 | 2019-07-10 22:37:10 +0200 | [diff] [blame] | 938 | ] |
| 939 | deps = [ |
| 940 | ":spvtools_build_version", |
Corentin Wallez | 59de04a | 2019-07-12 16:35:59 +0200 | [diff] [blame] | 941 | ":spvtools_headers", |
David Turner | 5081512 | 2019-07-10 22:37:10 +0200 | [diff] [blame] | 942 | ] |
| 943 | configs += [ ":spvtools_internal_config" ] |
| 944 | } |
| 945 | |
| 946 | executable("spirv-as") { |
| 947 | sources = [ |
dan sinclair | 1bdade7 | 2018-08-15 15:26:28 -0400 | [diff] [blame] | 948 | "tools/as/as.cpp", |
| 949 | ] |
| 950 | deps = [ |
| 951 | ":spvtools", |
David Turner | 5081512 | 2019-07-10 22:37:10 +0200 | [diff] [blame] | 952 | ":spvtools_software_version", |
| 953 | ] |
| 954 | configs += [ ":spvtools_internal_config" ] |
| 955 | } |
| 956 | |
| 957 | executable("spirv-dis") { |
| 958 | sources = [ |
| 959 | "tools/dis/dis.cpp", |
| 960 | ] |
| 961 | deps = [ |
| 962 | ":spvtools", |
| 963 | ":spvtools_software_version", |
| 964 | ] |
| 965 | configs += [ ":spvtools_internal_config" ] |
| 966 | } |
| 967 | |
| 968 | executable("spirv-val") { |
| 969 | sources = [ |
| 970 | "tools/val/val.cpp", |
| 971 | ] |
| 972 | deps = [ |
| 973 | ":spvtools", |
| 974 | ":spvtools_software_version", |
| 975 | ":spvtools_util_cli_consumer", |
| 976 | ":spvtools_val", |
| 977 | ] |
| 978 | configs += [ ":spvtools_internal_config" ] |
| 979 | } |
| 980 | |
| 981 | executable("spirv-cfg") { |
| 982 | sources = [ |
| 983 | "tools/cfg/bin_to_dot.cpp", |
| 984 | "tools/cfg/bin_to_dot.h", |
| 985 | "tools/cfg/cfg.cpp", |
| 986 | ] |
| 987 | deps = [ |
| 988 | ":spvtools", |
| 989 | ":spvtools_software_version", |
dan sinclair | 1bdade7 | 2018-08-15 15:26:28 -0400 | [diff] [blame] | 990 | ] |
Corentin Wallez | 21bcb9d | 2018-09-06 10:50:27 -0400 | [diff] [blame] | 991 | configs += [ ":spvtools_internal_config" ] |
dan sinclair | 1bdade7 | 2018-08-15 15:26:28 -0400 | [diff] [blame] | 992 | } |
David Turner | a6bfc26 | 2019-07-03 22:26:06 +0200 | [diff] [blame] | 993 | |
| 994 | executable("spirv-opt") { |
| 995 | sources = [ |
David Turner | a6bfc26 | 2019-07-03 22:26:06 +0200 | [diff] [blame] | 996 | "tools/opt/opt.cpp", |
David Turner | a6bfc26 | 2019-07-03 22:26:06 +0200 | [diff] [blame] | 997 | ] |
| 998 | deps = [ |
| 999 | ":spvtools", |
| 1000 | ":spvtools_opt", |
David Turner | 5081512 | 2019-07-10 22:37:10 +0200 | [diff] [blame] | 1001 | ":spvtools_software_version", |
| 1002 | ":spvtools_util_cli_consumer", |
David Turner | a6bfc26 | 2019-07-03 22:26:06 +0200 | [diff] [blame] | 1003 | ":spvtools_val", |
David Turner | a6bfc26 | 2019-07-03 22:26:06 +0200 | [diff] [blame] | 1004 | ] |
| 1005 | configs += [ ":spvtools_internal_config" ] |
| 1006 | } |
David Turner | 5081512 | 2019-07-10 22:37:10 +0200 | [diff] [blame] | 1007 | |
| 1008 | executable("spirv-link") { |
| 1009 | sources = [ |
| 1010 | "tools/link/linker.cpp", |
| 1011 | ] |
| 1012 | deps = [ |
| 1013 | ":spvtools", |
| 1014 | ":spvtools_link", |
| 1015 | ":spvtools_opt", |
| 1016 | ":spvtools_software_version", |
| 1017 | ":spvtools_val", |
| 1018 | ] |
| 1019 | configs += [ ":spvtools_internal_config" ] |
| 1020 | } |
| 1021 | |
| 1022 | if (!is_ios) { |
| 1023 | # iOS does not allow std::system calls which spirv-reduce requires |
| 1024 | executable("spirv-reduce") { |
| 1025 | sources = [ |
David Turner | 5081512 | 2019-07-10 22:37:10 +0200 | [diff] [blame] | 1026 | "tools/reduce/reduce.cpp", |
| 1027 | ] |
| 1028 | deps = [ |
| 1029 | ":spvtools", |
Corentin Wallez | 59de04a | 2019-07-12 16:35:59 +0200 | [diff] [blame] | 1030 | ":spvtools_opt", |
David Turner | 5081512 | 2019-07-10 22:37:10 +0200 | [diff] [blame] | 1031 | ":spvtools_reduce", |
| 1032 | ":spvtools_software_version", |
| 1033 | ":spvtools_util_cli_consumer", |
| 1034 | ":spvtools_val", |
| 1035 | ] |
| 1036 | configs += [ ":spvtools_internal_config" ] |
| 1037 | } |
| 1038 | } |
| 1039 | |
| 1040 | group("all_spirv_tools") { |
| 1041 | deps = [ |
| 1042 | ":spirv-as", |
| 1043 | ":spirv-cfg", |
| 1044 | ":spirv-dis", |
| 1045 | ":spirv-link", |
| 1046 | ":spirv-opt", |
| 1047 | ":spirv-val", |
| 1048 | ] |
| 1049 | if (!is_ios) { |
| 1050 | deps += [ ":spirv-reduce" ] |
| 1051 | } |
| 1052 | } |