Ryan Harrison | 2962888 | 2020-04-08 20:40:25 +0000 | [diff] [blame] | 1 | # Copyright 2020 The Tint Authors. |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
| 15 | import("//build_overrides/tint.gni") |
| 16 | |
| 17 | # This file contains Tint-related build flags. |
| 18 | |
| 19 | declare_args() { |
Ryan Harrison | d34b210 | 2020-04-27 15:31:27 +0000 | [diff] [blame] | 20 | # Path to tint checkout |
| 21 | if (!defined(tint_root_dir)) { |
| 22 | tint_root_dir = "//" |
| 23 | } |
| 24 | |
Ryan Harrison | d1cf8a8 | 2020-04-15 20:35:38 +0000 | [diff] [blame] | 25 | # Path to spirv-tools checkout |
| 26 | if (!defined(tint_spirv_tools_dir)) { |
Ryan Harrison | 3374f43 | 2022-03-28 18:01:02 +0000 | [diff] [blame] | 27 | tint_spirv_tools_dir = "//third_party/vulkan-deps/spirv-tools/src" |
Ryan Harrison | d1cf8a8 | 2020-04-15 20:35:38 +0000 | [diff] [blame] | 28 | } |
| 29 | |
Ryan Harrison | 0a196c1 | 2020-04-17 13:18:20 +0000 | [diff] [blame] | 30 | # Path to googletest checkout |
| 31 | if (!defined(tint_googletest_dir)) { |
| 32 | tint_googletest_dir = "//third_party/googletest" |
| 33 | } |
| 34 | |
Ryan Harrison | d1cf8a8 | 2020-04-15 20:35:38 +0000 | [diff] [blame] | 35 | # Path to spirv-headers checkout |
| 36 | if (!defined(tint_spirv_headers_dir)) { |
Ryan Harrison | 3374f43 | 2022-03-28 18:01:02 +0000 | [diff] [blame] | 37 | tint_spirv_headers_dir = "//third_party/vulkan-deps/spirv-headers/src" |
Ryan Harrison | d1cf8a8 | 2020-04-15 20:35:38 +0000 | [diff] [blame] | 38 | } |
| 39 | |
Ryan Harrison | d1cf8a8 | 2020-04-15 20:35:38 +0000 | [diff] [blame] | 40 | # Build the SPIR-V input reader |
| 41 | if (!defined(tint_build_spv_reader)) { |
Ryan Harrison | 40f16dd | 2020-07-30 18:44:04 +0000 | [diff] [blame] | 42 | tint_build_spv_reader = true |
Ryan Harrison | d1cf8a8 | 2020-04-15 20:35:38 +0000 | [diff] [blame] | 43 | } |
| 44 | |
Ryan Harrison | 2b45a52 | 2020-04-15 20:37:02 +0000 | [diff] [blame] | 45 | # Build the SPIR-V output writer |
| 46 | if (!defined(tint_build_spv_writer)) { |
Ryan Harrison | 40f16dd | 2020-07-30 18:44:04 +0000 | [diff] [blame] | 47 | tint_build_spv_writer = true |
Ryan Harrison | 2b45a52 | 2020-04-15 20:37:02 +0000 | [diff] [blame] | 48 | } |
| 49 | |
Ryan Harrison | 0caab67 | 2020-04-15 20:47:55 +0000 | [diff] [blame] | 50 | # Build the WGSL input reader |
| 51 | if (!defined(tint_build_wgsl_reader)) { |
Ryan Harrison | 40f16dd | 2020-07-30 18:44:04 +0000 | [diff] [blame] | 52 | tint_build_wgsl_reader = true |
Ryan Harrison | 0caab67 | 2020-04-15 20:47:55 +0000 | [diff] [blame] | 53 | } |
| 54 | |
Ryan Harrison | 460345d | 2020-04-15 20:54:10 +0000 | [diff] [blame] | 55 | # Build the WGSL output writer |
| 56 | if (!defined(tint_build_wgsl_writer)) { |
Ryan Harrison | 40f16dd | 2020-07-30 18:44:04 +0000 | [diff] [blame] | 57 | tint_build_wgsl_writer = true |
Ryan Harrison | 460345d | 2020-04-15 20:54:10 +0000 | [diff] [blame] | 58 | } |
dan sinclair | 2a59901 | 2020-06-23 17:48:40 +0000 | [diff] [blame] | 59 | |
| 60 | # Build the MSL output writer |
| 61 | if (!defined(tint_build_msl_writer)) { |
Ryan Harrison | 40f16dd | 2020-07-30 18:44:04 +0000 | [diff] [blame] | 62 | tint_build_msl_writer = true |
dan sinclair | 2a59901 | 2020-06-23 17:48:40 +0000 | [diff] [blame] | 63 | } |
Ryan Harrison | 7a0b734 | 2020-07-22 20:41:12 +0000 | [diff] [blame] | 64 | |
| 65 | # Build the HLSL output writer |
| 66 | if (!defined(tint_build_hlsl_writer)) { |
Ryan Harrison | 40f16dd | 2020-07-30 18:44:04 +0000 | [diff] [blame] | 67 | tint_build_hlsl_writer = true |
Ryan Harrison | 7a0b734 | 2020-07-22 20:41:12 +0000 | [diff] [blame] | 68 | } |
Stephen White | a9f8c7d | 2021-10-06 18:55:10 +0000 | [diff] [blame] | 69 | |
| 70 | # Build the GLSL output writer |
| 71 | if (!defined(tint_build_glsl_writer)) { |
| 72 | tint_build_glsl_writer = true |
| 73 | } |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 74 | |
dan sinclair | 0917fbb | 2023-03-07 18:28:38 +0000 | [diff] [blame] | 75 | # Build the Syntax Tree writer |
| 76 | if (!defined(tint_build_syntax_tree_writer)) { |
| 77 | tint_build_syntax_tree_writer = false |
| 78 | } |
| 79 | |
James Price | 9d3af65 | 2023-04-26 22:05:42 +0000 | [diff] [blame] | 80 | # Build the Tint IR |
| 81 | if (!defined(tint_build_ir)) { |
| 82 | tint_build_ir = false |
| 83 | } |
| 84 | |
dan sinclair | 77bf233 | 2022-06-22 12:40:43 +0000 | [diff] [blame] | 85 | # Build unittests |
| 86 | if (!defined(tint_build_unittests)) { |
| 87 | tint_build_unittests = true |
| 88 | } |
Ryan Harrison | d1cf8a8 | 2020-04-15 20:35:38 +0000 | [diff] [blame] | 89 | } |