blob: 977e433885b70c7e46127733aa3fa21e459408eb [file] [log] [blame]
Ryan Harrison29628882020-04-08 20:40:25 +00001# 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
15import("//build_overrides/tint.gni")
16
17# This file contains Tint-related build flags.
18
19declare_args() {
Ryan Harrisond34b2102020-04-27 15:31:27 +000020 # Path to tint checkout
21 if (!defined(tint_root_dir)) {
22 tint_root_dir = "//"
23 }
24
Ryan Harrisond1cf8a82020-04-15 20:35:38 +000025 # Path to spirv-tools checkout
26 if (!defined(tint_spirv_tools_dir)) {
Ryan Harrison3374f432022-03-28 18:01:02 +000027 tint_spirv_tools_dir = "//third_party/vulkan-deps/spirv-tools/src"
Ryan Harrisond1cf8a82020-04-15 20:35:38 +000028 }
29
Ryan Harrison0a196c12020-04-17 13:18:20 +000030 # Path to googletest checkout
31 if (!defined(tint_googletest_dir)) {
32 tint_googletest_dir = "//third_party/googletest"
33 }
34
Ryan Harrisond1cf8a82020-04-15 20:35:38 +000035 # Path to spirv-headers checkout
36 if (!defined(tint_spirv_headers_dir)) {
Ryan Harrison3374f432022-03-28 18:01:02 +000037 tint_spirv_headers_dir = "//third_party/vulkan-deps/spirv-headers/src"
Ryan Harrisond1cf8a82020-04-15 20:35:38 +000038 }
39
Ryan Harrisond1cf8a82020-04-15 20:35:38 +000040 # Build the SPIR-V input reader
41 if (!defined(tint_build_spv_reader)) {
Ryan Harrison40f16dd2020-07-30 18:44:04 +000042 tint_build_spv_reader = true
Ryan Harrisond1cf8a82020-04-15 20:35:38 +000043 }
44
Ryan Harrison2b45a522020-04-15 20:37:02 +000045 # Build the SPIR-V output writer
46 if (!defined(tint_build_spv_writer)) {
Ryan Harrison40f16dd2020-07-30 18:44:04 +000047 tint_build_spv_writer = true
Ryan Harrison2b45a522020-04-15 20:37:02 +000048 }
49
Ryan Harrison0caab672020-04-15 20:47:55 +000050 # Build the WGSL input reader
51 if (!defined(tint_build_wgsl_reader)) {
Ryan Harrison40f16dd2020-07-30 18:44:04 +000052 tint_build_wgsl_reader = true
Ryan Harrison0caab672020-04-15 20:47:55 +000053 }
54
Ryan Harrison460345d2020-04-15 20:54:10 +000055 # Build the WGSL output writer
56 if (!defined(tint_build_wgsl_writer)) {
Ryan Harrison40f16dd2020-07-30 18:44:04 +000057 tint_build_wgsl_writer = true
Ryan Harrison460345d2020-04-15 20:54:10 +000058 }
dan sinclair2a599012020-06-23 17:48:40 +000059
60 # Build the MSL output writer
61 if (!defined(tint_build_msl_writer)) {
Ryan Harrison40f16dd2020-07-30 18:44:04 +000062 tint_build_msl_writer = true
dan sinclair2a599012020-06-23 17:48:40 +000063 }
Ryan Harrison7a0b7342020-07-22 20:41:12 +000064
65 # Build the HLSL output writer
66 if (!defined(tint_build_hlsl_writer)) {
Ryan Harrison40f16dd2020-07-30 18:44:04 +000067 tint_build_hlsl_writer = true
Ryan Harrison7a0b7342020-07-22 20:41:12 +000068 }
Stephen Whitea9f8c7d2021-10-06 18:55:10 +000069
70 # Build the GLSL output writer
71 if (!defined(tint_build_glsl_writer)) {
72 tint_build_glsl_writer = true
73 }
dan sinclair77bf2332022-06-22 12:40:43 +000074
dan sinclair0917fbb2023-03-07 18:28:38 +000075 # Build the Syntax Tree writer
76 if (!defined(tint_build_syntax_tree_writer)) {
77 tint_build_syntax_tree_writer = false
78 }
79
James Price9d3af652023-04-26 22:05:42 +000080 # Build the Tint IR
81 if (!defined(tint_build_ir)) {
82 tint_build_ir = false
83 }
84
dan sinclair77bf2332022-06-22 12:40:43 +000085 # Build unittests
86 if (!defined(tint_build_unittests)) {
87 tint_build_unittests = true
88 }
Ryan Harrisond1cf8a82020-04-15 20:35:38 +000089}