diff --git a/CMakeLists.txt b/CMakeLists.txt index 77c0743d50b..b6fc27371e7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -269,6 +269,7 @@ target_include_directories(dawn_public_config INTERFACE # The internal config contains additional path but includes the dawn_public_config include paths add_library(dawn_internal_config INTERFACE) target_include_directories(dawn_internal_config INTERFACE + "${PROJECT_SOURCE_DIR}" "${DAWN_SRC_DIR}" "${DAWN_BUILD_GEN_DIR}/src" ) @@ -420,6 +421,9 @@ add_subdirectory(third_party) # BUILD_SHARED_LIBS=1, so always build it as static for now. set(BUILD_SHARED_LIBS_SAVED ${BUILD_SHARED_LIBS}) set(BUILD_SHARED_LIBS 0) + +add_subdirectory(src/utils) + # Only build Tint when we are not building under Emscripten. if (NOT ${DAWN_ENABLE_EMSCRIPTEN}) add_subdirectory(src/tint) diff --git a/src/dawn/common/BUILD.gn b/src/dawn/common/BUILD.gn index 33ac0215f1d..63d20a8cac2 100644 --- a/src/dawn/common/BUILD.gn +++ b/src/dawn/common/BUILD.gn @@ -328,6 +328,7 @@ if (is_win || is_linux || is_chromeos || is_mac || is_fuchsia || is_android || ":dawn_gpu_info_gen", ":dawn_version_gen", "${dawn_root}/src/dawn/partition_alloc:raw_ptr", + "${dawn_root}/src/utils:utils", ] if (is_apple) { diff --git a/src/dawn/common/CMakeLists.txt b/src/dawn/common/CMakeLists.txt index 9ea5ef54cbd..aa0e401f3a6 100644 --- a/src/dawn/common/CMakeLists.txt +++ b/src/dawn/common/CMakeLists.txt @@ -172,5 +172,6 @@ dawn_add_library( PRIVATE_DEPENDS absl::inlined_vector dawn::partition_alloc + dawn_shared_utils ${conditional_private_depends} ) diff --git a/src/dawn/common/Compiler.h b/src/dawn/common/Compiler.h index 936646ffb31..2ccb57ab601 100644 --- a/src/dawn/common/Compiler.h +++ b/src/dawn/common/Compiler.h @@ -28,6 +28,8 @@ #ifndef SRC_DAWN_COMMON_COMPILER_H_ #define SRC_DAWN_COMMON_COMPILER_H_ +#include "src/utils/compiler.h" + // Defines macros for compiler-specific functionality // DAWN_COMPILER_IS(CLANG|GCC|MSVC): Compiler detection @@ -55,25 +57,6 @@ // code block as usage of undefined macro "function" will be blocked by the compiler. #define DAWN_COMPILER_IS(X) (1 == DAWN_COMPILER_IS_##X) -// DAWN_HAS_ATTRIBUTE -// -// A wrapper around `__has_attribute`. This test whether its operand is recognized by the compiler. -#if defined(__has_attribute) -#define DAWN_HAS_ATTRIBUTE(x) __has_attribute(x) -#else -#define DAWN_HAS_ATTRIBUTE(x) 0 -#endif - -// DAWN_HAS_CPP_ATTRIBUTE -// -// A wrapper around `__has_cpp_attribute`. This test whether its operand is recognized by the -// compiler. -#if defined(__has_cpp_attribute) -#define DAWN_HAS_CPP_ATTRIBUTE(x) __has_cpp_attribute(x) -#else -#define DAWN_HAS_CPP_ATTRIBUTE(x) 0 -#endif - // DAWN_BUILTIN_UNREACHABLE() // // Hints the compiler that a code path is unreachable. diff --git a/src/dawn/tests/BUILD.gn b/src/dawn/tests/BUILD.gn index 957178b46a9..803baf5041d 100644 --- a/src/dawn/tests/BUILD.gn +++ b/src/dawn/tests/BUILD.gn @@ -47,6 +47,7 @@ group("tests") { ":dawn_perf_tests", ":dawn_unittests", "${dawn_root}/src/dawn/tests/benchmarks:dawn_benchmarks", + "${dawn_root}/src/utils", ] } diff --git a/src/tint/CMakeLists.txt b/src/tint/CMakeLists.txt index fdb4c023105..61f4f4d2d41 100644 --- a/src/tint/CMakeLists.txt +++ b/src/tint/CMakeLists.txt @@ -575,6 +575,8 @@ function(tint_target_add_external_dependencies TARGET KIND) target_link_libraries(${TARGET} PRIVATE Threads::Threads) elseif(${DEPENDENCY} STREQUAL "winsock") target_link_libraries(${TARGET} PRIVATE ws2_32) + elseif(${DEPENDENCY} STREQUAL "src_utils") + target_link_libraries(${TARGET} PRIVATE dawn_shared_utils) else() message(FATAL_ERROR "unhandled external dependency ${DEPENDENCY}") endif() diff --git a/src/tint/api/BUILD.bazel b/src/tint/api/BUILD.bazel index 4a82e4b4781..8a0a6c4a91e 100644 --- a/src/tint/api/BUILD.bazel +++ b/src/tint/api/BUILD.bazel @@ -72,6 +72,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ] + select({ ":tint_build_glsl_writer": [ "//src/tint/lang/glsl/writer", diff --git a/src/tint/api/BUILD.cmake b/src/tint/api/BUILD.cmake index f851c9bbd8b..0037d83276f 100644 --- a/src/tint/api/BUILD.cmake +++ b/src/tint/api/BUILD.cmake @@ -75,6 +75,10 @@ tint_target_add_dependencies(tint_api lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_api lib + "src_utils" +) + if(TINT_BUILD_GLSL_WRITER) tint_target_add_dependencies(tint_api lib tint_lang_glsl_writer diff --git a/src/tint/api/BUILD.gn b/src/tint/api/BUILD.gn index 183e21a61a4..f44661984d4 100644 --- a/src/tint/api/BUILD.gn +++ b/src/tint/api/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../scripts/dawn_overrides_with_defaults.gni") import("../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -44,6 +45,7 @@ libtint_source_set("api") { "tint.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", diff --git a/src/tint/api/common/BUILD.bazel b/src/tint/api/common/BUILD.bazel index e16a4a4b721..e48f69fd9af 100644 --- a/src/tint/api/common/BUILD.bazel +++ b/src/tint/api/common/BUILD.bazel @@ -57,6 +57,7 @@ cc_library( "//src/tint/utils/rtti", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -82,6 +83,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/api/common/BUILD.cmake b/src/tint/api/common/BUILD.cmake index 2b7ce2c85ca..92389622f54 100644 --- a/src/tint/api/common/BUILD.cmake +++ b/src/tint/api/common/BUILD.cmake @@ -58,6 +58,10 @@ tint_target_add_dependencies(tint_api_common lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_api_common lib + "src_utils" +) + ################################################################################ # Target: tint_api_common_test # Kind: test @@ -84,4 +88,5 @@ tint_target_add_dependencies(tint_api_common_test test tint_target_add_external_dependencies(tint_api_common_test test "gtest" + "src_utils" ) diff --git a/src/tint/api/common/BUILD.gn b/src/tint/api/common/BUILD.gn index 52cf871b39a..66b41e05262 100644 --- a/src/tint/api/common/BUILD.gn +++ b/src/tint/api/common/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -49,6 +50,7 @@ libtint_source_set("common") { "override_id.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/utils/containers", "${tint_src_dir}/utils/diagnostic", "${tint_src_dir}/utils/ice", @@ -69,6 +71,7 @@ if (tint_build_unittests) { "override_id_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/utils/containers", diff --git a/src/tint/cmd/BUILD.gn b/src/tint/cmd/BUILD.gn index e74a2fd7ca4..9806aa37b26 100644 --- a/src/tint/cmd/BUILD.gn +++ b/src/tint/cmd/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../scripts/dawn_overrides_with_defaults.gni") import("../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") diff --git a/src/tint/cmd/bench/BUILD.bazel b/src/tint/cmd/bench/BUILD.bazel index 71fa1c6d6cd..d20173341c0 100644 --- a/src/tint/cmd/bench/BUILD.bazel +++ b/src/tint/cmd/bench/BUILD.bazel @@ -69,6 +69,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@benchmark", + "//src/utils", ] + select({ ":tint_build_wgsl_reader": [ "//src/tint/lang/wgsl/reader", @@ -108,6 +109,7 @@ cc_binary( "//src/tint/utils/text", "//src/tint/utils/traits", "@benchmark", + "//src/utils", ] + select({ ":tint_build_glsl_writer_and_tint_build_wgsl_reader": [ "//src/tint/lang/glsl/writer:bench", diff --git a/src/tint/cmd/bench/BUILD.cmake b/src/tint/cmd/bench/BUILD.cmake index 2edf7a47834..525e29a000e 100644 --- a/src/tint/cmd/bench/BUILD.cmake +++ b/src/tint/cmd/bench/BUILD.cmake @@ -72,6 +72,7 @@ tint_target_add_dependencies(tint_cmd_bench_bench_cmd bench_cmd tint_target_add_external_dependencies(tint_cmd_bench_bench_cmd bench_cmd "google-benchmark" + "src_utils" ) if(TINT_BUILD_GLSL_WRITER AND TINT_BUILD_WGSL_READER) @@ -155,6 +156,7 @@ tint_target_add_dependencies(tint_cmd_bench_bench bench tint_target_add_external_dependencies(tint_cmd_bench_bench bench "google-benchmark" + "src_utils" ) if(TINT_BUILD_WGSL_READER) diff --git a/src/tint/cmd/bench/BUILD.gn b/src/tint/cmd/bench/BUILD.gn index 972a603591d..44512615b3a 100644 --- a/src/tint/cmd/bench/BUILD.gn +++ b/src/tint/cmd/bench/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -49,6 +50,7 @@ if (tint_build_benchmarks) { "bench.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:google_benchmark", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", @@ -89,6 +91,7 @@ if (tint_build_benchmarks) { output_name = "tint_benchmark" sources = [ "main_bench.cc" ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:google_benchmark", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core:bench", diff --git a/src/tint/cmd/common/BUILD.bazel b/src/tint/cmd/common/BUILD.bazel index b5967532966..1bcc65d93e5 100644 --- a/src/tint/cmd/common/BUILD.bazel +++ b/src/tint/cmd/common/BUILD.bazel @@ -71,6 +71,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ] + select({ ":tint_build_spv_reader": [ "//src/tint/lang/spirv/reader", diff --git a/src/tint/cmd/common/BUILD.cmake b/src/tint/cmd/common/BUILD.cmake index bded2c4e041..39e50754620 100644 --- a/src/tint/cmd/common/BUILD.cmake +++ b/src/tint/cmd/common/BUILD.cmake @@ -72,6 +72,10 @@ tint_target_add_dependencies(tint_cmd_common lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_cmd_common lib + "src_utils" +) + if(TINT_BUILD_SPV_READER) tint_target_add_dependencies(tint_cmd_common lib tint_lang_spirv_reader diff --git a/src/tint/cmd/common/BUILD.gn b/src/tint/cmd/common/BUILD.gn index 406273e678b..87f80277a4d 100644 --- a/src/tint/cmd/common/BUILD.gn +++ b/src/tint/cmd/common/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -44,6 +45,7 @@ libtint_source_set("common") { "helper.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", diff --git a/src/tint/cmd/fuzz/BUILD.gn b/src/tint/cmd/fuzz/BUILD.gn index 6caa255988a..bd18a5ededd 100644 --- a/src/tint/cmd/fuzz/BUILD.gn +++ b/src/tint/cmd/fuzz/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") diff --git a/src/tint/cmd/fuzz/ir/BUILD.cmake b/src/tint/cmd/fuzz/ir/BUILD.cmake index 405425142cb..95c3c2bb464 100644 --- a/src/tint/cmd/fuzz/ir/BUILD.cmake +++ b/src/tint/cmd/fuzz/ir/BUILD.cmake @@ -79,6 +79,7 @@ tint_target_add_dependencies(tint_cmd_fuzz_ir_fuzz_cmd fuzz_cmd tint_target_add_external_dependencies(tint_cmd_fuzz_ir_fuzz_cmd fuzz_cmd "libprotobuf-mutator" + "src_utils" ) if(TINT_BUILD_GLSL_WRITER) @@ -172,6 +173,7 @@ tint_target_add_dependencies(tint_cmd_fuzz_ir_fuzz fuzz ) tint_target_add_external_dependencies(tint_cmd_fuzz_ir_fuzz fuzz + "src_utils" "thread" ) diff --git a/src/tint/cmd/fuzz/ir/BUILD.gn b/src/tint/cmd/fuzz/ir/BUILD.gn index 77bb0b69602..b767f8d70d5 100644 --- a/src/tint/cmd/fuzz/ir/BUILD.gn +++ b/src/tint/cmd/fuzz/ir/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -44,6 +45,7 @@ tint_fuzz_source_set("fuzz") { "fuzz.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:thread", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", @@ -86,6 +88,7 @@ if (tint_build_ir_binary && tint_build_ir_fuzzer && output_name = "tint_ir_fuzzer" sources = [ "main_fuzz.cc" ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_lpm_dir}:libprotobuf-mutator", "${tint_src_dir}/api/common", "${tint_src_dir}/cmd/fuzz/ir:fuzz", diff --git a/src/tint/cmd/fuzz/ir/as/BUILD.bazel b/src/tint/cmd/fuzz/ir/as/BUILD.bazel index ec415fab196..163dab03fc2 100644 --- a/src/tint/cmd/fuzz/ir/as/BUILD.bazel +++ b/src/tint/cmd/fuzz/ir/as/BUILD.bazel @@ -72,6 +72,7 @@ cc_binary( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ] + select({ ":tint_build_ir_binary": [ "//src/tint/lang/core/ir/binary", diff --git a/src/tint/cmd/fuzz/ir/as/BUILD.cmake b/src/tint/cmd/fuzz/ir/as/BUILD.cmake index e5a93652464..33d83dd7301 100644 --- a/src/tint/cmd/fuzz/ir/as/BUILD.cmake +++ b/src/tint/cmd/fuzz/ir/as/BUILD.cmake @@ -77,6 +77,10 @@ tint_target_add_dependencies(tint_cmd_fuzz_ir_as_cmd cmd tint_utils_traits ) +tint_target_add_external_dependencies(tint_cmd_fuzz_ir_as_cmd cmd + "src_utils" +) + if(TINT_BUILD_IR_BINARY) tint_target_add_dependencies(tint_cmd_fuzz_ir_as_cmd cmd tint_lang_core_ir_binary diff --git a/src/tint/cmd/fuzz/ir/as/BUILD.gn b/src/tint/cmd/fuzz/ir/as/BUILD.gn index f0ed07044e7..668bba42fe5 100644 --- a/src/tint/cmd/fuzz/ir/as/BUILD.gn +++ b/src/tint/cmd/fuzz/ir/as/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -42,6 +43,7 @@ if (tint_build_ir_binary && tint_build_wgsl_reader && tint_build_ir_fuzzer) { output_name = "ir_fuzz_as" sources = [ "main.cc" ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api", "${tint_src_dir}/api/common", "${tint_src_dir}/cmd/common", diff --git a/src/tint/cmd/fuzz/ir/dis/BUILD.bazel b/src/tint/cmd/fuzz/ir/dis/BUILD.bazel index e22b5fb441e..7af1050009a 100644 --- a/src/tint/cmd/fuzz/ir/dis/BUILD.bazel +++ b/src/tint/cmd/fuzz/ir/dis/BUILD.bazel @@ -72,6 +72,7 @@ cc_binary( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ] + select({ ":tint_build_ir_binary": [ "//src/tint/lang/core/ir/binary", diff --git a/src/tint/cmd/fuzz/ir/dis/BUILD.cmake b/src/tint/cmd/fuzz/ir/dis/BUILD.cmake index cb43cb830e7..0925bf8cd9c 100644 --- a/src/tint/cmd/fuzz/ir/dis/BUILD.cmake +++ b/src/tint/cmd/fuzz/ir/dis/BUILD.cmake @@ -77,6 +77,10 @@ tint_target_add_dependencies(tint_cmd_fuzz_ir_dis_cmd cmd tint_utils_traits ) +tint_target_add_external_dependencies(tint_cmd_fuzz_ir_dis_cmd cmd + "src_utils" +) + if(TINT_BUILD_IR_BINARY) tint_target_add_dependencies(tint_cmd_fuzz_ir_dis_cmd cmd tint_lang_core_ir_binary diff --git a/src/tint/cmd/fuzz/ir/dis/BUILD.gn b/src/tint/cmd/fuzz/ir/dis/BUILD.gn index 3e6b7704320..7b5fc2ccaa9 100644 --- a/src/tint/cmd/fuzz/ir/dis/BUILD.gn +++ b/src/tint/cmd/fuzz/ir/dis/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -43,6 +44,7 @@ if (tint_build_ir_binary && tint_build_ir_fuzzer && tint_build_wgsl_writer && output_name = "ir_fuzz_dis" sources = [ "main.cc" ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api", "${tint_src_dir}/api/common", "${tint_src_dir}/cmd/common", diff --git a/src/tint/cmd/fuzz/wgsl/BUILD.cmake b/src/tint/cmd/fuzz/wgsl/BUILD.cmake index c1d6d541dd5..10bd967868a 100644 --- a/src/tint/cmd/fuzz/wgsl/BUILD.cmake +++ b/src/tint/cmd/fuzz/wgsl/BUILD.cmake @@ -77,6 +77,10 @@ tint_target_add_dependencies(tint_cmd_fuzz_wgsl_fuzz_cmd fuzz_cmd tint_utils_traits ) +tint_target_add_external_dependencies(tint_cmd_fuzz_wgsl_fuzz_cmd fuzz_cmd + "src_utils" +) + if(TINT_BUILD_GLSL_WRITER) tint_target_add_dependencies(tint_cmd_fuzz_wgsl_fuzz_cmd fuzz_cmd tint_lang_glsl_writer_fuzz @@ -167,6 +171,7 @@ tint_target_add_dependencies(tint_cmd_fuzz_wgsl_fuzz fuzz ) tint_target_add_external_dependencies(tint_cmd_fuzz_wgsl_fuzz fuzz + "src_utils" "thread" ) diff --git a/src/tint/cmd/fuzz/wgsl/BUILD.gn b/src/tint/cmd/fuzz/wgsl/BUILD.gn index 794f7bec245..f2c75d3449a 100644 --- a/src/tint/cmd/fuzz/wgsl/BUILD.gn +++ b/src/tint/cmd/fuzz/wgsl/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -44,6 +45,7 @@ if (tint_build_wgsl_reader) { "fuzz.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:thread", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", @@ -87,6 +89,7 @@ if (tint_build_wgsl_reader) { output_name = "tint_wgsl_fuzzer" sources = [ "main_fuzz.cc" ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/cmd/fuzz/ir:fuzz", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", diff --git a/src/tint/cmd/info/BUILD.bazel b/src/tint/cmd/info/BUILD.bazel index a0da15d01d8..5ecd71ff4e7 100644 --- a/src/tint/cmd/info/BUILD.bazel +++ b/src/tint/cmd/info/BUILD.bazel @@ -67,6 +67,7 @@ cc_binary( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ] + select({ ":tint_build_spv_reader": [ "//src/tint/lang/spirv/reader/common", diff --git a/src/tint/cmd/info/BUILD.cmake b/src/tint/cmd/info/BUILD.cmake index 67e4554582e..3cec15bbd91 100644 --- a/src/tint/cmd/info/BUILD.cmake +++ b/src/tint/cmd/info/BUILD.cmake @@ -70,6 +70,10 @@ tint_target_add_dependencies(tint_cmd_info_cmd cmd tint_utils_traits ) +tint_target_add_external_dependencies(tint_cmd_info_cmd cmd + "src_utils" +) + if(TINT_BUILD_SPV_READER) tint_target_add_dependencies(tint_cmd_info_cmd cmd tint_lang_spirv_reader_common diff --git a/src/tint/cmd/info/BUILD.gn b/src/tint/cmd/info/BUILD.gn index 96e0cf1eeb5..8390f53da34 100644 --- a/src/tint/cmd/info/BUILD.gn +++ b/src/tint/cmd/info/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -42,6 +43,7 @@ tint_executable("info") { output_name = "tint_info" sources = [ "main.cc" ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/cmd/common", "${tint_src_dir}/lang/core", diff --git a/src/tint/cmd/loopy/BUILD.bazel b/src/tint/cmd/loopy/BUILD.bazel index 289497a6fff..76b2da89277 100644 --- a/src/tint/cmd/loopy/BUILD.bazel +++ b/src/tint/cmd/loopy/BUILD.bazel @@ -74,6 +74,7 @@ cc_binary( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ] + select({ ":tint_build_glsl_writer": [ "//src/tint/lang/glsl/writer", diff --git a/src/tint/cmd/loopy/BUILD.cmake b/src/tint/cmd/loopy/BUILD.cmake index e3d60940980..a8f5ed9579b 100644 --- a/src/tint/cmd/loopy/BUILD.cmake +++ b/src/tint/cmd/loopy/BUILD.cmake @@ -77,6 +77,10 @@ tint_target_add_dependencies(tint_cmd_loopy_cmd cmd tint_utils_traits ) +tint_target_add_external_dependencies(tint_cmd_loopy_cmd cmd + "src_utils" +) + if(TINT_BUILD_GLSL_WRITER) tint_target_add_dependencies(tint_cmd_loopy_cmd cmd tint_lang_glsl_writer diff --git a/src/tint/cmd/loopy/BUILD.gn b/src/tint/cmd/loopy/BUILD.gn index cdc27e0c26d..c91dcccf4f3 100644 --- a/src/tint/cmd/loopy/BUILD.gn +++ b/src/tint/cmd/loopy/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -42,6 +43,7 @@ tint_executable("loopy") { output_name = "tint_loopy" sources = [ "main.cc" ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api", "${tint_src_dir}/api/common", "${tint_src_dir}/cmd/common", diff --git a/src/tint/cmd/remote_compile/BUILD.bazel b/src/tint/cmd/remote_compile/BUILD.bazel index 501d62a2ab2..a1de2dd397e 100644 --- a/src/tint/cmd/remote_compile/BUILD.bazel +++ b/src/tint/cmd/remote_compile/BUILD.bazel @@ -44,6 +44,7 @@ cc_binary( deps = [ "//src/tint/utils/macros", "//src/tint/utils/socket", + "//src/utils", ] + select({ ":tint_build_msl_writer": [ diff --git a/src/tint/cmd/remote_compile/BUILD.cmake b/src/tint/cmd/remote_compile/BUILD.cmake index 684174421b0..7225189c0d6 100644 --- a/src/tint/cmd/remote_compile/BUILD.cmake +++ b/src/tint/cmd/remote_compile/BUILD.cmake @@ -48,6 +48,7 @@ tint_target_add_dependencies(tint_cmd_remote_compile_cmd cmd ) tint_target_add_external_dependencies(tint_cmd_remote_compile_cmd cmd + "src_utils" "thread" ) diff --git a/src/tint/cmd/remote_compile/BUILD.gn b/src/tint/cmd/remote_compile/BUILD.gn index 6653c2a2db3..df4481b37d9 100644 --- a/src/tint/cmd/remote_compile/BUILD.gn +++ b/src/tint/cmd/remote_compile/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -42,6 +43,7 @@ tint_executable("remote_compile") { output_name = "tint_remote_compile" sources = [ "main.cc" ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:thread", "${tint_src_dir}/utils/macros", "${tint_src_dir}/utils/socket", diff --git a/src/tint/cmd/test/BUILD.gn b/src/tint/cmd/test/BUILD.gn index 531072b7b74..82a7a1464fe 100644 --- a/src/tint/cmd/test/BUILD.gn +++ b/src/tint/cmd/test/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") diff --git a/src/tint/cmd/tint/BUILD.bazel b/src/tint/cmd/tint/BUILD.bazel index 20bcb5c6278..bc967980f75 100644 --- a/src/tint/cmd/tint/BUILD.bazel +++ b/src/tint/cmd/tint/BUILD.bazel @@ -77,6 +77,7 @@ cc_binary( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ] + select({ ":tint_build_glsl_validator": [ "//src/tint/lang/glsl/validate", diff --git a/src/tint/cmd/tint/BUILD.cmake b/src/tint/cmd/tint/BUILD.cmake index 7b9a8bb1172..5e7d5863867 100644 --- a/src/tint/cmd/tint/BUILD.cmake +++ b/src/tint/cmd/tint/BUILD.cmake @@ -80,6 +80,10 @@ tint_target_add_dependencies(tint_cmd_tint_cmd cmd tint_utils_traits ) +tint_target_add_external_dependencies(tint_cmd_tint_cmd cmd + "src_utils" +) + if(TINT_BUILD_GLSL_VALIDATOR) tint_target_add_dependencies(tint_cmd_tint_cmd cmd tint_lang_glsl_validate diff --git a/src/tint/cmd/tint/BUILD.gn b/src/tint/cmd/tint/BUILD.gn index d0eef178ba4..03bc5101b61 100644 --- a/src/tint/cmd/tint/BUILD.gn +++ b/src/tint/cmd/tint/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -42,6 +43,7 @@ tint_executable("tint") { output_name = "tint" sources = [ "main.cc" ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api", "${tint_src_dir}/api/common", "${tint_src_dir}/cmd/common", diff --git a/src/tint/cmd/tintd/BUILD.bazel b/src/tint/cmd/tintd/BUILD.bazel index 3139cdf93dc..4def12dade8 100644 --- a/src/tint/cmd/tintd/BUILD.bazel +++ b/src/tint/cmd/tintd/BUILD.bazel @@ -52,6 +52,7 @@ cc_binary( "//src/tint/utils/rtti", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ] + select({ ":tint_build_tintd": [ diff --git a/src/tint/cmd/tintd/BUILD.cmake b/src/tint/cmd/tintd/BUILD.cmake index f950a1f423e..48cf2ae91b0 100644 --- a/src/tint/cmd/tintd/BUILD.cmake +++ b/src/tint/cmd/tintd/BUILD.cmake @@ -57,6 +57,10 @@ tint_target_add_dependencies(tint_cmd_tintd_cmd cmd tint_utils_traits ) +tint_target_add_external_dependencies(tint_cmd_tintd_cmd cmd + "src_utils" +) + if(TINT_BUILD_TINTD) tint_target_add_external_dependencies(tint_cmd_tintd_cmd cmd "langsvr" diff --git a/src/tint/cmd/tintd/BUILD.gn b/src/tint/cmd/tintd/BUILD.gn index af1da9e7fec..72e9ef40937 100644 --- a/src/tint/cmd/tintd/BUILD.gn +++ b/src/tint/cmd/tintd/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -42,6 +43,7 @@ if (tint_build_tintd && tint_build_wgsl_reader) { output_name = "tintd" sources = [ "main.cc" ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/utils/containers", "${tint_src_dir}/utils/diagnostic", "${tint_src_dir}/utils/ice", diff --git a/src/tint/externals.json b/src/tint/externals.json index 52150c03979..f579a549915 100644 --- a/src/tint/externals.json +++ b/src/tint/externals.json @@ -97,5 +97,10 @@ "IncludePatterns": [ "libprotobuf-mutator/**" ] + }, + "src_utils": { + "IncludePatterns": [ + "src/utils/*", + ] } } diff --git a/src/tint/lang/BUILD.gn b/src/tint/lang/BUILD.gn index e74a2fd7ca4..9806aa37b26 100644 --- a/src/tint/lang/BUILD.gn +++ b/src/tint/lang/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../scripts/dawn_overrides_with_defaults.gni") import("../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") diff --git a/src/tint/lang/core/BUILD.bazel b/src/tint/lang/core/BUILD.bazel index 267f36ebd3c..4c70a64cdb8 100644 --- a/src/tint/lang/core/BUILD.bazel +++ b/src/tint/lang/core/BUILD.bazel @@ -86,6 +86,7 @@ cc_library( "//src/tint/utils/rtti", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -128,6 +129,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -159,6 +161,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@benchmark", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/lang/core/BUILD.cmake b/src/tint/lang/core/BUILD.cmake index a21f703a1ee..2ed5fffb4b6 100644 --- a/src/tint/lang/core/BUILD.cmake +++ b/src/tint/lang/core/BUILD.cmake @@ -93,6 +93,10 @@ tint_target_add_dependencies(tint_lang_core lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_core lib + "src_utils" +) + ################################################################################ # Target: tint_lang_core_test # Kind: test @@ -136,6 +140,7 @@ tint_target_add_dependencies(tint_lang_core_test test tint_target_add_external_dependencies(tint_lang_core_test test "gtest" + "src_utils" ) ################################################################################ @@ -170,4 +175,5 @@ tint_target_add_dependencies(tint_lang_core_bench bench tint_target_add_external_dependencies(tint_lang_core_bench bench "google-benchmark" + "src_utils" ) diff --git a/src/tint/lang/core/BUILD.gn b/src/tint/lang/core/BUILD.gn index 52ebd033fb1..ecbec13d8cc 100644 --- a/src/tint/lang/core/BUILD.gn +++ b/src/tint/lang/core/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -78,6 +79,7 @@ libtint_source_set("core") { "unary_op.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/utils/containers", "${tint_src_dir}/utils/diagnostic", "${tint_src_dir}/utils/ice", @@ -105,6 +107,7 @@ if (tint_build_unittests) { "texel_format_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", @@ -144,6 +147,7 @@ if (tint_build_benchmarks) { "texel_format_bench.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:google_benchmark", "${tint_src_dir}/lang/core", "${tint_src_dir}/utils/containers", diff --git a/src/tint/lang/core/common/BUILD.bazel b/src/tint/lang/core/common/BUILD.bazel index 407371f391a..e79e60ec569 100644 --- a/src/tint/lang/core/common/BUILD.bazel +++ b/src/tint/lang/core/common/BUILD.bazel @@ -57,6 +57,7 @@ cc_library( "//src/tint/utils/rtti", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/lang/core/common/BUILD.cmake b/src/tint/lang/core/common/BUILD.cmake index ab7d6ce5de9..13d3f53cddb 100644 --- a/src/tint/lang/core/common/BUILD.cmake +++ b/src/tint/lang/core/common/BUILD.cmake @@ -57,3 +57,7 @@ tint_target_add_dependencies(tint_lang_core_common lib tint_utils_text tint_utils_traits ) + +tint_target_add_external_dependencies(tint_lang_core_common lib + "src_utils" +) diff --git a/src/tint/lang/core/common/BUILD.gn b/src/tint/lang/core/common/BUILD.gn index 76fc9e1d521..4da896cf383 100644 --- a/src/tint/lang/core/common/BUILD.gn +++ b/src/tint/lang/core/common/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -44,6 +45,7 @@ libtint_source_set("common") { "placeholder.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/utils/containers", "${tint_src_dir}/utils/diagnostic", diff --git a/src/tint/lang/core/constant/BUILD.bazel b/src/tint/lang/core/constant/BUILD.bazel index c58c65ca2ee..fbc06f42bee 100644 --- a/src/tint/lang/core/constant/BUILD.bazel +++ b/src/tint/lang/core/constant/BUILD.bazel @@ -75,6 +75,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -132,6 +133,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ] + select({ ":tint_build_wgsl_reader": [ "//src/tint/lang/wgsl/reader", diff --git a/src/tint/lang/core/constant/BUILD.cmake b/src/tint/lang/core/constant/BUILD.cmake index c4f455871cf..35d1c742668 100644 --- a/src/tint/lang/core/constant/BUILD.cmake +++ b/src/tint/lang/core/constant/BUILD.cmake @@ -76,6 +76,10 @@ tint_target_add_dependencies(tint_lang_core_constant lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_core_constant lib + "src_utils" +) + ################################################################################ # Target: tint_lang_core_constant_test # Kind: test @@ -134,6 +138,7 @@ tint_target_add_dependencies(tint_lang_core_constant_test test tint_target_add_external_dependencies(tint_lang_core_constant_test test "gtest" + "src_utils" ) if(TINT_BUILD_WGSL_READER) diff --git a/src/tint/lang/core/constant/BUILD.gn b/src/tint/lang/core/constant/BUILD.gn index 2a343e5fad4..949c0e3c6b7 100644 --- a/src/tint/lang/core/constant/BUILD.gn +++ b/src/tint/lang/core/constant/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -63,6 +64,7 @@ libtint_source_set("constant") { "value.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/type", "${tint_src_dir}/utils/containers", @@ -102,6 +104,7 @@ if (tint_build_unittests) { "value_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/core/intrinsic/BUILD.bazel b/src/tint/lang/core/intrinsic/BUILD.bazel index 9ca589915b7..d7b926b6bab 100644 --- a/src/tint/lang/core/intrinsic/BUILD.bazel +++ b/src/tint/lang/core/intrinsic/BUILD.bazel @@ -67,6 +67,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -105,6 +106,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/lang/core/intrinsic/BUILD.cmake b/src/tint/lang/core/intrinsic/BUILD.cmake index e7ae1e62a05..71cdcbee330 100644 --- a/src/tint/lang/core/intrinsic/BUILD.cmake +++ b/src/tint/lang/core/intrinsic/BUILD.cmake @@ -68,6 +68,10 @@ tint_target_add_dependencies(tint_lang_core_intrinsic lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_core_intrinsic lib + "src_utils" +) + ################################################################################ # Target: tint_lang_core_intrinsic_test # Kind: test @@ -107,4 +111,5 @@ tint_target_add_dependencies(tint_lang_core_intrinsic_test test tint_target_add_external_dependencies(tint_lang_core_intrinsic_test test "gtest" + "src_utils" ) diff --git a/src/tint/lang/core/intrinsic/BUILD.gn b/src/tint/lang/core/intrinsic/BUILD.gn index 8544d8e7265..ca234cf7bf2 100644 --- a/src/tint/lang/core/intrinsic/BUILD.gn +++ b/src/tint/lang/core/intrinsic/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -54,6 +55,7 @@ libtint_source_set("intrinsic") { "type_matchers.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", "${tint_src_dir}/lang/core/type", @@ -76,6 +78,7 @@ if (tint_build_unittests) { tint_unittests_source_set("unittests") { sources = [ "table_test.cc" ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/core/ir/BUILD.bazel b/src/tint/lang/core/ir/BUILD.bazel index 7012c69517b..b5251472a39 100644 --- a/src/tint/lang/core/ir/BUILD.bazel +++ b/src/tint/lang/core/ir/BUILD.bazel @@ -167,6 +167,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -240,6 +241,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -276,6 +278,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@benchmark", + "//src/utils", ] + select({ ":tint_build_wgsl_reader": [ "//src/tint/cmd/bench:bench", diff --git a/src/tint/lang/core/ir/BUILD.cmake b/src/tint/lang/core/ir/BUILD.cmake index 4919831681d..b4d6e1d10e7 100644 --- a/src/tint/lang/core/ir/BUILD.cmake +++ b/src/tint/lang/core/ir/BUILD.cmake @@ -171,6 +171,10 @@ tint_target_add_dependencies(tint_lang_core_ir lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_core_ir lib + "src_utils" +) + ################################################################################ # Target: tint_lang_core_ir_test # Kind: test @@ -245,6 +249,7 @@ tint_target_add_dependencies(tint_lang_core_ir_test test tint_target_add_external_dependencies(tint_lang_core_ir_test test "gtest" + "src_utils" ) if(TINT_BUILD_WGSL_READER) @@ -286,6 +291,7 @@ tint_target_add_dependencies(tint_lang_core_ir_bench bench tint_target_add_external_dependencies(tint_lang_core_ir_bench bench "google-benchmark" + "src_utils" ) if(TINT_BUILD_WGSL_READER) diff --git a/src/tint/lang/core/ir/BUILD.gn b/src/tint/lang/core/ir/BUILD.gn index 85973b6ffb6..86ec6bd108f 100644 --- a/src/tint/lang/core/ir/BUILD.gn +++ b/src/tint/lang/core/ir/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -152,6 +153,7 @@ libtint_source_set("ir") { "var.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", @@ -220,6 +222,7 @@ if (tint_build_unittests) { "var_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", @@ -248,6 +251,7 @@ if (tint_build_benchmarks) { tint_benchmarks_source_set("bench") { sources = [ "validator_bench.cc" ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:google_benchmark", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/core/ir/binary/BUILD.bazel b/src/tint/lang/core/ir/binary/BUILD.bazel index e781ef716ea..864c3d540c3 100644 --- a/src/tint/lang/core/ir/binary/BUILD.bazel +++ b/src/tint/lang/core/ir/binary/BUILD.bazel @@ -66,6 +66,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ] + select({ ":tint_build_ir_binary": [ "", @@ -103,6 +104,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ] + select({ ":tint_build_ir_binary": [ "//src/tint/lang/core/ir/binary", diff --git a/src/tint/lang/core/ir/binary/BUILD.cmake b/src/tint/lang/core/ir/binary/BUILD.cmake index 4b51be5b3a2..d5bba707a12 100644 --- a/src/tint/lang/core/ir/binary/BUILD.cmake +++ b/src/tint/lang/core/ir/binary/BUILD.cmake @@ -69,6 +69,10 @@ tint_target_add_dependencies(tint_lang_core_ir_binary lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_core_ir_binary lib + "src_utils" +) + if(TINT_BUILD_IR_BINARY) tint_target_add_dependencies(tint_lang_core_ir_binary lib tint_utils_protos_ir_proto @@ -111,6 +115,7 @@ tint_target_add_dependencies(tint_lang_core_ir_binary_test test tint_target_add_external_dependencies(tint_lang_core_ir_binary_test test "gtest" + "src_utils" ) if(TINT_BUILD_IR_BINARY) @@ -153,6 +158,10 @@ tint_target_add_dependencies(tint_lang_core_ir_binary_fuzz fuzz tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_core_ir_binary_fuzz fuzz + "src_utils" +) + if(TINT_BUILD_IR_BINARY) tint_target_add_dependencies(tint_lang_core_ir_binary_fuzz fuzz tint_lang_core_ir_binary diff --git a/src/tint/lang/core/ir/binary/BUILD.gn b/src/tint/lang/core/ir/binary/BUILD.gn index 667d631f597..c708fa132d6 100644 --- a/src/tint/lang/core/ir/binary/BUILD.gn +++ b/src/tint/lang/core/ir/binary/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -50,6 +51,7 @@ if (tint_build_ir_binary) { "encode.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", @@ -81,6 +83,7 @@ if (tint_build_unittests) { tint_unittests_source_set("unittests") { sources = [ "roundtrip_test.cc" ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", @@ -114,6 +117,7 @@ if (tint_build_ir_binary) { tint_fuzz_source_set("fuzz") { sources = [ "roundtrip_fuzz.cc" ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/cmd/fuzz/ir:fuzz", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/core/ir/transform/BUILD.bazel b/src/tint/lang/core/ir/transform/BUILD.bazel index 757fac07ad6..e562c6108a0 100644 --- a/src/tint/lang/core/ir/transform/BUILD.bazel +++ b/src/tint/lang/core/ir/transform/BUILD.bazel @@ -106,6 +106,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -176,6 +177,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ] + select({ ":tint_build_wgsl_reader": [ "//src/tint/lang/wgsl/reader", diff --git a/src/tint/lang/core/ir/transform/BUILD.cmake b/src/tint/lang/core/ir/transform/BUILD.cmake index 03950346b08..046016da62f 100644 --- a/src/tint/lang/core/ir/transform/BUILD.cmake +++ b/src/tint/lang/core/ir/transform/BUILD.cmake @@ -109,6 +109,10 @@ tint_target_add_dependencies(tint_lang_core_ir_transform lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_core_ir_transform lib + "src_utils" +) + ################################################################################ # Target: tint_lang_core_ir_transform_test # Kind: test @@ -171,6 +175,7 @@ tint_target_add_dependencies(tint_lang_core_ir_transform_test test tint_target_add_external_dependencies(tint_lang_core_ir_transform_test test "gtest" + "src_utils" ) if(TINT_BUILD_WGSL_READER) @@ -243,3 +248,7 @@ tint_target_add_dependencies(tint_lang_core_ir_transform_fuzz fuzz tint_utils_text tint_utils_traits ) + +tint_target_add_external_dependencies(tint_lang_core_ir_transform_fuzz fuzz + "src_utils" +) diff --git a/src/tint/lang/core/ir/transform/BUILD.gn b/src/tint/lang/core/ir/transform/BUILD.gn index 95d323c8bf6..61b989af6a0 100644 --- a/src/tint/lang/core/ir/transform/BUILD.gn +++ b/src/tint/lang/core/ir/transform/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -88,6 +89,7 @@ libtint_source_set("transform") { "zero_init_workgroup_memory.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/common", @@ -137,6 +139,7 @@ if (tint_build_unittests) { "zero_init_workgroup_memory_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", @@ -210,6 +213,7 @@ tint_fuzz_source_set("fuzz") { "zero_init_workgroup_memory_fuzz.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/cmd/fuzz/ir:fuzz", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/core/ir/transform/common/BUILD.bazel b/src/tint/lang/core/ir/transform/common/BUILD.bazel index f05642fe5fa..c02990edfad 100644 --- a/src/tint/lang/core/ir/transform/common/BUILD.bazel +++ b/src/tint/lang/core/ir/transform/common/BUILD.bazel @@ -63,6 +63,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -96,6 +97,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/lang/core/ir/transform/common/BUILD.cmake b/src/tint/lang/core/ir/transform/common/BUILD.cmake index 7004d864f51..35a95e009ca 100644 --- a/src/tint/lang/core/ir/transform/common/BUILD.cmake +++ b/src/tint/lang/core/ir/transform/common/BUILD.cmake @@ -64,6 +64,10 @@ tint_target_add_dependencies(tint_lang_core_ir_transform_common lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_core_ir_transform_common lib + "src_utils" +) + ################################################################################ # Target: tint_lang_core_ir_transform_common_test # Kind: test @@ -98,4 +102,5 @@ tint_target_add_dependencies(tint_lang_core_ir_transform_common_test test tint_target_add_external_dependencies(tint_lang_core_ir_transform_common_test test "gtest" + "src_utils" ) diff --git a/src/tint/lang/core/ir/transform/common/BUILD.gn b/src/tint/lang/core/ir/transform/common/BUILD.gn index d050cafd88a..0dff5daee08 100644 --- a/src/tint/lang/core/ir/transform/common/BUILD.gn +++ b/src/tint/lang/core/ir/transform/common/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -48,6 +49,7 @@ libtint_source_set("common") { "referenced_module_vars.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", @@ -72,6 +74,7 @@ if (tint_build_unittests) { tint_unittests_source_set("unittests") { sources = [ "referenced_module_vars_test.cc" ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/core/type/BUILD.bazel b/src/tint/lang/core/type/BUILD.bazel index 56cddcadde0..f6cc1ba8081 100644 --- a/src/tint/lang/core/type/BUILD.bazel +++ b/src/tint/lang/core/type/BUILD.bazel @@ -138,6 +138,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -201,6 +202,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/lang/core/type/BUILD.cmake b/src/tint/lang/core/type/BUILD.cmake index 9981a56e019..be23e6d590c 100644 --- a/src/tint/lang/core/type/BUILD.cmake +++ b/src/tint/lang/core/type/BUILD.cmake @@ -139,6 +139,10 @@ tint_target_add_dependencies(tint_lang_core_type lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_core_type lib + "src_utils" +) + ################################################################################ # Target: tint_lang_core_type_test # Kind: test @@ -203,4 +207,5 @@ tint_target_add_dependencies(tint_lang_core_type_test test tint_target_add_external_dependencies(tint_lang_core_type_test test "gtest" + "src_utils" ) diff --git a/src/tint/lang/core/type/BUILD.gn b/src/tint/lang/core/type/BUILD.gn index 988fdf570b0..7b6c9ad4095 100644 --- a/src/tint/lang/core/type/BUILD.gn +++ b/src/tint/lang/core/type/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -127,6 +128,7 @@ libtint_source_set("type") { "void.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/lang/core", "${tint_src_dir}/utils/containers", "${tint_src_dir}/utils/diagnostic", @@ -176,6 +178,7 @@ if (tint_build_unittests) { "vector_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/glsl/BUILD.gn b/src/tint/lang/glsl/BUILD.gn index 6caa255988a..bd18a5ededd 100644 --- a/src/tint/lang/glsl/BUILD.gn +++ b/src/tint/lang/glsl/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") diff --git a/src/tint/lang/glsl/validate/BUILD.bazel b/src/tint/lang/glsl/validate/BUILD.bazel index 1c3f71a80e0..c51d7fe0e18 100644 --- a/src/tint/lang/glsl/validate/BUILD.bazel +++ b/src/tint/lang/glsl/validate/BUILD.bazel @@ -56,6 +56,7 @@ cc_library( "//src/tint/utils/rtti", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ] + select({ ":tint_build_glsl_validator": [ diff --git a/src/tint/lang/glsl/validate/BUILD.cmake b/src/tint/lang/glsl/validate/BUILD.cmake index 51a2a16e780..0a9bad9fc7e 100644 --- a/src/tint/lang/glsl/validate/BUILD.cmake +++ b/src/tint/lang/glsl/validate/BUILD.cmake @@ -59,6 +59,10 @@ tint_target_add_dependencies(tint_lang_glsl_validate lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_glsl_validate lib + "src_utils" +) + if(TINT_BUILD_GLSL_VALIDATOR) tint_target_add_external_dependencies(tint_lang_glsl_validate lib "glslang" diff --git a/src/tint/lang/glsl/validate/BUILD.gn b/src/tint/lang/glsl/validate/BUILD.gn index 021b4b38579..24ea7d6fbf7 100644 --- a/src/tint/lang/glsl/validate/BUILD.gn +++ b/src/tint/lang/glsl/validate/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -44,6 +45,7 @@ if (tint_build_glsl_validator) { "validate.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/lang/wgsl/ast", "${tint_src_dir}/utils/containers", "${tint_src_dir}/utils/diagnostic", diff --git a/src/tint/lang/glsl/writer/BUILD.bazel b/src/tint/lang/glsl/writer/BUILD.bazel index f4291975c72..b8455cdbaab 100644 --- a/src/tint/lang/glsl/writer/BUILD.bazel +++ b/src/tint/lang/glsl/writer/BUILD.bazel @@ -71,6 +71,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ] + select({ ":tint_build_glsl_writer": [ "//src/tint/lang/glsl/writer/ast_printer", @@ -125,6 +126,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ] + select({ ":tint_build_glsl_validator": [ "//src/tint/lang/glsl/validate", @@ -171,6 +173,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@benchmark", + "//src/utils", ] + select({ ":tint_build_glsl_writer": [ "//src/tint/lang/glsl/writer", diff --git a/src/tint/lang/glsl/writer/BUILD.cmake b/src/tint/lang/glsl/writer/BUILD.cmake index 3783e19aeeb..01f42bdab98 100644 --- a/src/tint/lang/glsl/writer/BUILD.cmake +++ b/src/tint/lang/glsl/writer/BUILD.cmake @@ -81,6 +81,10 @@ tint_target_add_dependencies(tint_lang_glsl_writer lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_glsl_writer lib + "src_utils" +) + if(TINT_BUILD_GLSL_WRITER) tint_target_add_dependencies(tint_lang_glsl_writer lib tint_lang_glsl_writer_ast_printer @@ -133,6 +137,7 @@ tint_target_add_dependencies(tint_lang_glsl_writer_test test tint_target_add_external_dependencies(tint_lang_glsl_writer_test test "gtest" + "src_utils" ) if(TINT_BUILD_GLSL_VALIDATOR) @@ -190,6 +195,7 @@ tint_target_add_dependencies(tint_lang_glsl_writer_bench bench tint_target_add_external_dependencies(tint_lang_glsl_writer_bench bench "google-benchmark" + "src_utils" ) if(TINT_BUILD_GLSL_WRITER) @@ -243,6 +249,10 @@ tint_target_add_dependencies(tint_lang_glsl_writer_fuzz fuzz tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_glsl_writer_fuzz fuzz + "src_utils" +) + if(TINT_BUILD_GLSL_WRITER) tint_target_add_dependencies(tint_lang_glsl_writer_fuzz fuzz tint_lang_glsl_writer diff --git a/src/tint/lang/glsl/writer/BUILD.gn b/src/tint/lang/glsl/writer/BUILD.gn index 4f151c00f70..23fd18eb8b9 100644 --- a/src/tint/lang/glsl/writer/BUILD.gn +++ b/src/tint/lang/glsl/writer/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -50,6 +51,7 @@ if (tint_build_glsl_writer) { "writer.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", @@ -96,6 +98,7 @@ if (tint_build_unittests) { "var_and_let_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", @@ -142,6 +145,7 @@ if (tint_build_benchmarks) { tint_benchmarks_source_set("bench") { sources = [ "writer_bench.cc" ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:google_benchmark", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", @@ -185,6 +189,7 @@ if (tint_build_glsl_writer) { tint_fuzz_source_set("fuzz") { sources = [] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", diff --git a/src/tint/lang/glsl/writer/ast_printer/BUILD.bazel b/src/tint/lang/glsl/writer/ast_printer/BUILD.bazel index 0049a05eb86..4c41e056df1 100644 --- a/src/tint/lang/glsl/writer/ast_printer/BUILD.bazel +++ b/src/tint/lang/glsl/writer/ast_printer/BUILD.bazel @@ -71,6 +71,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ] + select({ ":tint_build_glsl_writer": [ "//src/tint/lang/glsl/writer/ast_raise", @@ -147,6 +148,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ] + select({ ":tint_build_glsl_writer": [ "//src/tint/lang/glsl/writer", diff --git a/src/tint/lang/glsl/writer/ast_printer/BUILD.cmake b/src/tint/lang/glsl/writer/ast_printer/BUILD.cmake index ac799622252..59dafd9c24c 100644 --- a/src/tint/lang/glsl/writer/ast_printer/BUILD.cmake +++ b/src/tint/lang/glsl/writer/ast_printer/BUILD.cmake @@ -74,6 +74,10 @@ tint_target_add_dependencies(tint_lang_glsl_writer_ast_printer lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_glsl_writer_ast_printer lib + "src_utils" +) + if(TINT_BUILD_GLSL_WRITER) tint_target_add_dependencies(tint_lang_glsl_writer_ast_printer lib tint_lang_glsl_writer_ast_raise @@ -155,6 +159,7 @@ tint_target_add_dependencies(tint_lang_glsl_writer_ast_printer_test test tint_target_add_external_dependencies(tint_lang_glsl_writer_ast_printer_test test "gtest" + "src_utils" ) if(TINT_BUILD_GLSL_WRITER) diff --git a/src/tint/lang/glsl/writer/ast_printer/BUILD.gn b/src/tint/lang/glsl/writer/ast_printer/BUILD.gn index 3bbad04eb13..f47434ea99f 100644 --- a/src/tint/lang/glsl/writer/ast_printer/BUILD.gn +++ b/src/tint/lang/glsl/writer/ast_printer/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -48,6 +49,7 @@ if (tint_build_glsl_writer) { "ast_printer.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/common", @@ -122,6 +124,7 @@ if (tint_build_unittests) { "workgroup_var_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/glsl/writer/ast_raise/BUILD.bazel b/src/tint/lang/glsl/writer/ast_raise/BUILD.bazel index 7bea3d7b8e5..77cdddccaad 100644 --- a/src/tint/lang/glsl/writer/ast_raise/BUILD.bazel +++ b/src/tint/lang/glsl/writer/ast_raise/BUILD.bazel @@ -76,6 +76,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ] + select({ ":tint_build_glsl_writer": [ "//src/tint/lang/glsl/writer/common", @@ -122,6 +123,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ] + select({ ":tint_build_glsl_writer": [ "//src/tint/lang/glsl/writer/ast_raise", diff --git a/src/tint/lang/glsl/writer/ast_raise/BUILD.cmake b/src/tint/lang/glsl/writer/ast_raise/BUILD.cmake index 1bee34ddc9e..c390944569e 100644 --- a/src/tint/lang/glsl/writer/ast_raise/BUILD.cmake +++ b/src/tint/lang/glsl/writer/ast_raise/BUILD.cmake @@ -79,6 +79,10 @@ tint_target_add_dependencies(tint_lang_glsl_writer_ast_raise lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_glsl_writer_ast_raise lib + "src_utils" +) + if(TINT_BUILD_GLSL_WRITER) tint_target_add_dependencies(tint_lang_glsl_writer_ast_raise lib tint_lang_glsl_writer_common @@ -130,6 +134,7 @@ tint_target_add_dependencies(tint_lang_glsl_writer_ast_raise_test test tint_target_add_external_dependencies(tint_lang_glsl_writer_ast_raise_test test "gtest" + "src_utils" ) if(TINT_BUILD_GLSL_WRITER) diff --git a/src/tint/lang/glsl/writer/ast_raise/BUILD.gn b/src/tint/lang/glsl/writer/ast_raise/BUILD.gn index f1a3a32efba..bcb15a43ed4 100644 --- a/src/tint/lang/glsl/writer/ast_raise/BUILD.gn +++ b/src/tint/lang/glsl/writer/ast_raise/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -54,6 +55,7 @@ if (tint_build_glsl_writer) { "texture_builtins_from_uniform.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", @@ -97,6 +99,7 @@ if (tint_build_unittests) { "texture_builtins_from_uniform_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/glsl/writer/common/BUILD.bazel b/src/tint/lang/glsl/writer/common/BUILD.bazel index 189e12dd434..489c9ec2c1d 100644 --- a/src/tint/lang/glsl/writer/common/BUILD.bazel +++ b/src/tint/lang/glsl/writer/common/BUILD.bazel @@ -74,6 +74,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -109,6 +110,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ] + select({ ":tint_build_glsl_writer": [ "//src/tint/lang/glsl/writer/common", diff --git a/src/tint/lang/glsl/writer/common/BUILD.cmake b/src/tint/lang/glsl/writer/common/BUILD.cmake index d135bd947bc..4ebcf7d2c31 100644 --- a/src/tint/lang/glsl/writer/common/BUILD.cmake +++ b/src/tint/lang/glsl/writer/common/BUILD.cmake @@ -77,6 +77,10 @@ tint_target_add_dependencies(tint_lang_glsl_writer_common lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_glsl_writer_common lib + "src_utils" +) + endif(TINT_BUILD_GLSL_WRITER) if(TINT_BUILD_GLSL_WRITER) ################################################################################ @@ -116,6 +120,7 @@ tint_target_add_dependencies(tint_lang_glsl_writer_common_test test tint_target_add_external_dependencies(tint_lang_glsl_writer_common_test test "gtest" + "src_utils" ) if(TINT_BUILD_GLSL_WRITER) diff --git a/src/tint/lang/glsl/writer/common/BUILD.gn b/src/tint/lang/glsl/writer/common/BUILD.gn index d0d6acc24e3..7215004e5f3 100644 --- a/src/tint/lang/glsl/writer/common/BUILD.gn +++ b/src/tint/lang/glsl/writer/common/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -53,6 +54,7 @@ if (tint_build_glsl_writer) { "version.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/common", @@ -88,6 +90,7 @@ if (tint_build_unittests) { "version_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/glsl/writer/helpers/BUILD.bazel b/src/tint/lang/glsl/writer/helpers/BUILD.bazel index 16bc50a6acc..a5586e74f0a 100644 --- a/src/tint/lang/glsl/writer/helpers/BUILD.bazel +++ b/src/tint/lang/glsl/writer/helpers/BUILD.bazel @@ -68,6 +68,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ] + select({ ":tint_build_glsl_writer": [ "//src/tint/lang/glsl/writer/common", diff --git a/src/tint/lang/glsl/writer/helpers/BUILD.cmake b/src/tint/lang/glsl/writer/helpers/BUILD.cmake index 0222e0a9fea..c59c8772718 100644 --- a/src/tint/lang/glsl/writer/helpers/BUILD.cmake +++ b/src/tint/lang/glsl/writer/helpers/BUILD.cmake @@ -71,6 +71,10 @@ tint_target_add_dependencies(tint_lang_glsl_writer_helpers lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_glsl_writer_helpers lib + "src_utils" +) + if(TINT_BUILD_GLSL_WRITER) tint_target_add_dependencies(tint_lang_glsl_writer_helpers lib tint_lang_glsl_writer_common diff --git a/src/tint/lang/glsl/writer/helpers/BUILD.gn b/src/tint/lang/glsl/writer/helpers/BUILD.gn index c6d48b4bb5c..93ecb1c4fe0 100644 --- a/src/tint/lang/glsl/writer/helpers/BUILD.gn +++ b/src/tint/lang/glsl/writer/helpers/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -44,6 +45,7 @@ if (tint_build_glsl_writer) { "generate_bindings.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", diff --git a/src/tint/lang/glsl/writer/printer/BUILD.bazel b/src/tint/lang/glsl/writer/printer/BUILD.bazel index 43f9239012d..31f71a098e6 100644 --- a/src/tint/lang/glsl/writer/printer/BUILD.bazel +++ b/src/tint/lang/glsl/writer/printer/BUILD.bazel @@ -64,6 +64,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ] + select({ ":tint_build_glsl_writer": [ "//src/tint/lang/glsl/writer/common", diff --git a/src/tint/lang/glsl/writer/printer/BUILD.cmake b/src/tint/lang/glsl/writer/printer/BUILD.cmake index 9329298d071..efc7db1d501 100644 --- a/src/tint/lang/glsl/writer/printer/BUILD.cmake +++ b/src/tint/lang/glsl/writer/printer/BUILD.cmake @@ -67,6 +67,10 @@ tint_target_add_dependencies(tint_lang_glsl_writer_printer lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_glsl_writer_printer lib + "src_utils" +) + if(TINT_BUILD_GLSL_WRITER) tint_target_add_dependencies(tint_lang_glsl_writer_printer lib tint_lang_glsl_writer_common diff --git a/src/tint/lang/glsl/writer/printer/BUILD.gn b/src/tint/lang/glsl/writer/printer/BUILD.gn index 93a752a038f..cc7f6871269 100644 --- a/src/tint/lang/glsl/writer/printer/BUILD.gn +++ b/src/tint/lang/glsl/writer/printer/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -44,6 +45,7 @@ if (tint_build_glsl_writer) { "printer.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", diff --git a/src/tint/lang/glsl/writer/raise/BUILD.bazel b/src/tint/lang/glsl/writer/raise/BUILD.bazel index 2a368465a9e..c08a404e784 100644 --- a/src/tint/lang/glsl/writer/raise/BUILD.bazel +++ b/src/tint/lang/glsl/writer/raise/BUILD.bazel @@ -69,6 +69,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ] + select({ ":tint_build_glsl_writer": [ "//src/tint/lang/glsl/writer/common", diff --git a/src/tint/lang/glsl/writer/raise/BUILD.cmake b/src/tint/lang/glsl/writer/raise/BUILD.cmake index 3e4ab10aa93..ee74a89808d 100644 --- a/src/tint/lang/glsl/writer/raise/BUILD.cmake +++ b/src/tint/lang/glsl/writer/raise/BUILD.cmake @@ -72,6 +72,10 @@ tint_target_add_dependencies(tint_lang_glsl_writer_raise lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_glsl_writer_raise lib + "src_utils" +) + if(TINT_BUILD_GLSL_WRITER) tint_target_add_dependencies(tint_lang_glsl_writer_raise lib tint_lang_glsl_writer_common diff --git a/src/tint/lang/glsl/writer/raise/BUILD.gn b/src/tint/lang/glsl/writer/raise/BUILD.gn index ef33c7b614a..3d8c452f53d 100644 --- a/src/tint/lang/glsl/writer/raise/BUILD.gn +++ b/src/tint/lang/glsl/writer/raise/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -44,6 +45,7 @@ if (tint_build_glsl_writer) { "raise.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/common", diff --git a/src/tint/lang/hlsl/BUILD.gn b/src/tint/lang/hlsl/BUILD.gn index a5dc8b3faf2..1465ca2aab3 100644 --- a/src/tint/lang/hlsl/BUILD.gn +++ b/src/tint/lang/hlsl/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") diff --git a/src/tint/lang/hlsl/intrinsic/BUILD.bazel b/src/tint/lang/hlsl/intrinsic/BUILD.bazel index e381393b94c..b92c9570721 100644 --- a/src/tint/lang/hlsl/intrinsic/BUILD.bazel +++ b/src/tint/lang/hlsl/intrinsic/BUILD.bazel @@ -65,6 +65,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/lang/hlsl/intrinsic/BUILD.cmake b/src/tint/lang/hlsl/intrinsic/BUILD.cmake index dc9945454db..7dd49d399bb 100644 --- a/src/tint/lang/hlsl/intrinsic/BUILD.cmake +++ b/src/tint/lang/hlsl/intrinsic/BUILD.cmake @@ -65,3 +65,7 @@ tint_target_add_dependencies(tint_lang_hlsl_intrinsic lib tint_utils_text tint_utils_traits ) + +tint_target_add_external_dependencies(tint_lang_hlsl_intrinsic lib + "src_utils" +) diff --git a/src/tint/lang/hlsl/intrinsic/BUILD.gn b/src/tint/lang/hlsl/intrinsic/BUILD.gn index cf3400126b5..f6a7ba6757d 100644 --- a/src/tint/lang/hlsl/intrinsic/BUILD.gn +++ b/src/tint/lang/hlsl/intrinsic/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -45,6 +46,7 @@ libtint_source_set("intrinsic") { "type_matchers.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", "${tint_src_dir}/lang/core/intrinsic", diff --git a/src/tint/lang/hlsl/ir/BUILD.bazel b/src/tint/lang/hlsl/ir/BUILD.bazel index c52853bbdec..18e9d681391 100644 --- a/src/tint/lang/hlsl/ir/BUILD.bazel +++ b/src/tint/lang/hlsl/ir/BUILD.bazel @@ -70,6 +70,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -108,6 +109,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/lang/hlsl/ir/BUILD.cmake b/src/tint/lang/hlsl/ir/BUILD.cmake index 08baa1e5e2e..190534bdcd4 100644 --- a/src/tint/lang/hlsl/ir/BUILD.cmake +++ b/src/tint/lang/hlsl/ir/BUILD.cmake @@ -71,6 +71,10 @@ tint_target_add_dependencies(tint_lang_hlsl_ir lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_hlsl_ir lib + "src_utils" +) + ################################################################################ # Target: tint_lang_hlsl_ir_test # Kind: test @@ -110,4 +114,5 @@ tint_target_add_dependencies(tint_lang_hlsl_ir_test test tint_target_add_external_dependencies(tint_lang_hlsl_ir_test test "gtest" + "src_utils" ) diff --git a/src/tint/lang/hlsl/ir/BUILD.gn b/src/tint/lang/hlsl/ir/BUILD.gn index 2fa8d6c68f0..cb0a0f4ea23 100644 --- a/src/tint/lang/hlsl/ir/BUILD.gn +++ b/src/tint/lang/hlsl/ir/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -52,6 +53,7 @@ libtint_source_set("ir") { "ternary.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", @@ -83,6 +85,7 @@ if (tint_build_unittests) { "ternary_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/hlsl/type/BUILD.bazel b/src/tint/lang/hlsl/type/BUILD.bazel index fbf73a08279..eb9a6b5529a 100644 --- a/src/tint/lang/hlsl/type/BUILD.bazel +++ b/src/tint/lang/hlsl/type/BUILD.bazel @@ -64,6 +64,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -92,6 +93,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/lang/hlsl/type/BUILD.cmake b/src/tint/lang/hlsl/type/BUILD.cmake index 49b481be676..a658de4a0d5 100644 --- a/src/tint/lang/hlsl/type/BUILD.cmake +++ b/src/tint/lang/hlsl/type/BUILD.cmake @@ -65,6 +65,10 @@ tint_target_add_dependencies(tint_lang_hlsl_type lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_hlsl_type lib + "src_utils" +) + ################################################################################ # Target: tint_lang_hlsl_type_test # Kind: test @@ -94,4 +98,5 @@ tint_target_add_dependencies(tint_lang_hlsl_type_test test tint_target_add_external_dependencies(tint_lang_hlsl_type_test test "gtest" + "src_utils" ) diff --git a/src/tint/lang/hlsl/type/BUILD.gn b/src/tint/lang/hlsl/type/BUILD.gn index b4c1a07f836..4ae871fb68a 100644 --- a/src/tint/lang/hlsl/type/BUILD.gn +++ b/src/tint/lang/hlsl/type/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -52,6 +53,7 @@ libtint_source_set("type") { "uint8_t4_packed.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/type", "${tint_src_dir}/utils/containers", @@ -77,6 +79,7 @@ if (tint_build_unittests) { "uint8_t4_packed_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/type", diff --git a/src/tint/lang/hlsl/validate/BUILD.bazel b/src/tint/lang/hlsl/validate/BUILD.bazel index 41ec67c5789..cb777427a98 100644 --- a/src/tint/lang/hlsl/validate/BUILD.bazel +++ b/src/tint/lang/hlsl/validate/BUILD.bazel @@ -56,6 +56,7 @@ cc_library( "//src/tint/utils/rtti", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ] + select({ ":tint_build_hlsl_writer": [ diff --git a/src/tint/lang/hlsl/validate/BUILD.cmake b/src/tint/lang/hlsl/validate/BUILD.cmake index 272eae67c17..7c15a6b1b24 100644 --- a/src/tint/lang/hlsl/validate/BUILD.cmake +++ b/src/tint/lang/hlsl/validate/BUILD.cmake @@ -59,6 +59,10 @@ tint_target_add_dependencies(tint_lang_hlsl_validate lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_hlsl_validate lib + "src_utils" +) + if(TINT_BUILD_HLSL_WRITER) tint_target_add_external_dependencies(tint_lang_hlsl_validate lib "dl" diff --git a/src/tint/lang/hlsl/validate/BUILD.gn b/src/tint/lang/hlsl/validate/BUILD.gn index b22d7b803aa..53c0c17d39a 100644 --- a/src/tint/lang/hlsl/validate/BUILD.gn +++ b/src/tint/lang/hlsl/validate/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -44,6 +45,7 @@ if (tint_build_hlsl_writer) { "validate.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/lang/wgsl/ast", "${tint_src_dir}/utils/command", "${tint_src_dir}/utils/containers", diff --git a/src/tint/lang/hlsl/writer/BUILD.bazel b/src/tint/lang/hlsl/writer/BUILD.bazel index a9f4e359073..435d4d5d9a6 100644 --- a/src/tint/lang/hlsl/writer/BUILD.bazel +++ b/src/tint/lang/hlsl/writer/BUILD.bazel @@ -75,6 +75,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ] + select({ ":tint_build_hlsl_writer": [ "//src/tint/lang/hlsl/writer/ast_printer", @@ -129,6 +130,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ] + select({ ":tint_build_hlsl_writer": [ "//src/tint/lang/hlsl/validate", @@ -169,6 +171,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@benchmark", + "//src/utils", ] + select({ ":tint_build_hlsl_writer": [ "//src/tint/lang/hlsl/writer", diff --git a/src/tint/lang/hlsl/writer/BUILD.cmake b/src/tint/lang/hlsl/writer/BUILD.cmake index 89411bbabb7..8f1b2e530c7 100644 --- a/src/tint/lang/hlsl/writer/BUILD.cmake +++ b/src/tint/lang/hlsl/writer/BUILD.cmake @@ -85,6 +85,10 @@ tint_target_add_dependencies(tint_lang_hlsl_writer lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_hlsl_writer lib + "src_utils" +) + if(TINT_BUILD_HLSL_WRITER) tint_target_add_dependencies(tint_lang_hlsl_writer lib tint_lang_hlsl_writer_ast_printer @@ -144,6 +148,7 @@ tint_target_add_dependencies(tint_lang_hlsl_writer_test test tint_target_add_external_dependencies(tint_lang_hlsl_writer_test test "gtest" + "src_utils" ) if(TINT_BUILD_HLSL_WRITER) @@ -191,6 +196,7 @@ tint_target_add_dependencies(tint_lang_hlsl_writer_bench bench tint_target_add_external_dependencies(tint_lang_hlsl_writer_bench bench "google-benchmark" + "src_utils" ) if(TINT_BUILD_HLSL_WRITER) @@ -244,6 +250,10 @@ tint_target_add_dependencies(tint_lang_hlsl_writer_fuzz fuzz tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_hlsl_writer_fuzz fuzz + "src_utils" +) + if(TINT_BUILD_HLSL_WRITER) tint_target_add_dependencies(tint_lang_hlsl_writer_fuzz fuzz tint_lang_hlsl_validate diff --git a/src/tint/lang/hlsl/writer/BUILD.gn b/src/tint/lang/hlsl/writer/BUILD.gn index 42737433600..8270d327ca0 100644 --- a/src/tint/lang/hlsl/writer/BUILD.gn +++ b/src/tint/lang/hlsl/writer/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -50,6 +51,7 @@ if (tint_build_hlsl_writer) { "writer.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", @@ -109,6 +111,7 @@ if (tint_build_unittests) { "var_let_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", @@ -148,6 +151,7 @@ if (tint_build_benchmarks) { tint_benchmarks_source_set("bench") { sources = [ "writer_bench.cc" ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:google_benchmark", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", @@ -187,6 +191,7 @@ if (tint_build_hlsl_writer) { tint_fuzz_source_set("fuzz") { sources = [] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", diff --git a/src/tint/lang/hlsl/writer/ast_printer/BUILD.bazel b/src/tint/lang/hlsl/writer/ast_printer/BUILD.bazel index 34380c5e1f3..f5170a4843d 100644 --- a/src/tint/lang/hlsl/writer/ast_printer/BUILD.bazel +++ b/src/tint/lang/hlsl/writer/ast_printer/BUILD.bazel @@ -73,6 +73,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ] + select({ ":tint_build_hlsl_writer": [ "//src/tint/lang/hlsl/writer/ast_raise", @@ -148,6 +149,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ] + select({ ":tint_build_hlsl_writer": [ "//src/tint/lang/hlsl/writer", diff --git a/src/tint/lang/hlsl/writer/ast_printer/BUILD.cmake b/src/tint/lang/hlsl/writer/ast_printer/BUILD.cmake index 63f4fd92753..789a81fe591 100644 --- a/src/tint/lang/hlsl/writer/ast_printer/BUILD.cmake +++ b/src/tint/lang/hlsl/writer/ast_printer/BUILD.cmake @@ -76,6 +76,10 @@ tint_target_add_dependencies(tint_lang_hlsl_writer_ast_printer lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_hlsl_writer_ast_printer lib + "src_utils" +) + if(TINT_BUILD_HLSL_WRITER) tint_target_add_dependencies(tint_lang_hlsl_writer_ast_printer lib tint_lang_hlsl_writer_ast_raise @@ -156,6 +160,7 @@ tint_target_add_dependencies(tint_lang_hlsl_writer_ast_printer_test test tint_target_add_external_dependencies(tint_lang_hlsl_writer_ast_printer_test test "gtest" + "src_utils" ) if(TINT_BUILD_HLSL_WRITER) diff --git a/src/tint/lang/hlsl/writer/ast_printer/BUILD.gn b/src/tint/lang/hlsl/writer/ast_printer/BUILD.gn index fc69397272a..72a32e58e9a 100644 --- a/src/tint/lang/hlsl/writer/ast_printer/BUILD.gn +++ b/src/tint/lang/hlsl/writer/ast_printer/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -48,6 +49,7 @@ if (tint_build_hlsl_writer) { "ast_printer.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/common", @@ -120,6 +122,7 @@ if (tint_build_unittests) { "workgroup_var_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/hlsl/writer/ast_raise/BUILD.bazel b/src/tint/lang/hlsl/writer/ast_raise/BUILD.bazel index 678aec46a1b..1a04bc77926 100644 --- a/src/tint/lang/hlsl/writer/ast_raise/BUILD.bazel +++ b/src/tint/lang/hlsl/writer/ast_raise/BUILD.bazel @@ -80,6 +80,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -123,6 +124,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ] + select({ ":tint_build_hlsl_writer": [ "//src/tint/lang/hlsl/writer/ast_raise", diff --git a/src/tint/lang/hlsl/writer/ast_raise/BUILD.cmake b/src/tint/lang/hlsl/writer/ast_raise/BUILD.cmake index 49f91472b7f..8280cd3c9c3 100644 --- a/src/tint/lang/hlsl/writer/ast_raise/BUILD.cmake +++ b/src/tint/lang/hlsl/writer/ast_raise/BUILD.cmake @@ -83,6 +83,10 @@ tint_target_add_dependencies(tint_lang_hlsl_writer_ast_raise lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_hlsl_writer_ast_raise lib + "src_utils" +) + endif(TINT_BUILD_HLSL_WRITER) if(TINT_BUILD_HLSL_WRITER AND TINT_BUILD_WGSL_READER AND TINT_BUILD_WGSL_WRITER) ################################################################################ @@ -130,6 +134,7 @@ tint_target_add_dependencies(tint_lang_hlsl_writer_ast_raise_test test tint_target_add_external_dependencies(tint_lang_hlsl_writer_ast_raise_test test "gtest" + "src_utils" ) if(TINT_BUILD_HLSL_WRITER) diff --git a/src/tint/lang/hlsl/writer/ast_raise/BUILD.gn b/src/tint/lang/hlsl/writer/ast_raise/BUILD.gn index 1fdadd98916..51ba00249e4 100644 --- a/src/tint/lang/hlsl/writer/ast_raise/BUILD.gn +++ b/src/tint/lang/hlsl/writer/ast_raise/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -58,6 +59,7 @@ if (tint_build_hlsl_writer) { "truncate_interstage_variables.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", @@ -99,6 +101,7 @@ if (tint_build_unittests) { "truncate_interstage_variables_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/hlsl/writer/common/BUILD.bazel b/src/tint/lang/hlsl/writer/common/BUILD.bazel index 92cdcb527b0..3233fadca5f 100644 --- a/src/tint/lang/hlsl/writer/common/BUILD.bazel +++ b/src/tint/lang/hlsl/writer/common/BUILD.bazel @@ -61,6 +61,7 @@ cc_library( "//src/tint/utils/rtti", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -87,6 +88,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/lang/hlsl/writer/common/BUILD.cmake b/src/tint/lang/hlsl/writer/common/BUILD.cmake index 4f2b0abe9c4..0bb46e8283d 100644 --- a/src/tint/lang/hlsl/writer/common/BUILD.cmake +++ b/src/tint/lang/hlsl/writer/common/BUILD.cmake @@ -62,6 +62,10 @@ tint_target_add_dependencies(tint_lang_hlsl_writer_common lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_hlsl_writer_common lib + "src_utils" +) + ################################################################################ # Target: tint_lang_hlsl_writer_common_test # Kind: test @@ -89,4 +93,5 @@ tint_target_add_dependencies(tint_lang_hlsl_writer_common_test test tint_target_add_external_dependencies(tint_lang_hlsl_writer_common_test test "gtest" + "src_utils" ) diff --git a/src/tint/lang/hlsl/writer/common/BUILD.gn b/src/tint/lang/hlsl/writer/common/BUILD.gn index 1e6a5a70f0a..07a9e771f33 100644 --- a/src/tint/lang/hlsl/writer/common/BUILD.gn +++ b/src/tint/lang/hlsl/writer/common/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -50,6 +51,7 @@ libtint_source_set("common") { "options.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/common", @@ -70,6 +72,7 @@ if (tint_build_unittests) { tint_unittests_source_set("unittests") { sources = [ "options_test.cc" ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/hlsl/writer/helpers/BUILD.bazel b/src/tint/lang/hlsl/writer/helpers/BUILD.bazel index 0e475a85c5e..a1e181c8b08 100644 --- a/src/tint/lang/hlsl/writer/helpers/BUILD.bazel +++ b/src/tint/lang/hlsl/writer/helpers/BUILD.bazel @@ -68,6 +68,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/lang/hlsl/writer/helpers/BUILD.cmake b/src/tint/lang/hlsl/writer/helpers/BUILD.cmake index cd3371f9f2d..5e0c926e23d 100644 --- a/src/tint/lang/hlsl/writer/helpers/BUILD.cmake +++ b/src/tint/lang/hlsl/writer/helpers/BUILD.cmake @@ -68,3 +68,7 @@ tint_target_add_dependencies(tint_lang_hlsl_writer_helpers lib tint_utils_text tint_utils_traits ) + +tint_target_add_external_dependencies(tint_lang_hlsl_writer_helpers lib + "src_utils" +) diff --git a/src/tint/lang/hlsl/writer/helpers/BUILD.gn b/src/tint/lang/hlsl/writer/helpers/BUILD.gn index dc28b49b383..10778d5a993 100644 --- a/src/tint/lang/hlsl/writer/helpers/BUILD.gn +++ b/src/tint/lang/hlsl/writer/helpers/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -44,6 +45,7 @@ libtint_source_set("helpers") { "generate_bindings.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", diff --git a/src/tint/lang/hlsl/writer/printer/BUILD.bazel b/src/tint/lang/hlsl/writer/printer/BUILD.bazel index 3b779b18497..616cfa2ae06 100644 --- a/src/tint/lang/hlsl/writer/printer/BUILD.bazel +++ b/src/tint/lang/hlsl/writer/printer/BUILD.bazel @@ -70,6 +70,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/lang/hlsl/writer/printer/BUILD.cmake b/src/tint/lang/hlsl/writer/printer/BUILD.cmake index 349113e72ca..d8bf1ac81a5 100644 --- a/src/tint/lang/hlsl/writer/printer/BUILD.cmake +++ b/src/tint/lang/hlsl/writer/printer/BUILD.cmake @@ -70,3 +70,7 @@ tint_target_add_dependencies(tint_lang_hlsl_writer_printer lib tint_utils_text tint_utils_traits ) + +tint_target_add_external_dependencies(tint_lang_hlsl_writer_printer lib + "src_utils" +) diff --git a/src/tint/lang/hlsl/writer/printer/BUILD.gn b/src/tint/lang/hlsl/writer/printer/BUILD.gn index 9c7a49fa349..21f11f42820 100644 --- a/src/tint/lang/hlsl/writer/printer/BUILD.gn +++ b/src/tint/lang/hlsl/writer/printer/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -44,6 +45,7 @@ libtint_source_set("printer") { "printer.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", diff --git a/src/tint/lang/hlsl/writer/raise/BUILD.bazel b/src/tint/lang/hlsl/writer/raise/BUILD.bazel index 8f1a16cc20c..f75cb6e0fb2 100644 --- a/src/tint/lang/hlsl/writer/raise/BUILD.bazel +++ b/src/tint/lang/hlsl/writer/raise/BUILD.bazel @@ -85,6 +85,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -124,6 +125,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/lang/hlsl/writer/raise/BUILD.cmake b/src/tint/lang/hlsl/writer/raise/BUILD.cmake index 6a22146b7d4..bc2a846e381 100644 --- a/src/tint/lang/hlsl/writer/raise/BUILD.cmake +++ b/src/tint/lang/hlsl/writer/raise/BUILD.cmake @@ -86,6 +86,10 @@ tint_target_add_dependencies(tint_lang_hlsl_writer_raise lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_hlsl_writer_raise lib + "src_utils" +) + ################################################################################ # Target: tint_lang_hlsl_writer_raise_test # Kind: test @@ -126,6 +130,7 @@ tint_target_add_dependencies(tint_lang_hlsl_writer_raise_test test tint_target_add_external_dependencies(tint_lang_hlsl_writer_raise_test test "gtest" + "src_utils" ) ################################################################################ @@ -159,3 +164,7 @@ tint_target_add_dependencies(tint_lang_hlsl_writer_raise_fuzz fuzz tint_utils_text tint_utils_traits ) + +tint_target_add_external_dependencies(tint_lang_hlsl_writer_raise_fuzz fuzz + "src_utils" +) diff --git a/src/tint/lang/hlsl/writer/raise/BUILD.gn b/src/tint/lang/hlsl/writer/raise/BUILD.gn index 8ddca0aab99..df179311f3d 100644 --- a/src/tint/lang/hlsl/writer/raise/BUILD.gn +++ b/src/tint/lang/hlsl/writer/raise/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -62,6 +63,7 @@ libtint_source_set("raise") { "shader_io.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/common", @@ -102,6 +104,7 @@ if (tint_build_unittests) { "shader_io_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", @@ -131,6 +134,7 @@ if (tint_build_unittests) { tint_fuzz_source_set("fuzz") { sources = [ "promote_initializers_fuzz.cc" ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/cmd/fuzz/ir:fuzz", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/msl/BUILD.gn b/src/tint/lang/msl/BUILD.gn index a0924317015..bde062505ef 100644 --- a/src/tint/lang/msl/BUILD.gn +++ b/src/tint/lang/msl/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") diff --git a/src/tint/lang/msl/intrinsic/BUILD.bazel b/src/tint/lang/msl/intrinsic/BUILD.bazel index 6034d5a0da6..59b25efc955 100644 --- a/src/tint/lang/msl/intrinsic/BUILD.bazel +++ b/src/tint/lang/msl/intrinsic/BUILD.bazel @@ -65,6 +65,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/lang/msl/intrinsic/BUILD.cmake b/src/tint/lang/msl/intrinsic/BUILD.cmake index 1d0f45a2993..483dd22ee5a 100644 --- a/src/tint/lang/msl/intrinsic/BUILD.cmake +++ b/src/tint/lang/msl/intrinsic/BUILD.cmake @@ -65,3 +65,7 @@ tint_target_add_dependencies(tint_lang_msl_intrinsic lib tint_utils_text tint_utils_traits ) + +tint_target_add_external_dependencies(tint_lang_msl_intrinsic lib + "src_utils" +) diff --git a/src/tint/lang/msl/intrinsic/BUILD.gn b/src/tint/lang/msl/intrinsic/BUILD.gn index fad6dbe9246..5c0b4f0885b 100644 --- a/src/tint/lang/msl/intrinsic/BUILD.gn +++ b/src/tint/lang/msl/intrinsic/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -45,6 +46,7 @@ libtint_source_set("intrinsic") { "type_matchers.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", "${tint_src_dir}/lang/core/intrinsic", diff --git a/src/tint/lang/msl/ir/BUILD.bazel b/src/tint/lang/msl/ir/BUILD.bazel index 07f2a0d59e6..8394d377833 100644 --- a/src/tint/lang/msl/ir/BUILD.bazel +++ b/src/tint/lang/msl/ir/BUILD.bazel @@ -74,6 +74,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -111,6 +112,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/lang/msl/ir/BUILD.cmake b/src/tint/lang/msl/ir/BUILD.cmake index 97209c1313f..e1683fbc769 100644 --- a/src/tint/lang/msl/ir/BUILD.cmake +++ b/src/tint/lang/msl/ir/BUILD.cmake @@ -75,6 +75,10 @@ tint_target_add_dependencies(tint_lang_msl_ir lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_msl_ir lib + "src_utils" +) + ################################################################################ # Target: tint_lang_msl_ir_test # Kind: test @@ -113,4 +117,5 @@ tint_target_add_dependencies(tint_lang_msl_ir_test test tint_target_add_external_dependencies(tint_lang_msl_ir_test test "gtest" + "src_utils" ) diff --git a/src/tint/lang/msl/ir/BUILD.gn b/src/tint/lang/msl/ir/BUILD.gn index aaa9cc74832..b01fdc5c006 100644 --- a/src/tint/lang/msl/ir/BUILD.gn +++ b/src/tint/lang/msl/ir/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -56,6 +57,7 @@ libtint_source_set("ir") { "memory_order.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", @@ -87,6 +89,7 @@ if (tint_build_unittests) { "member_builtin_call_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/msl/type/BUILD.bazel b/src/tint/lang/msl/type/BUILD.bazel index 4bb1002fb40..ba134bfabb2 100644 --- a/src/tint/lang/msl/type/BUILD.bazel +++ b/src/tint/lang/msl/type/BUILD.bazel @@ -64,6 +64,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -87,6 +88,7 @@ cc_library( "//src/tint/utils/rtti", "//src/tint/utils/traits", "@gtest", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/lang/msl/type/BUILD.cmake b/src/tint/lang/msl/type/BUILD.cmake index 23412826f5c..4bfb07e6988 100644 --- a/src/tint/lang/msl/type/BUILD.cmake +++ b/src/tint/lang/msl/type/BUILD.cmake @@ -65,6 +65,10 @@ tint_target_add_dependencies(tint_lang_msl_type lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_msl_type lib + "src_utils" +) + ################################################################################ # Target: tint_lang_msl_type_test # Kind: test @@ -89,4 +93,5 @@ tint_target_add_dependencies(tint_lang_msl_type_test test tint_target_add_external_dependencies(tint_lang_msl_type_test test "gtest" + "src_utils" ) diff --git a/src/tint/lang/msl/type/BUILD.gn b/src/tint/lang/msl/type/BUILD.gn index 33a443f7c4f..cd04483070a 100644 --- a/src/tint/lang/msl/type/BUILD.gn +++ b/src/tint/lang/msl/type/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -52,6 +53,7 @@ libtint_source_set("type") { "level.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/type", "${tint_src_dir}/utils/containers", @@ -77,6 +79,7 @@ if (tint_build_unittests) { "level_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/lang/core/type", "${tint_src_dir}/lang/msl/type", diff --git a/src/tint/lang/msl/validate/BUILD.gn b/src/tint/lang/msl/validate/BUILD.gn index 902ed8d47d6..5ccce40d033 100644 --- a/src/tint/lang/msl/validate/BUILD.gn +++ b/src/tint/lang/msl/validate/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") diff --git a/src/tint/lang/msl/writer/BUILD.bazel b/src/tint/lang/msl/writer/BUILD.bazel index c80cd91731f..a9e6eb55059 100644 --- a/src/tint/lang/msl/writer/BUILD.bazel +++ b/src/tint/lang/msl/writer/BUILD.bazel @@ -71,6 +71,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ] + select({ ":tint_build_msl_writer": [ "//src/tint/lang/msl/writer/ast_printer", @@ -120,6 +121,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ] + select({ ":tint_build_msl_writer": [ "//src/tint/lang/msl/validate", @@ -162,6 +164,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@benchmark", + "//src/utils", ] + select({ ":tint_build_msl_writer": [ "//src/tint/lang/msl/writer", diff --git a/src/tint/lang/msl/writer/BUILD.cmake b/src/tint/lang/msl/writer/BUILD.cmake index eacfcaed26c..214c2d854e1 100644 --- a/src/tint/lang/msl/writer/BUILD.cmake +++ b/src/tint/lang/msl/writer/BUILD.cmake @@ -81,6 +81,10 @@ tint_target_add_dependencies(tint_lang_msl_writer lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_msl_writer lib + "src_utils" +) + if(TINT_BUILD_MSL_WRITER) tint_target_add_dependencies(tint_lang_msl_writer lib tint_lang_msl_writer_ast_printer @@ -135,6 +139,7 @@ tint_target_add_dependencies(tint_lang_msl_writer_test test tint_target_add_external_dependencies(tint_lang_msl_writer_test test "gtest" + "src_utils" ) if(TINT_BUILD_MSL_WRITER) @@ -184,6 +189,7 @@ tint_target_add_dependencies(tint_lang_msl_writer_bench bench tint_target_add_external_dependencies(tint_lang_msl_writer_bench bench "google-benchmark" + "src_utils" ) if(TINT_BUILD_MSL_WRITER) @@ -236,6 +242,10 @@ tint_target_add_dependencies(tint_lang_msl_writer_fuzz fuzz tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_msl_writer_fuzz fuzz + "src_utils" +) + if(TINT_BUILD_MSL_WRITER) tint_target_add_dependencies(tint_lang_msl_writer_fuzz fuzz tint_lang_msl_writer diff --git a/src/tint/lang/msl/writer/BUILD.gn b/src/tint/lang/msl/writer/BUILD.gn index c47ff6e7b1e..bf7afcdba70 100644 --- a/src/tint/lang/msl/writer/BUILD.gn +++ b/src/tint/lang/msl/writer/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -50,6 +51,7 @@ if (tint_build_msl_writer) { "writer.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/common", @@ -103,6 +105,7 @@ if (tint_build_unittests) { "writer_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", @@ -140,6 +143,7 @@ if (tint_build_benchmarks) { tint_benchmarks_source_set("bench") { sources = [ "writer_bench.cc" ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:google_benchmark", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", @@ -184,6 +188,7 @@ if (tint_build_msl_writer) { tint_fuzz_source_set("fuzz") { sources = [] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", diff --git a/src/tint/lang/msl/writer/ast_printer/BUILD.bazel b/src/tint/lang/msl/writer/ast_printer/BUILD.bazel index 8efe8651665..d3fd62afa04 100644 --- a/src/tint/lang/msl/writer/ast_printer/BUILD.bazel +++ b/src/tint/lang/msl/writer/ast_printer/BUILD.bazel @@ -71,6 +71,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ] + select({ ":tint_build_msl_writer": [ "//src/tint/lang/msl/writer/ast_raise", @@ -144,6 +145,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ] + select({ ":tint_build_msl_writer": [ "//src/tint/lang/msl/writer", diff --git a/src/tint/lang/msl/writer/ast_printer/BUILD.cmake b/src/tint/lang/msl/writer/ast_printer/BUILD.cmake index cc5e7bd9056..0bbef9b2da2 100644 --- a/src/tint/lang/msl/writer/ast_printer/BUILD.cmake +++ b/src/tint/lang/msl/writer/ast_printer/BUILD.cmake @@ -74,6 +74,10 @@ tint_target_add_dependencies(tint_lang_msl_writer_ast_printer lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_msl_writer_ast_printer lib + "src_utils" +) + if(TINT_BUILD_MSL_WRITER) tint_target_add_dependencies(tint_lang_msl_writer_ast_printer lib tint_lang_msl_writer_ast_raise @@ -152,6 +156,7 @@ tint_target_add_dependencies(tint_lang_msl_writer_ast_printer_test test tint_target_add_external_dependencies(tint_lang_msl_writer_ast_printer_test test "gtest" + "src_utils" ) if(TINT_BUILD_MSL_WRITER) diff --git a/src/tint/lang/msl/writer/ast_printer/BUILD.gn b/src/tint/lang/msl/writer/ast_printer/BUILD.gn index 551c006d8cf..70f28099621 100644 --- a/src/tint/lang/msl/writer/ast_printer/BUILD.gn +++ b/src/tint/lang/msl/writer/ast_printer/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -48,6 +49,7 @@ if (tint_build_msl_writer) { "ast_printer.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/common", @@ -120,6 +122,7 @@ if (tint_build_unittests) { "variable_decl_statement_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/msl/writer/ast_raise/BUILD.bazel b/src/tint/lang/msl/writer/ast_raise/BUILD.bazel index 94baf895e2b..1c8f781f11b 100644 --- a/src/tint/lang/msl/writer/ast_raise/BUILD.bazel +++ b/src/tint/lang/msl/writer/ast_raise/BUILD.bazel @@ -78,6 +78,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -121,6 +122,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ] + select({ ":tint_build_msl_writer": [ "//src/tint/lang/msl/writer/ast_raise", diff --git a/src/tint/lang/msl/writer/ast_raise/BUILD.cmake b/src/tint/lang/msl/writer/ast_raise/BUILD.cmake index 5d417f935ca..e5fcaffe887 100644 --- a/src/tint/lang/msl/writer/ast_raise/BUILD.cmake +++ b/src/tint/lang/msl/writer/ast_raise/BUILD.cmake @@ -81,6 +81,10 @@ tint_target_add_dependencies(tint_lang_msl_writer_ast_raise lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_msl_writer_ast_raise lib + "src_utils" +) + endif(TINT_BUILD_MSL_WRITER) if(TINT_BUILD_MSL_WRITER AND TINT_BUILD_WGSL_READER AND TINT_BUILD_WGSL_WRITER) ################################################################################ @@ -128,6 +132,7 @@ tint_target_add_dependencies(tint_lang_msl_writer_ast_raise_test test tint_target_add_external_dependencies(tint_lang_msl_writer_ast_raise_test test "gtest" + "src_utils" ) if(TINT_BUILD_MSL_WRITER) diff --git a/src/tint/lang/msl/writer/ast_raise/BUILD.gn b/src/tint/lang/msl/writer/ast_raise/BUILD.gn index b708177b781..9b524a6842b 100644 --- a/src/tint/lang/msl/writer/ast_raise/BUILD.gn +++ b/src/tint/lang/msl/writer/ast_raise/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -56,6 +57,7 @@ if (tint_build_msl_writer) { "subgroup_ballot.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", @@ -96,6 +98,7 @@ if (tint_build_unittests) { "subgroup_ballot_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/msl/writer/common/BUILD.bazel b/src/tint/lang/msl/writer/common/BUILD.bazel index 47e5df12c1d..b21db5ba641 100644 --- a/src/tint/lang/msl/writer/common/BUILD.bazel +++ b/src/tint/lang/msl/writer/common/BUILD.bazel @@ -67,6 +67,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -94,6 +95,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ] + select({ ":tint_build_msl_writer": [ "//src/tint/lang/msl/writer/common", diff --git a/src/tint/lang/msl/writer/common/BUILD.cmake b/src/tint/lang/msl/writer/common/BUILD.cmake index 07bf8792ba2..5b3c9a836d3 100644 --- a/src/tint/lang/msl/writer/common/BUILD.cmake +++ b/src/tint/lang/msl/writer/common/BUILD.cmake @@ -70,6 +70,10 @@ tint_target_add_dependencies(tint_lang_msl_writer_common lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_msl_writer_common lib + "src_utils" +) + endif(TINT_BUILD_MSL_WRITER) if(TINT_BUILD_MSL_WRITER) ################################################################################ @@ -101,6 +105,7 @@ tint_target_add_dependencies(tint_lang_msl_writer_common_test test tint_target_add_external_dependencies(tint_lang_msl_writer_common_test test "gtest" + "src_utils" ) if(TINT_BUILD_MSL_WRITER) diff --git a/src/tint/lang/msl/writer/common/BUILD.gn b/src/tint/lang/msl/writer/common/BUILD.gn index a1bffc81fbe..6e53b58a2bc 100644 --- a/src/tint/lang/msl/writer/common/BUILD.gn +++ b/src/tint/lang/msl/writer/common/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -52,6 +53,7 @@ if (tint_build_msl_writer) { "printer_support.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/common", @@ -81,6 +83,7 @@ if (tint_build_unittests) { "printer_support_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/msl/writer/helpers/BUILD.bazel b/src/tint/lang/msl/writer/helpers/BUILD.bazel index fcaa346d1ea..7c283abbdce 100644 --- a/src/tint/lang/msl/writer/helpers/BUILD.bazel +++ b/src/tint/lang/msl/writer/helpers/BUILD.bazel @@ -67,6 +67,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ] + select({ ":tint_build_msl_writer": [ "//src/tint/lang/msl/writer/common", diff --git a/src/tint/lang/msl/writer/helpers/BUILD.cmake b/src/tint/lang/msl/writer/helpers/BUILD.cmake index b9c40ab52f7..e50c48ecd89 100644 --- a/src/tint/lang/msl/writer/helpers/BUILD.cmake +++ b/src/tint/lang/msl/writer/helpers/BUILD.cmake @@ -70,6 +70,10 @@ tint_target_add_dependencies(tint_lang_msl_writer_helpers lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_msl_writer_helpers lib + "src_utils" +) + if(TINT_BUILD_MSL_WRITER) tint_target_add_dependencies(tint_lang_msl_writer_helpers lib tint_lang_msl_writer_common diff --git a/src/tint/lang/msl/writer/helpers/BUILD.gn b/src/tint/lang/msl/writer/helpers/BUILD.gn index c3590d90d77..1b7ab744672 100644 --- a/src/tint/lang/msl/writer/helpers/BUILD.gn +++ b/src/tint/lang/msl/writer/helpers/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -44,6 +45,7 @@ if (tint_build_msl_writer) { "generate_bindings.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", diff --git a/src/tint/lang/msl/writer/printer/BUILD.bazel b/src/tint/lang/msl/writer/printer/BUILD.bazel index d73e9809422..8ece99e4b14 100644 --- a/src/tint/lang/msl/writer/printer/BUILD.bazel +++ b/src/tint/lang/msl/writer/printer/BUILD.bazel @@ -69,6 +69,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ] + select({ ":tint_build_msl_writer": [ "//src/tint/lang/msl/writer/common", diff --git a/src/tint/lang/msl/writer/printer/BUILD.cmake b/src/tint/lang/msl/writer/printer/BUILD.cmake index def62bfd275..f2ac6ab07f0 100644 --- a/src/tint/lang/msl/writer/printer/BUILD.cmake +++ b/src/tint/lang/msl/writer/printer/BUILD.cmake @@ -72,6 +72,10 @@ tint_target_add_dependencies(tint_lang_msl_writer_printer lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_msl_writer_printer lib + "src_utils" +) + if(TINT_BUILD_MSL_WRITER) tint_target_add_dependencies(tint_lang_msl_writer_printer lib tint_lang_msl_writer_common diff --git a/src/tint/lang/msl/writer/printer/BUILD.gn b/src/tint/lang/msl/writer/printer/BUILD.gn index 22f5222d834..9cb04ce8d7f 100644 --- a/src/tint/lang/msl/writer/printer/BUILD.gn +++ b/src/tint/lang/msl/writer/printer/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -44,6 +45,7 @@ if (tint_build_msl_writer) { "printer.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", diff --git a/src/tint/lang/msl/writer/raise/BUILD.bazel b/src/tint/lang/msl/writer/raise/BUILD.bazel index f6dd913a7b6..3e019ea33ef 100644 --- a/src/tint/lang/msl/writer/raise/BUILD.bazel +++ b/src/tint/lang/msl/writer/raise/BUILD.bazel @@ -81,6 +81,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ] + select({ ":tint_build_msl_writer": [ "//src/tint/lang/msl/writer/common", @@ -122,6 +123,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ] + select({ ":tint_build_msl_writer": [ "//src/tint/lang/msl/writer/raise", diff --git a/src/tint/lang/msl/writer/raise/BUILD.cmake b/src/tint/lang/msl/writer/raise/BUILD.cmake index 5b624f95947..39d45466da0 100644 --- a/src/tint/lang/msl/writer/raise/BUILD.cmake +++ b/src/tint/lang/msl/writer/raise/BUILD.cmake @@ -84,6 +84,10 @@ tint_target_add_dependencies(tint_lang_msl_writer_raise lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_msl_writer_raise lib + "src_utils" +) + if(TINT_BUILD_MSL_WRITER) tint_target_add_dependencies(tint_lang_msl_writer_raise lib tint_lang_msl_writer_common @@ -130,6 +134,7 @@ tint_target_add_dependencies(tint_lang_msl_writer_raise_test test tint_target_add_external_dependencies(tint_lang_msl_writer_raise_test test "gtest" + "src_utils" ) if(TINT_BUILD_MSL_WRITER) diff --git a/src/tint/lang/msl/writer/raise/BUILD.gn b/src/tint/lang/msl/writer/raise/BUILD.gn index 2689a158fb1..d6973f0f7d9 100644 --- a/src/tint/lang/msl/writer/raise/BUILD.gn +++ b/src/tint/lang/msl/writer/raise/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -58,6 +59,7 @@ if (tint_build_msl_writer) { "shader_io.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/common", @@ -102,6 +104,7 @@ if (tint_build_unittests) { "shader_io_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/spirv/BUILD.gn b/src/tint/lang/spirv/BUILD.gn index bac54e55fa2..1633f6de3ba 100644 --- a/src/tint/lang/spirv/BUILD.gn +++ b/src/tint/lang/spirv/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") diff --git a/src/tint/lang/spirv/intrinsic/BUILD.bazel b/src/tint/lang/spirv/intrinsic/BUILD.bazel index 7b2f0e878ba..7d35f0b364f 100644 --- a/src/tint/lang/spirv/intrinsic/BUILD.bazel +++ b/src/tint/lang/spirv/intrinsic/BUILD.bazel @@ -66,6 +66,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/lang/spirv/intrinsic/BUILD.cmake b/src/tint/lang/spirv/intrinsic/BUILD.cmake index 541c0f51acf..3ea5ccad9f6 100644 --- a/src/tint/lang/spirv/intrinsic/BUILD.cmake +++ b/src/tint/lang/spirv/intrinsic/BUILD.cmake @@ -66,3 +66,7 @@ tint_target_add_dependencies(tint_lang_spirv_intrinsic lib tint_utils_text tint_utils_traits ) + +tint_target_add_external_dependencies(tint_lang_spirv_intrinsic lib + "src_utils" +) diff --git a/src/tint/lang/spirv/intrinsic/BUILD.gn b/src/tint/lang/spirv/intrinsic/BUILD.gn index e99baeedd21..58ea55d4d18 100644 --- a/src/tint/lang/spirv/intrinsic/BUILD.gn +++ b/src/tint/lang/spirv/intrinsic/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -45,6 +46,7 @@ libtint_source_set("intrinsic") { "type_matchers.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", "${tint_src_dir}/lang/core/intrinsic", diff --git a/src/tint/lang/spirv/ir/BUILD.bazel b/src/tint/lang/spirv/ir/BUILD.bazel index 50ee0c9a43f..c21bb472bcf 100644 --- a/src/tint/lang/spirv/ir/BUILD.bazel +++ b/src/tint/lang/spirv/ir/BUILD.bazel @@ -68,6 +68,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -103,6 +104,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/lang/spirv/ir/BUILD.cmake b/src/tint/lang/spirv/ir/BUILD.cmake index dc6cb2285de..87f645e6277 100644 --- a/src/tint/lang/spirv/ir/BUILD.cmake +++ b/src/tint/lang/spirv/ir/BUILD.cmake @@ -69,6 +69,10 @@ tint_target_add_dependencies(tint_lang_spirv_ir lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_spirv_ir lib + "src_utils" +) + ################################################################################ # Target: tint_lang_spirv_ir_test # Kind: test @@ -105,4 +109,5 @@ tint_target_add_dependencies(tint_lang_spirv_ir_test test tint_target_add_external_dependencies(tint_lang_spirv_ir_test test "gtest" + "src_utils" ) diff --git a/src/tint/lang/spirv/ir/BUILD.gn b/src/tint/lang/spirv/ir/BUILD.gn index 31f96cf8ae2..76d049cddc3 100644 --- a/src/tint/lang/spirv/ir/BUILD.gn +++ b/src/tint/lang/spirv/ir/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -50,6 +51,7 @@ libtint_source_set("ir") { "literal_operand.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", @@ -77,6 +79,7 @@ if (tint_build_unittests) { tint_unittests_source_set("unittests") { sources = [ "builtin_call_test.cc" ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/spirv/reader/BUILD.bazel b/src/tint/lang/spirv/reader/BUILD.bazel index 3f5089309eb..ce8ab39a551 100644 --- a/src/tint/lang/spirv/reader/BUILD.bazel +++ b/src/tint/lang/spirv/reader/BUILD.bazel @@ -70,6 +70,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ] + select({ ":tint_build_spv_reader": [ "//src/tint/lang/spirv/reader/ast_parser", @@ -113,6 +114,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ] + select({ ":tint_build_spv_reader": [ "//src/tint/lang/spirv/reader", diff --git a/src/tint/lang/spirv/reader/BUILD.cmake b/src/tint/lang/spirv/reader/BUILD.cmake index 6b1a73c2908..78f76983a6a 100644 --- a/src/tint/lang/spirv/reader/BUILD.cmake +++ b/src/tint/lang/spirv/reader/BUILD.cmake @@ -79,6 +79,10 @@ tint_target_add_dependencies(tint_lang_spirv_reader lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_spirv_reader lib + "src_utils" +) + if(TINT_BUILD_SPV_READER) tint_target_add_dependencies(tint_lang_spirv_reader lib tint_lang_spirv_reader_ast_parser @@ -127,6 +131,7 @@ tint_target_add_dependencies(tint_lang_spirv_reader_test test tint_target_add_external_dependencies(tint_lang_spirv_reader_test test "gtest" + "src_utils" ) if(TINT_BUILD_SPV_READER) diff --git a/src/tint/lang/spirv/reader/BUILD.gn b/src/tint/lang/spirv/reader/BUILD.gn index 09788fc78e5..8116b1b94ab 100644 --- a/src/tint/lang/spirv/reader/BUILD.gn +++ b/src/tint/lang/spirv/reader/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -48,6 +49,7 @@ if (tint_build_spv_reader) { "reader.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", @@ -89,6 +91,7 @@ if (tint_build_unittests) { tint_unittests_source_set("unittests") { sources = [ "reader_test.cc" ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/spirv/reader/ast_lower/BUILD.bazel b/src/tint/lang/spirv/reader/ast_lower/BUILD.bazel index b89ad4644fd..7bb61d7051e 100644 --- a/src/tint/lang/spirv/reader/ast_lower/BUILD.bazel +++ b/src/tint/lang/spirv/reader/ast_lower/BUILD.bazel @@ -78,6 +78,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -121,6 +122,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ] + select({ ":tint_build_spv_reader": [ "//src/tint/lang/spirv/reader/ast_lower", diff --git a/src/tint/lang/spirv/reader/ast_lower/BUILD.cmake b/src/tint/lang/spirv/reader/ast_lower/BUILD.cmake index 53e39c3ea47..361645fc291 100644 --- a/src/tint/lang/spirv/reader/ast_lower/BUILD.cmake +++ b/src/tint/lang/spirv/reader/ast_lower/BUILD.cmake @@ -81,6 +81,10 @@ tint_target_add_dependencies(tint_lang_spirv_reader_ast_lower lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_spirv_reader_ast_lower lib + "src_utils" +) + endif(TINT_BUILD_SPV_READER) if(TINT_BUILD_SPV_READER AND TINT_BUILD_WGSL_READER AND TINT_BUILD_WGSL_WRITER) ################################################################################ @@ -128,6 +132,7 @@ tint_target_add_dependencies(tint_lang_spirv_reader_ast_lower_test test tint_target_add_external_dependencies(tint_lang_spirv_reader_ast_lower_test test "gtest" + "src_utils" ) if(TINT_BUILD_SPV_READER) diff --git a/src/tint/lang/spirv/reader/ast_lower/BUILD.gn b/src/tint/lang/spirv/reader/ast_lower/BUILD.gn index e6703a4021c..4acb4a20612 100644 --- a/src/tint/lang/spirv/reader/ast_lower/BUILD.gn +++ b/src/tint/lang/spirv/reader/ast_lower/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -56,6 +57,7 @@ if (tint_build_spv_reader) { "pass_workgroup_id_as_argument.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", @@ -96,6 +98,7 @@ if (tint_build_unittests) { "pass_workgroup_id_as_argument_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/spirv/reader/ast_parser/BUILD.bazel b/src/tint/lang/spirv/reader/ast_parser/BUILD.bazel index c6562858b98..5ebf2beff56 100644 --- a/src/tint/lang/spirv/reader/ast_parser/BUILD.bazel +++ b/src/tint/lang/spirv/reader/ast_parser/BUILD.bazel @@ -88,6 +88,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ] + select({ ":tint_build_spv_reader": [ "//src/tint/lang/spirv/reader/ast_lower", @@ -169,6 +170,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ] + select({ ":tint_build_spv_reader": [ "//src/tint/lang/spirv/reader/ast_parser", diff --git a/src/tint/lang/spirv/reader/ast_parser/BUILD.cmake b/src/tint/lang/spirv/reader/ast_parser/BUILD.cmake index e4ab32d222c..76e24292765 100644 --- a/src/tint/lang/spirv/reader/ast_parser/BUILD.cmake +++ b/src/tint/lang/spirv/reader/ast_parser/BUILD.cmake @@ -91,6 +91,10 @@ tint_target_add_dependencies(tint_lang_spirv_reader_ast_parser lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_spirv_reader_ast_parser lib + "src_utils" +) + if(TINT_BUILD_SPV_READER) tint_target_add_dependencies(tint_lang_spirv_reader_ast_parser lib tint_lang_spirv_reader_ast_lower @@ -178,6 +182,7 @@ tint_target_add_dependencies(tint_lang_spirv_reader_ast_parser_test test tint_target_add_external_dependencies(tint_lang_spirv_reader_ast_parser_test test "gtest" + "src_utils" ) if(TINT_BUILD_SPV_READER) diff --git a/src/tint/lang/spirv/reader/ast_parser/BUILD.gn b/src/tint/lang/spirv/reader/ast_parser/BUILD.gn index 5c8e0c18169..7a5c65c51b5 100644 --- a/src/tint/lang/spirv/reader/ast_parser/BUILD.gn +++ b/src/tint/lang/spirv/reader/ast_parser/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -66,6 +67,7 @@ if (tint_build_spv_reader) { "usage.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", @@ -151,6 +153,7 @@ if (tint_build_unittests) { "user_name_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/spirv/reader/common/BUILD.bazel b/src/tint/lang/spirv/reader/common/BUILD.bazel index b3814093854..b643e174e3a 100644 --- a/src/tint/lang/spirv/reader/common/BUILD.bazel +++ b/src/tint/lang/spirv/reader/common/BUILD.bazel @@ -59,6 +59,7 @@ cc_library( "//src/tint/utils/rtti", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -80,6 +81,7 @@ cc_library( "//src/tint/utils/rtti", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ] + select({ ":tint_build_spv_reader_or_tint_build_spv_writer": [ "@spirv_tools", diff --git a/src/tint/lang/spirv/reader/common/BUILD.cmake b/src/tint/lang/spirv/reader/common/BUILD.cmake index 6db6e92f521..cf92d5e90c8 100644 --- a/src/tint/lang/spirv/reader/common/BUILD.cmake +++ b/src/tint/lang/spirv/reader/common/BUILD.cmake @@ -62,6 +62,10 @@ tint_target_add_dependencies(tint_lang_spirv_reader_common lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_spirv_reader_common lib + "src_utils" +) + endif(TINT_BUILD_SPV_READER) if(TINT_BUILD_SPV_READER) ################################################################################ @@ -86,6 +90,10 @@ tint_target_add_dependencies(tint_lang_spirv_reader_common_test test tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_spirv_reader_common_test test + "src_utils" +) + if(TINT_BUILD_SPV_READER OR TINT_BUILD_SPV_WRITER) tint_target_add_external_dependencies(tint_lang_spirv_reader_common_test test "spirv-tools" diff --git a/src/tint/lang/spirv/reader/common/BUILD.gn b/src/tint/lang/spirv/reader/common/BUILD.gn index d2bb13ec095..1e78cee30d7 100644 --- a/src/tint/lang/spirv/reader/common/BUILD.gn +++ b/src/tint/lang/spirv/reader/common/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -48,6 +49,7 @@ if (tint_build_spv_reader) { "options.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/lang/wgsl", "${tint_src_dir}/lang/wgsl/common", "${tint_src_dir}/lang/wgsl/features", @@ -70,6 +72,7 @@ if (tint_build_unittests) { tint_unittests_source_set("unittests") { sources = [ "helper_test.h" ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/utils/containers", "${tint_src_dir}/utils/diagnostic", "${tint_src_dir}/utils/ice", diff --git a/src/tint/lang/spirv/reader/lower/BUILD.bazel b/src/tint/lang/spirv/reader/lower/BUILD.bazel index 1348c8d3912..5d99ad6e8dd 100644 --- a/src/tint/lang/spirv/reader/lower/BUILD.bazel +++ b/src/tint/lang/spirv/reader/lower/BUILD.bazel @@ -69,6 +69,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -103,6 +104,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/lang/spirv/reader/lower/BUILD.cmake b/src/tint/lang/spirv/reader/lower/BUILD.cmake index 98de660cdb1..9758df70150 100644 --- a/src/tint/lang/spirv/reader/lower/BUILD.cmake +++ b/src/tint/lang/spirv/reader/lower/BUILD.cmake @@ -70,6 +70,10 @@ tint_target_add_dependencies(tint_lang_spirv_reader_lower lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_spirv_reader_lower lib + "src_utils" +) + ################################################################################ # Target: tint_lang_spirv_reader_lower_test # Kind: test @@ -105,4 +109,5 @@ tint_target_add_dependencies(tint_lang_spirv_reader_lower_test test tint_target_add_external_dependencies(tint_lang_spirv_reader_lower_test test "gtest" + "src_utils" ) diff --git a/src/tint/lang/spirv/reader/lower/BUILD.gn b/src/tint/lang/spirv/reader/lower/BUILD.gn index 37c47096d25..b9adbf65174 100644 --- a/src/tint/lang/spirv/reader/lower/BUILD.gn +++ b/src/tint/lang/spirv/reader/lower/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -52,6 +53,7 @@ libtint_source_set("lower") { "vector_element_pointer.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", @@ -81,6 +83,7 @@ if (tint_build_unittests) { "vector_element_pointer_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/spirv/reader/parser/BUILD.bazel b/src/tint/lang/spirv/reader/parser/BUILD.bazel index 556a7672fd2..4d4613e46bb 100644 --- a/src/tint/lang/spirv/reader/parser/BUILD.bazel +++ b/src/tint/lang/spirv/reader/parser/BUILD.bazel @@ -64,6 +64,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ] + select({ ":tint_build_spv_reader_or_tint_build_spv_writer": [ "//src/tint/lang/spirv/validate", @@ -108,6 +109,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ] + select({ ":tint_build_spv_reader": [ "//src/tint/lang/spirv/reader/common:test", diff --git a/src/tint/lang/spirv/reader/parser/BUILD.cmake b/src/tint/lang/spirv/reader/parser/BUILD.cmake index 20ea525630e..7af6c8e99db 100644 --- a/src/tint/lang/spirv/reader/parser/BUILD.cmake +++ b/src/tint/lang/spirv/reader/parser/BUILD.cmake @@ -67,6 +67,10 @@ tint_target_add_dependencies(tint_lang_spirv_reader_parser lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_spirv_reader_parser lib + "src_utils" +) + if(TINT_BUILD_SPV_READER OR TINT_BUILD_SPV_WRITER) tint_target_add_dependencies(tint_lang_spirv_reader_parser lib tint_lang_spirv_validate @@ -118,6 +122,7 @@ tint_target_add_dependencies(tint_lang_spirv_reader_parser_test test tint_target_add_external_dependencies(tint_lang_spirv_reader_parser_test test "gtest" + "src_utils" ) if(TINT_BUILD_SPV_READER) diff --git a/src/tint/lang/spirv/reader/parser/BUILD.gn b/src/tint/lang/spirv/reader/parser/BUILD.gn index 618d5d59fcd..9b2012e3aca 100644 --- a/src/tint/lang/spirv/reader/parser/BUILD.gn +++ b/src/tint/lang/spirv/reader/parser/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -48,6 +49,7 @@ if (tint_build_spv_reader) { "parser.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", @@ -96,6 +98,7 @@ if (tint_build_unittests) { "var_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/spirv/type/BUILD.bazel b/src/tint/lang/spirv/type/BUILD.bazel index 6503b1751f3..390af1d6d47 100644 --- a/src/tint/lang/spirv/type/BUILD.bazel +++ b/src/tint/lang/spirv/type/BUILD.bazel @@ -62,6 +62,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -89,6 +90,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/lang/spirv/type/BUILD.cmake b/src/tint/lang/spirv/type/BUILD.cmake index ef39fed568a..97a3b44a63a 100644 --- a/src/tint/lang/spirv/type/BUILD.cmake +++ b/src/tint/lang/spirv/type/BUILD.cmake @@ -63,6 +63,10 @@ tint_target_add_dependencies(tint_lang_spirv_type lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_spirv_type lib + "src_utils" +) + ################################################################################ # Target: tint_lang_spirv_type_test # Kind: test @@ -91,4 +95,5 @@ tint_target_add_dependencies(tint_lang_spirv_type_test test tint_target_add_external_dependencies(tint_lang_spirv_type_test test "gtest" + "src_utils" ) diff --git a/src/tint/lang/spirv/type/BUILD.gn b/src/tint/lang/spirv/type/BUILD.gn index 345e2db8b0c..3f1b64dd61f 100644 --- a/src/tint/lang/spirv/type/BUILD.gn +++ b/src/tint/lang/spirv/type/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -48,6 +49,7 @@ libtint_source_set("type") { "sampled_image.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", "${tint_src_dir}/lang/core/ir", @@ -71,6 +73,7 @@ if (tint_build_unittests) { tint_unittests_source_set("unittests") { sources = [ "sampled_image_test.cc" ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", diff --git a/src/tint/lang/spirv/validate/BUILD.bazel b/src/tint/lang/spirv/validate/BUILD.bazel index dd475107e8a..c68be9b0a77 100644 --- a/src/tint/lang/spirv/validate/BUILD.bazel +++ b/src/tint/lang/spirv/validate/BUILD.bazel @@ -55,6 +55,7 @@ cc_library( "//src/tint/utils/rtti", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ] + select({ ":tint_build_spv_reader_or_tint_build_spv_writer": [ "@spirv_tools", @@ -82,6 +83,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ] + select({ ":tint_build_spv_reader_or_tint_build_spv_writer": [ "//src/tint/lang/spirv/validate", diff --git a/src/tint/lang/spirv/validate/BUILD.cmake b/src/tint/lang/spirv/validate/BUILD.cmake index 726f9cf14cd..e7096bce2e8 100644 --- a/src/tint/lang/spirv/validate/BUILD.cmake +++ b/src/tint/lang/spirv/validate/BUILD.cmake @@ -58,6 +58,10 @@ tint_target_add_dependencies(tint_lang_spirv_validate lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_spirv_validate lib + "src_utils" +) + if(TINT_BUILD_SPV_READER OR TINT_BUILD_SPV_WRITER) tint_target_add_external_dependencies(tint_lang_spirv_validate lib "spirv-tools" @@ -90,6 +94,7 @@ tint_target_add_dependencies(tint_lang_spirv_validate_test test tint_target_add_external_dependencies(tint_lang_spirv_validate_test test "gtest" + "src_utils" ) if(TINT_BUILD_SPV_READER OR TINT_BUILD_SPV_WRITER) diff --git a/src/tint/lang/spirv/validate/BUILD.gn b/src/tint/lang/spirv/validate/BUILD.gn index 2f79a37891b..89c42cfe6c2 100644 --- a/src/tint/lang/spirv/validate/BUILD.gn +++ b/src/tint/lang/spirv/validate/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -48,6 +49,7 @@ if (tint_build_spv_reader || tint_build_spv_writer) { "validate.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/utils/containers", "${tint_src_dir}/utils/diagnostic", "${tint_src_dir}/utils/ice", @@ -73,6 +75,7 @@ if (tint_build_unittests) { tint_unittests_source_set("unittests") { sources = [ "validate_test.cc" ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/utils/containers", "${tint_src_dir}/utils/diagnostic", diff --git a/src/tint/lang/spirv/writer/BUILD.bazel b/src/tint/lang/spirv/writer/BUILD.bazel index dbd9c587ccd..6553bd0799e 100644 --- a/src/tint/lang/spirv/writer/BUILD.bazel +++ b/src/tint/lang/spirv/writer/BUILD.bazel @@ -66,6 +66,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ] + select({ ":tint_build_spv_reader_or_tint_build_spv_writer": [ "@spirv_headers//:spirv_cpp11_headers", "@spirv_headers//:spirv_c_headers", @@ -128,6 +129,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ] + select({ ":tint_build_spv_reader_or_tint_build_spv_writer": [ "@spirv_headers//:spirv_cpp11_headers", "@spirv_headers//:spirv_c_headers", @@ -177,6 +179,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@benchmark", + "//src/utils", ] + select({ ":tint_build_spv_writer": [ "//src/tint/lang/spirv/writer", diff --git a/src/tint/lang/spirv/writer/BUILD.cmake b/src/tint/lang/spirv/writer/BUILD.cmake index 7d31e90d7ce..f22ad189302 100644 --- a/src/tint/lang/spirv/writer/BUILD.cmake +++ b/src/tint/lang/spirv/writer/BUILD.cmake @@ -74,6 +74,10 @@ tint_target_add_dependencies(tint_lang_spirv_writer lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_spirv_writer lib + "src_utils" +) + if(TINT_BUILD_SPV_READER OR TINT_BUILD_SPV_WRITER) tint_target_add_external_dependencies(tint_lang_spirv_writer lib "spirv-headers" @@ -142,6 +146,7 @@ tint_target_add_dependencies(tint_lang_spirv_writer_test test tint_target_add_external_dependencies(tint_lang_spirv_writer_test test "gtest" + "src_utils" ) if(TINT_BUILD_SPV_READER OR TINT_BUILD_SPV_WRITER) @@ -199,6 +204,7 @@ tint_target_add_dependencies(tint_lang_spirv_writer_bench bench tint_target_add_external_dependencies(tint_lang_spirv_writer_bench bench "google-benchmark" + "src_utils" ) if(TINT_BUILD_SPV_WRITER) @@ -249,6 +255,10 @@ tint_target_add_dependencies(tint_lang_spirv_writer_fuzz fuzz tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_spirv_writer_fuzz fuzz + "src_utils" +) + if(TINT_BUILD_SPV_READER OR TINT_BUILD_SPV_WRITER) tint_target_add_dependencies(tint_lang_spirv_writer_fuzz fuzz tint_lang_spirv_validate diff --git a/src/tint/lang/spirv/writer/BUILD.gn b/src/tint/lang/spirv/writer/BUILD.gn index 49a8ec99770..d815e68ff19 100644 --- a/src/tint/lang/spirv/writer/BUILD.gn +++ b/src/tint/lang/spirv/writer/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -50,6 +51,7 @@ if (tint_build_spv_writer) { "writer.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/common", @@ -110,6 +112,7 @@ if (tint_build_unittests) { "writer_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", @@ -155,6 +158,7 @@ if (tint_build_benchmarks) { tint_benchmarks_source_set("bench") { sources = [ "writer_bench.cc" ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:google_benchmark", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", @@ -202,6 +206,7 @@ if (tint_build_spv_writer) { tint_fuzz_source_set("fuzz") { sources = [ "writer_ir_fuzz.cc" ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/cmd/fuzz/ir:fuzz", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/spirv/writer/common/BUILD.bazel b/src/tint/lang/spirv/writer/common/BUILD.bazel index 3f79228c63a..ff6371b4d50 100644 --- a/src/tint/lang/spirv/writer/common/BUILD.bazel +++ b/src/tint/lang/spirv/writer/common/BUILD.bazel @@ -69,6 +69,7 @@ cc_library( "//src/tint/utils/rtti", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ] + select({ ":tint_build_spv_reader_or_tint_build_spv_writer": [ "@spirv_headers//:spirv_cpp11_headers", "@spirv_headers//:spirv_c_headers", @@ -112,6 +113,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ] + select({ ":tint_build_spv_reader_or_tint_build_spv_writer": [ "@spirv_headers//:spirv_cpp11_headers", "@spirv_headers//:spirv_c_headers", diff --git a/src/tint/lang/spirv/writer/common/BUILD.cmake b/src/tint/lang/spirv/writer/common/BUILD.cmake index c461889034a..835d0532859 100644 --- a/src/tint/lang/spirv/writer/common/BUILD.cmake +++ b/src/tint/lang/spirv/writer/common/BUILD.cmake @@ -72,6 +72,10 @@ tint_target_add_dependencies(tint_lang_spirv_writer_common lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_spirv_writer_common lib + "src_utils" +) + if(TINT_BUILD_SPV_READER OR TINT_BUILD_SPV_WRITER) tint_target_add_external_dependencies(tint_lang_spirv_writer_common lib "spirv-headers" @@ -120,6 +124,7 @@ tint_target_add_dependencies(tint_lang_spirv_writer_common_test test tint_target_add_external_dependencies(tint_lang_spirv_writer_common_test test "gtest" + "src_utils" ) if(TINT_BUILD_SPV_READER OR TINT_BUILD_SPV_WRITER) diff --git a/src/tint/lang/spirv/writer/common/BUILD.gn b/src/tint/lang/spirv/writer/common/BUILD.gn index bef8cf11c8c..935e58912a6 100644 --- a/src/tint/lang/spirv/writer/common/BUILD.gn +++ b/src/tint/lang/spirv/writer/common/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -59,6 +60,7 @@ if (tint_build_spv_writer) { "options.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core/common", "${tint_src_dir}/utils/containers", @@ -93,6 +95,7 @@ if (tint_build_unittests) { "spv_dump_test.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/spirv/writer/helpers/BUILD.bazel b/src/tint/lang/spirv/writer/helpers/BUILD.bazel index cf8f5443c6e..00d3a292ba6 100644 --- a/src/tint/lang/spirv/writer/helpers/BUILD.bazel +++ b/src/tint/lang/spirv/writer/helpers/BUILD.bazel @@ -63,6 +63,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ] + select({ ":tint_build_spv_writer": [ "//src/tint/lang/spirv/writer/common", diff --git a/src/tint/lang/spirv/writer/helpers/BUILD.cmake b/src/tint/lang/spirv/writer/helpers/BUILD.cmake index f980f4a475e..776bf3ddd07 100644 --- a/src/tint/lang/spirv/writer/helpers/BUILD.cmake +++ b/src/tint/lang/spirv/writer/helpers/BUILD.cmake @@ -66,6 +66,10 @@ tint_target_add_dependencies(tint_lang_spirv_writer_helpers lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_spirv_writer_helpers lib + "src_utils" +) + if(TINT_BUILD_SPV_WRITER) tint_target_add_dependencies(tint_lang_spirv_writer_helpers lib tint_lang_spirv_writer_common diff --git a/src/tint/lang/spirv/writer/helpers/BUILD.gn b/src/tint/lang/spirv/writer/helpers/BUILD.gn index c3a2f4eeb77..4f9c872761d 100644 --- a/src/tint/lang/spirv/writer/helpers/BUILD.gn +++ b/src/tint/lang/spirv/writer/helpers/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -44,6 +45,7 @@ if (tint_build_spv_writer) { "generate_bindings.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", diff --git a/src/tint/lang/spirv/writer/printer/BUILD.bazel b/src/tint/lang/spirv/writer/printer/BUILD.bazel index 360806f430a..afbd20c856d 100644 --- a/src/tint/lang/spirv/writer/printer/BUILD.bazel +++ b/src/tint/lang/spirv/writer/printer/BUILD.bazel @@ -68,6 +68,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ] + select({ ":tint_build_spv_reader_or_tint_build_spv_writer": [ "@spirv_headers//:spirv_cpp11_headers", "@spirv_headers//:spirv_c_headers", diff --git a/src/tint/lang/spirv/writer/printer/BUILD.cmake b/src/tint/lang/spirv/writer/printer/BUILD.cmake index 34627939f37..128ea4a92db 100644 --- a/src/tint/lang/spirv/writer/printer/BUILD.cmake +++ b/src/tint/lang/spirv/writer/printer/BUILD.cmake @@ -71,6 +71,10 @@ tint_target_add_dependencies(tint_lang_spirv_writer_printer lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_spirv_writer_printer lib + "src_utils" +) + if(TINT_BUILD_SPV_READER OR TINT_BUILD_SPV_WRITER) tint_target_add_external_dependencies(tint_lang_spirv_writer_printer lib "spirv-headers" diff --git a/src/tint/lang/spirv/writer/printer/BUILD.gn b/src/tint/lang/spirv/writer/printer/BUILD.gn index fca5ef1ca9f..4243826e4f6 100644 --- a/src/tint/lang/spirv/writer/printer/BUILD.gn +++ b/src/tint/lang/spirv/writer/printer/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -44,6 +45,7 @@ if (tint_build_spv_writer) { "printer.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", diff --git a/src/tint/lang/spirv/writer/raise/BUILD.bazel b/src/tint/lang/spirv/writer/raise/BUILD.bazel index 3895fd0d1e4..c5dc6e30a37 100644 --- a/src/tint/lang/spirv/writer/raise/BUILD.bazel +++ b/src/tint/lang/spirv/writer/raise/BUILD.bazel @@ -86,6 +86,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ] + select({ ":tint_build_spv_reader_or_tint_build_spv_writer": [ "@spirv_headers//:spirv_cpp11_headers", "@spirv_headers//:spirv_c_headers", @@ -135,6 +136,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ] + select({ ":tint_build_spv_writer": [ "//src/tint/lang/spirv/writer/raise", diff --git a/src/tint/lang/spirv/writer/raise/BUILD.cmake b/src/tint/lang/spirv/writer/raise/BUILD.cmake index 71c2ef47968..5001512d619 100644 --- a/src/tint/lang/spirv/writer/raise/BUILD.cmake +++ b/src/tint/lang/spirv/writer/raise/BUILD.cmake @@ -89,6 +89,10 @@ tint_target_add_dependencies(tint_lang_spirv_writer_raise lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_spirv_writer_raise lib + "src_utils" +) + if(TINT_BUILD_SPV_READER OR TINT_BUILD_SPV_WRITER) tint_target_add_external_dependencies(tint_lang_spirv_writer_raise lib "spirv-headers" @@ -144,6 +148,7 @@ tint_target_add_dependencies(tint_lang_spirv_writer_raise_test test tint_target_add_external_dependencies(tint_lang_spirv_writer_raise_test test "gtest" + "src_utils" ) if(TINT_BUILD_SPV_WRITER) diff --git a/src/tint/lang/spirv/writer/raise/BUILD.gn b/src/tint/lang/spirv/writer/raise/BUILD.gn index 2927a465e42..670f1ca870c 100644 --- a/src/tint/lang/spirv/writer/raise/BUILD.gn +++ b/src/tint/lang/spirv/writer/raise/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -64,6 +65,7 @@ if (tint_build_spv_writer) { "var_for_dynamic_index.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/common", @@ -114,6 +116,7 @@ if (tint_build_unittests) { "var_for_dynamic_index_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/wgsl/BUILD.bazel b/src/tint/lang/wgsl/BUILD.bazel index b945e60f857..388f51a514e 100644 --- a/src/tint/lang/wgsl/BUILD.bazel +++ b/src/tint/lang/wgsl/BUILD.bazel @@ -60,6 +60,7 @@ cc_library( "//src/tint/utils/rtti", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -112,6 +113,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ] + select({ ":tint_build_wgsl_reader": [ "//src/tint/lang/wgsl/reader", @@ -149,6 +151,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@benchmark", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/lang/wgsl/BUILD.cmake b/src/tint/lang/wgsl/BUILD.cmake index ae000ff28c0..c84211aed10 100644 --- a/src/tint/lang/wgsl/BUILD.cmake +++ b/src/tint/lang/wgsl/BUILD.cmake @@ -75,6 +75,10 @@ tint_target_add_dependencies(tint_lang_wgsl lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_wgsl lib + "src_utils" +) + ################################################################################ # Target: tint_lang_wgsl_test # Kind: test @@ -119,6 +123,7 @@ tint_target_add_dependencies(tint_lang_wgsl_test test tint_target_add_external_dependencies(tint_lang_wgsl_test test "gtest" + "src_utils" ) if(TINT_BUILD_WGSL_READER) @@ -165,6 +170,7 @@ tint_target_add_dependencies(tint_lang_wgsl_bench bench tint_target_add_external_dependencies(tint_lang_wgsl_bench bench "google-benchmark" + "src_utils" ) ################################################################################ @@ -207,6 +213,10 @@ tint_target_add_dependencies(tint_lang_wgsl_fuzz fuzz tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_wgsl_fuzz fuzz + "src_utils" +) + if(TINT_BUILD_WGSL_READER) tint_target_add_dependencies(tint_lang_wgsl_fuzz fuzz tint_cmd_fuzz_wgsl_fuzz diff --git a/src/tint/lang/wgsl/BUILD.gn b/src/tint/lang/wgsl/BUILD.gn index 7afe4de924a..ba77afe2b27 100644 --- a/src/tint/lang/wgsl/BUILD.gn +++ b/src/tint/lang/wgsl/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -54,6 +55,7 @@ libtint_source_set("wgsl") { "extension.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/utils/containers", "${tint_src_dir}/utils/diagnostic", "${tint_src_dir}/utils/ice", @@ -76,6 +78,7 @@ if (tint_build_unittests) { "wgsl_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", @@ -129,6 +132,7 @@ if (tint_build_benchmarks) { "extension_bench.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:google_benchmark", "${tint_src_dir}/lang/wgsl", "${tint_src_dir}/utils/containers", @@ -147,6 +151,7 @@ if (tint_build_benchmarks) { tint_fuzz_source_set("fuzz") { sources = [] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", diff --git a/src/tint/lang/wgsl/ast/BUILD.bazel b/src/tint/lang/wgsl/ast/BUILD.bazel index e038bf6a016..061418208fd 100644 --- a/src/tint/lang/wgsl/ast/BUILD.bazel +++ b/src/tint/lang/wgsl/ast/BUILD.bazel @@ -221,6 +221,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -332,6 +333,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ] + select({ ":tint_build_wgsl_reader": [ "//src/tint/lang/wgsl/reader", diff --git a/src/tint/lang/wgsl/ast/BUILD.cmake b/src/tint/lang/wgsl/ast/BUILD.cmake index 6afc090c702..4399bb067e9 100644 --- a/src/tint/lang/wgsl/ast/BUILD.cmake +++ b/src/tint/lang/wgsl/ast/BUILD.cmake @@ -224,6 +224,10 @@ tint_target_add_dependencies(tint_lang_wgsl_ast lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_wgsl_ast lib + "src_utils" +) + ################################################################################ # Target: tint_lang_wgsl_ast_test # Kind: test @@ -327,6 +331,7 @@ tint_target_add_dependencies(tint_lang_wgsl_ast_test test tint_target_add_external_dependencies(tint_lang_wgsl_ast_test test "gtest" + "src_utils" ) if(TINT_BUILD_WGSL_READER) diff --git a/src/tint/lang/wgsl/ast/BUILD.gn b/src/tint/lang/wgsl/ast/BUILD.gn index a1b43d70f57..c1639612617 100644 --- a/src/tint/lang/wgsl/ast/BUILD.gn +++ b/src/tint/lang/wgsl/ast/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -206,6 +207,7 @@ libtint_source_set("ast") { "workgroup_attribute.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/type", @@ -295,6 +297,7 @@ if (tint_build_unittests) { "workgroup_attribute_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/wgsl/ast/transform/BUILD.bazel b/src/tint/lang/wgsl/ast/transform/BUILD.bazel index 62bf03b68b2..d9c410031ce 100644 --- a/src/tint/lang/wgsl/ast/transform/BUILD.bazel +++ b/src/tint/lang/wgsl/ast/transform/BUILD.bazel @@ -142,6 +142,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -222,6 +223,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ] + select({ ":tint_build_wgsl_reader": [ "//src/tint/lang/wgsl/reader", diff --git a/src/tint/lang/wgsl/ast/transform/BUILD.cmake b/src/tint/lang/wgsl/ast/transform/BUILD.cmake index 0fc07ed9c2d..bdee3958904 100644 --- a/src/tint/lang/wgsl/ast/transform/BUILD.cmake +++ b/src/tint/lang/wgsl/ast/transform/BUILD.cmake @@ -143,6 +143,10 @@ tint_target_add_dependencies(tint_lang_wgsl_ast_transform lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_wgsl_ast_transform lib + "src_utils" +) + if(TINT_BUILD_WGSL_READER AND TINT_BUILD_WGSL_WRITER) ################################################################################ # Target: tint_lang_wgsl_ast_transform_test @@ -226,6 +230,7 @@ tint_target_add_dependencies(tint_lang_wgsl_ast_transform_test test tint_target_add_external_dependencies(tint_lang_wgsl_ast_transform_test test "gtest" + "src_utils" ) if(TINT_BUILD_WGSL_READER) diff --git a/src/tint/lang/wgsl/ast/transform/BUILD.gn b/src/tint/lang/wgsl/ast/transform/BUILD.gn index 301b8176d70..b6014c20de6 100644 --- a/src/tint/lang/wgsl/ast/transform/BUILD.gn +++ b/src/tint/lang/wgsl/ast/transform/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -120,6 +121,7 @@ libtint_source_set("transform") { "zero_init_workgroup_memory.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/common", @@ -193,6 +195,7 @@ if (tint_build_unittests) { "zero_init_workgroup_memory_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/wgsl/common/BUILD.bazel b/src/tint/lang/wgsl/common/BUILD.bazel index 96127684498..fa2d40bb937 100644 --- a/src/tint/lang/wgsl/common/BUILD.bazel +++ b/src/tint/lang/wgsl/common/BUILD.bazel @@ -59,6 +59,7 @@ cc_library( "//src/tint/utils/rtti", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -85,6 +86,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/lang/wgsl/common/BUILD.cmake b/src/tint/lang/wgsl/common/BUILD.cmake index da8e8ac57f1..9da9eb11258 100644 --- a/src/tint/lang/wgsl/common/BUILD.cmake +++ b/src/tint/lang/wgsl/common/BUILD.cmake @@ -60,6 +60,10 @@ tint_target_add_dependencies(tint_lang_wgsl_common lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_wgsl_common lib + "src_utils" +) + ################################################################################ # Target: tint_lang_wgsl_common_test # Kind: test @@ -87,4 +91,5 @@ tint_target_add_dependencies(tint_lang_wgsl_common_test test tint_target_add_external_dependencies(tint_lang_wgsl_common_test test "gtest" + "src_utils" ) diff --git a/src/tint/lang/wgsl/common/BUILD.gn b/src/tint/lang/wgsl/common/BUILD.gn index 74a157617c4..55accf836ed 100644 --- a/src/tint/lang/wgsl/common/BUILD.gn +++ b/src/tint/lang/wgsl/common/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -49,6 +50,7 @@ libtint_source_set("common") { "validation_mode.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/lang/wgsl", "${tint_src_dir}/lang/wgsl/features", "${tint_src_dir}/utils/containers", @@ -68,6 +70,7 @@ if (tint_build_unittests) { tint_unittests_source_set("unittests") { sources = [ "allowed_features_test.cc" ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/lang/wgsl", "${tint_src_dir}/lang/wgsl/common", diff --git a/src/tint/lang/wgsl/helpers/BUILD.bazel b/src/tint/lang/wgsl/helpers/BUILD.bazel index 5e1862aac19..a284f3088ce 100644 --- a/src/tint/lang/wgsl/helpers/BUILD.bazel +++ b/src/tint/lang/wgsl/helpers/BUILD.bazel @@ -75,6 +75,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -117,6 +118,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/lang/wgsl/helpers/BUILD.cmake b/src/tint/lang/wgsl/helpers/BUILD.cmake index 061dbfd1516..c9551cc10ad 100644 --- a/src/tint/lang/wgsl/helpers/BUILD.cmake +++ b/src/tint/lang/wgsl/helpers/BUILD.cmake @@ -76,6 +76,10 @@ tint_target_add_dependencies(tint_lang_wgsl_helpers lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_wgsl_helpers lib + "src_utils" +) + ################################################################################ # Target: tint_lang_wgsl_helpers_test # Kind: test @@ -119,4 +123,5 @@ tint_target_add_dependencies(tint_lang_wgsl_helpers_test test tint_target_add_external_dependencies(tint_lang_wgsl_helpers_test test "gtest" + "src_utils" ) diff --git a/src/tint/lang/wgsl/helpers/BUILD.gn b/src/tint/lang/wgsl/helpers/BUILD.gn index 09cdf36ac0c..7aad2123f92 100644 --- a/src/tint/lang/wgsl/helpers/BUILD.gn +++ b/src/tint/lang/wgsl/helpers/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -54,6 +55,7 @@ libtint_source_set("helpers") { "flatten_bindings.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", @@ -88,6 +90,7 @@ if (tint_build_unittests) { "flatten_bindings_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/wgsl/inspector/BUILD.bazel b/src/tint/lang/wgsl/inspector/BUILD.bazel index 84c76904f62..f07efccc960 100644 --- a/src/tint/lang/wgsl/inspector/BUILD.bazel +++ b/src/tint/lang/wgsl/inspector/BUILD.bazel @@ -73,6 +73,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -115,6 +116,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ] + select({ ":tint_build_wgsl_reader": [ "//src/tint/lang/wgsl/reader", diff --git a/src/tint/lang/wgsl/inspector/BUILD.cmake b/src/tint/lang/wgsl/inspector/BUILD.cmake index 71cddb598ae..db0442406f0 100644 --- a/src/tint/lang/wgsl/inspector/BUILD.cmake +++ b/src/tint/lang/wgsl/inspector/BUILD.cmake @@ -74,6 +74,10 @@ tint_target_add_dependencies(tint_lang_wgsl_inspector lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_wgsl_inspector lib + "src_utils" +) + if(TINT_BUILD_WGSL_READER) ################################################################################ # Target: tint_lang_wgsl_inspector_test @@ -119,6 +123,7 @@ tint_target_add_dependencies(tint_lang_wgsl_inspector_test test tint_target_add_external_dependencies(tint_lang_wgsl_inspector_test test "gtest" + "src_utils" ) if(TINT_BUILD_WGSL_READER) diff --git a/src/tint/lang/wgsl/inspector/BUILD.gn b/src/tint/lang/wgsl/inspector/BUILD.gn index 5b75094ab51..f28b12be1ce 100644 --- a/src/tint/lang/wgsl/inspector/BUILD.gn +++ b/src/tint/lang/wgsl/inspector/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -54,6 +55,7 @@ libtint_source_set("inspector") { "scalar.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", @@ -89,6 +91,7 @@ if (tint_build_unittests) { "inspector_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/wgsl/intrinsic/BUILD.bazel b/src/tint/lang/wgsl/intrinsic/BUILD.bazel index 46b401450b6..f9c270a38e3 100644 --- a/src/tint/lang/wgsl/intrinsic/BUILD.bazel +++ b/src/tint/lang/wgsl/intrinsic/BUILD.bazel @@ -65,6 +65,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -105,6 +106,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/lang/wgsl/intrinsic/BUILD.cmake b/src/tint/lang/wgsl/intrinsic/BUILD.cmake index b40aa9bdc77..6fdad926bd3 100644 --- a/src/tint/lang/wgsl/intrinsic/BUILD.cmake +++ b/src/tint/lang/wgsl/intrinsic/BUILD.cmake @@ -66,6 +66,10 @@ tint_target_add_dependencies(tint_lang_wgsl_intrinsic lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_wgsl_intrinsic lib + "src_utils" +) + ################################################################################ # Target: tint_lang_wgsl_intrinsic_test # Kind: test @@ -107,4 +111,5 @@ tint_target_add_dependencies(tint_lang_wgsl_intrinsic_test test tint_target_add_external_dependencies(tint_lang_wgsl_intrinsic_test test "gtest" + "src_utils" ) diff --git a/src/tint/lang/wgsl/intrinsic/BUILD.gn b/src/tint/lang/wgsl/intrinsic/BUILD.gn index 0571b28670d..a7e658334ef 100644 --- a/src/tint/lang/wgsl/intrinsic/BUILD.gn +++ b/src/tint/lang/wgsl/intrinsic/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -50,6 +51,7 @@ libtint_source_set("intrinsic") { "dialect.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", "${tint_src_dir}/lang/core/intrinsic", @@ -74,6 +76,7 @@ if (tint_build_unittests) { tint_unittests_source_set("unittests") { sources = [ "table_test.cc" ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/wgsl/ir/BUILD.bazel b/src/tint/lang/wgsl/ir/BUILD.bazel index 259b851cdff..b423046529c 100644 --- a/src/tint/lang/wgsl/ir/BUILD.bazel +++ b/src/tint/lang/wgsl/ir/BUILD.bazel @@ -68,6 +68,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/lang/wgsl/ir/BUILD.cmake b/src/tint/lang/wgsl/ir/BUILD.cmake index d0192da61b4..64f44dbad5d 100644 --- a/src/tint/lang/wgsl/ir/BUILD.cmake +++ b/src/tint/lang/wgsl/ir/BUILD.cmake @@ -68,3 +68,7 @@ tint_target_add_dependencies(tint_lang_wgsl_ir lib tint_utils_text tint_utils_traits ) + +tint_target_add_external_dependencies(tint_lang_wgsl_ir lib + "src_utils" +) diff --git a/src/tint/lang/wgsl/ir/BUILD.gn b/src/tint/lang/wgsl/ir/BUILD.gn index 1194bb7b314..12e5c0d060b 100644 --- a/src/tint/lang/wgsl/ir/BUILD.gn +++ b/src/tint/lang/wgsl/ir/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -46,6 +47,7 @@ libtint_source_set("ir") { "unary.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", diff --git a/src/tint/lang/wgsl/ls/BUILD.bazel b/src/tint/lang/wgsl/ls/BUILD.bazel index 52c6e487da2..9f8ae6d5d62 100644 --- a/src/tint/lang/wgsl/ls/BUILD.bazel +++ b/src/tint/lang/wgsl/ls/BUILD.bazel @@ -94,6 +94,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ] + select({ ":tint_build_tintd": [ @@ -148,6 +149,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ] + select({ ":tint_build_tintd": [ diff --git a/src/tint/lang/wgsl/ls/BUILD.cmake b/src/tint/lang/wgsl/ls/BUILD.cmake index b6335b6ea9f..e3b3f145378 100644 --- a/src/tint/lang/wgsl/ls/BUILD.cmake +++ b/src/tint/lang/wgsl/ls/BUILD.cmake @@ -98,6 +98,7 @@ tint_target_add_dependencies(tint_lang_wgsl_ls lib ) tint_target_add_external_dependencies(tint_lang_wgsl_ls lib + "src_utils" "thread" ) @@ -160,6 +161,7 @@ tint_target_add_dependencies(tint_lang_wgsl_ls_test test tint_target_add_external_dependencies(tint_lang_wgsl_ls_test test "gtest" + "src_utils" ) if(TINT_BUILD_TINTD) diff --git a/src/tint/lang/wgsl/ls/BUILD.gn b/src/tint/lang/wgsl/ls/BUILD.gn index 428904488b6..902a1313de2 100644 --- a/src/tint/lang/wgsl/ls/BUILD.gn +++ b/src/tint/lang/wgsl/ls/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -71,6 +72,7 @@ if (tint_build_tintd && tint_build_wgsl_reader) { "utils.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:thread", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", @@ -127,6 +129,7 @@ if (tint_build_unittests) { "symbols_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", diff --git a/src/tint/lang/wgsl/program/BUILD.bazel b/src/tint/lang/wgsl/program/BUILD.bazel index 96c08799fdd..2233208b39d 100644 --- a/src/tint/lang/wgsl/program/BUILD.bazel +++ b/src/tint/lang/wgsl/program/BUILD.bazel @@ -70,6 +70,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -109,6 +110,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/lang/wgsl/program/BUILD.cmake b/src/tint/lang/wgsl/program/BUILD.cmake index 75e0236e5dc..763b7e99942 100644 --- a/src/tint/lang/wgsl/program/BUILD.cmake +++ b/src/tint/lang/wgsl/program/BUILD.cmake @@ -71,6 +71,10 @@ tint_target_add_dependencies(tint_lang_wgsl_program lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_wgsl_program lib + "src_utils" +) + ################################################################################ # Target: tint_lang_wgsl_program_test # Kind: test @@ -111,6 +115,7 @@ tint_target_add_dependencies(tint_lang_wgsl_program_test test tint_target_add_external_dependencies(tint_lang_wgsl_program_test test "gtest" + "src_utils" ) ################################################################################ @@ -149,6 +154,10 @@ tint_target_add_dependencies(tint_lang_wgsl_program_fuzz fuzz tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_wgsl_program_fuzz fuzz + "src_utils" +) + if(TINT_BUILD_WGSL_READER) tint_target_add_dependencies(tint_lang_wgsl_program_fuzz fuzz tint_cmd_fuzz_wgsl_fuzz diff --git a/src/tint/lang/wgsl/program/BUILD.gn b/src/tint/lang/wgsl/program/BUILD.gn index 98ce8db20d6..5b04ae2ac62 100644 --- a/src/tint/lang/wgsl/program/BUILD.gn +++ b/src/tint/lang/wgsl/program/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -52,6 +53,7 @@ libtint_source_set("program") { "program_builder.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", @@ -83,6 +85,7 @@ if (tint_build_unittests) { "program_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", @@ -116,6 +119,7 @@ if (tint_build_unittests) { tint_fuzz_source_set("fuzz") { sources = [] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", diff --git a/src/tint/lang/wgsl/reader/BUILD.bazel b/src/tint/lang/wgsl/reader/BUILD.bazel index 8c52a2c8942..1064e01cfc3 100644 --- a/src/tint/lang/wgsl/reader/BUILD.bazel +++ b/src/tint/lang/wgsl/reader/BUILD.bazel @@ -72,6 +72,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ] + select({ ":tint_build_wgsl_reader": [ "//src/tint/lang/wgsl/reader/parser", @@ -104,6 +105,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ] + select({ ":tint_build_wgsl_reader": [ "//src/tint/lang/wgsl/reader", @@ -145,6 +147,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@benchmark", + "//src/utils", ] + select({ ":tint_build_wgsl_reader": [ "//src/tint/cmd/bench:bench", diff --git a/src/tint/lang/wgsl/reader/BUILD.cmake b/src/tint/lang/wgsl/reader/BUILD.cmake index 15421cd8399..09f6c8cc0e7 100644 --- a/src/tint/lang/wgsl/reader/BUILD.cmake +++ b/src/tint/lang/wgsl/reader/BUILD.cmake @@ -79,6 +79,10 @@ tint_target_add_dependencies(tint_lang_wgsl_reader lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_wgsl_reader lib + "src_utils" +) + if(TINT_BUILD_WGSL_READER) tint_target_add_dependencies(tint_lang_wgsl_reader lib tint_lang_wgsl_reader_parser @@ -116,6 +120,7 @@ tint_target_add_dependencies(tint_lang_wgsl_reader_test test tint_target_add_external_dependencies(tint_lang_wgsl_reader_test test "gtest" + "src_utils" ) if(TINT_BUILD_WGSL_READER) @@ -164,6 +169,7 @@ tint_target_add_dependencies(tint_lang_wgsl_reader_bench bench tint_target_add_external_dependencies(tint_lang_wgsl_reader_bench bench "google-benchmark" + "src_utils" ) if(TINT_BUILD_WGSL_READER) diff --git a/src/tint/lang/wgsl/reader/BUILD.gn b/src/tint/lang/wgsl/reader/BUILD.gn index 9cf37f2993d..23278cb7064 100644 --- a/src/tint/lang/wgsl/reader/BUILD.gn +++ b/src/tint/lang/wgsl/reader/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -49,6 +50,7 @@ if (tint_build_wgsl_reader) { "reader.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", @@ -90,6 +92,7 @@ if (tint_build_unittests) { tint_unittests_source_set("unittests") { sources = [ "options_test.cc" ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/lang/wgsl", "${tint_src_dir}/lang/wgsl/common", @@ -118,6 +121,7 @@ if (tint_build_benchmarks) { tint_benchmarks_source_set("bench") { sources = [ "reader_bench.cc" ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:google_benchmark", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/wgsl/reader/lower/BUILD.bazel b/src/tint/lang/wgsl/reader/lower/BUILD.bazel index 0523a2c79b7..4030b44b48b 100644 --- a/src/tint/lang/wgsl/reader/lower/BUILD.bazel +++ b/src/tint/lang/wgsl/reader/lower/BUILD.bazel @@ -67,6 +67,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -103,6 +104,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/lang/wgsl/reader/lower/BUILD.cmake b/src/tint/lang/wgsl/reader/lower/BUILD.cmake index 7dee22e7366..930d1d03f68 100644 --- a/src/tint/lang/wgsl/reader/lower/BUILD.cmake +++ b/src/tint/lang/wgsl/reader/lower/BUILD.cmake @@ -68,6 +68,10 @@ tint_target_add_dependencies(tint_lang_wgsl_reader_lower lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_wgsl_reader_lower lib + "src_utils" +) + ################################################################################ # Target: tint_lang_wgsl_reader_lower_test # Kind: test @@ -105,4 +109,5 @@ tint_target_add_dependencies(tint_lang_wgsl_reader_lower_test test tint_target_add_external_dependencies(tint_lang_wgsl_reader_lower_test test "gtest" + "src_utils" ) diff --git a/src/tint/lang/wgsl/reader/lower/BUILD.gn b/src/tint/lang/wgsl/reader/lower/BUILD.gn index 97181ea1a18..5092496020b 100644 --- a/src/tint/lang/wgsl/reader/lower/BUILD.gn +++ b/src/tint/lang/wgsl/reader/lower/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -48,6 +49,7 @@ libtint_source_set("lower") { "lower.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", @@ -76,6 +78,7 @@ if (tint_build_unittests) { tint_unittests_source_set("unittests") { sources = [ "lower_test.cc" ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/wgsl/reader/parser/BUILD.bazel b/src/tint/lang/wgsl/reader/parser/BUILD.bazel index 724f05df68c..17e07e47933 100644 --- a/src/tint/lang/wgsl/reader/parser/BUILD.bazel +++ b/src/tint/lang/wgsl/reader/parser/BUILD.bazel @@ -77,6 +77,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -180,6 +181,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ] + select({ ":tint_build_wgsl_reader": [ "//src/tint/lang/wgsl/reader/parser", diff --git a/src/tint/lang/wgsl/reader/parser/BUILD.cmake b/src/tint/lang/wgsl/reader/parser/BUILD.cmake index d2e9c498094..36170ed6934 100644 --- a/src/tint/lang/wgsl/reader/parser/BUILD.cmake +++ b/src/tint/lang/wgsl/reader/parser/BUILD.cmake @@ -80,6 +80,10 @@ tint_target_add_dependencies(tint_lang_wgsl_reader_parser lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_wgsl_reader_parser lib + "src_utils" +) + endif(TINT_BUILD_WGSL_READER) if(TINT_BUILD_WGSL_READER) ################################################################################ @@ -187,6 +191,7 @@ tint_target_add_dependencies(tint_lang_wgsl_reader_parser_test test tint_target_add_external_dependencies(tint_lang_wgsl_reader_parser_test test "gtest" + "src_utils" ) if(TINT_BUILD_WGSL_READER) diff --git a/src/tint/lang/wgsl/reader/parser/BUILD.gn b/src/tint/lang/wgsl/reader/parser/BUILD.gn index f68c92cbad3..7abfb27a638 100644 --- a/src/tint/lang/wgsl/reader/parser/BUILD.gn +++ b/src/tint/lang/wgsl/reader/parser/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -55,6 +56,7 @@ if (tint_build_wgsl_reader) { "token.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", @@ -156,6 +158,7 @@ if (tint_build_unittests) { "while_stmt_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/wgsl/reader/program_to_ir/BUILD.bazel b/src/tint/lang/wgsl/reader/program_to_ir/BUILD.bazel index 4b1a500739a..456ac24be6f 100644 --- a/src/tint/lang/wgsl/reader/program_to_ir/BUILD.bazel +++ b/src/tint/lang/wgsl/reader/program_to_ir/BUILD.bazel @@ -71,6 +71,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -122,6 +123,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ] + select({ ":tint_build_wgsl_reader": [ "//src/tint/lang/wgsl/reader", diff --git a/src/tint/lang/wgsl/reader/program_to_ir/BUILD.cmake b/src/tint/lang/wgsl/reader/program_to_ir/BUILD.cmake index b8f2a72bb24..a8161ee3167 100644 --- a/src/tint/lang/wgsl/reader/program_to_ir/BUILD.cmake +++ b/src/tint/lang/wgsl/reader/program_to_ir/BUILD.cmake @@ -74,6 +74,10 @@ tint_target_add_dependencies(tint_lang_wgsl_reader_program_to_ir lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_wgsl_reader_program_to_ir lib + "src_utils" +) + endif(TINT_BUILD_WGSL_READER) if(TINT_BUILD_WGSL_READER) ################################################################################ @@ -129,6 +133,7 @@ tint_target_add_dependencies(tint_lang_wgsl_reader_program_to_ir_test test tint_target_add_external_dependencies(tint_lang_wgsl_reader_program_to_ir_test test "gtest" + "src_utils" ) if(TINT_BUILD_WGSL_READER) diff --git a/src/tint/lang/wgsl/reader/program_to_ir/BUILD.gn b/src/tint/lang/wgsl/reader/program_to_ir/BUILD.gn index 7bc014b9862..a6c64f9c922 100644 --- a/src/tint/lang/wgsl/reader/program_to_ir/BUILD.gn +++ b/src/tint/lang/wgsl/reader/program_to_ir/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -48,6 +49,7 @@ if (tint_build_wgsl_reader) { "program_to_ir.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", @@ -97,6 +99,7 @@ if (tint_build_unittests) { "var_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/wgsl/resolver/BUILD.bazel b/src/tint/lang/wgsl/resolver/BUILD.bazel index a830ca170ae..adcd99e86e4 100644 --- a/src/tint/lang/wgsl/resolver/BUILD.bazel +++ b/src/tint/lang/wgsl/resolver/BUILD.bazel @@ -84,6 +84,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -193,6 +194,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ] + select({ ":tint_build_wgsl_reader": [ "//src/tint/lang/wgsl/reader", diff --git a/src/tint/lang/wgsl/resolver/BUILD.cmake b/src/tint/lang/wgsl/resolver/BUILD.cmake index 5537ca12357..b471d61bcfe 100644 --- a/src/tint/lang/wgsl/resolver/BUILD.cmake +++ b/src/tint/lang/wgsl/resolver/BUILD.cmake @@ -85,6 +85,10 @@ tint_target_add_dependencies(tint_lang_wgsl_resolver lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_wgsl_resolver lib + "src_utils" +) + ################################################################################ # Target: tint_lang_wgsl_resolver_test # Kind: test @@ -190,6 +194,7 @@ tint_target_add_dependencies(tint_lang_wgsl_resolver_test test tint_target_add_external_dependencies(tint_lang_wgsl_resolver_test test "gtest" + "src_utils" ) if(TINT_BUILD_WGSL_READER) diff --git a/src/tint/lang/wgsl/resolver/BUILD.gn b/src/tint/lang/wgsl/resolver/BUILD.gn index 1fd5809cae4..4ffdff0755d 100644 --- a/src/tint/lang/wgsl/resolver/BUILD.gn +++ b/src/tint/lang/wgsl/resolver/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -62,6 +63,7 @@ libtint_source_set("resolver") { "validator.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", @@ -156,6 +158,7 @@ if (tint_build_unittests) { "variable_validation_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/wgsl/sem/BUILD.bazel b/src/tint/lang/wgsl/sem/BUILD.bazel index 37b8323a55a..a39ef7fc88a 100644 --- a/src/tint/lang/wgsl/sem/BUILD.bazel +++ b/src/tint/lang/wgsl/sem/BUILD.bazel @@ -131,6 +131,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -172,6 +173,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/lang/wgsl/sem/BUILD.cmake b/src/tint/lang/wgsl/sem/BUILD.cmake index 6120b90f387..4d8407f5fd5 100644 --- a/src/tint/lang/wgsl/sem/BUILD.cmake +++ b/src/tint/lang/wgsl/sem/BUILD.cmake @@ -132,6 +132,10 @@ tint_target_add_dependencies(tint_lang_wgsl_sem lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_wgsl_sem lib + "src_utils" +) + ################################################################################ # Target: tint_lang_wgsl_sem_test # Kind: test @@ -174,4 +178,5 @@ tint_target_add_dependencies(tint_lang_wgsl_sem_test test tint_target_add_external_dependencies(tint_lang_wgsl_sem_test test "gtest" + "src_utils" ) diff --git a/src/tint/lang/wgsl/sem/BUILD.gn b/src/tint/lang/wgsl/sem/BUILD.gn index e6b2b069dcf..7cad0cf4d1e 100644 --- a/src/tint/lang/wgsl/sem/BUILD.gn +++ b/src/tint/lang/wgsl/sem/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -113,6 +114,7 @@ libtint_source_set("sem") { "while_statement.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", @@ -147,6 +149,7 @@ if (tint_build_unittests) { "value_expression_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/wgsl/writer/BUILD.bazel b/src/tint/lang/wgsl/writer/BUILD.bazel index 441673d3e6d..dc4476cc118 100644 --- a/src/tint/lang/wgsl/writer/BUILD.bazel +++ b/src/tint/lang/wgsl/writer/BUILD.bazel @@ -77,6 +77,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ] + select({ ":tint_build_wgsl_writer": [ "//src/tint/lang/wgsl/writer/ast_printer", @@ -123,6 +124,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ] + select({ ":tint_build_wgsl_writer": [ "//src/tint/lang/wgsl/writer", @@ -163,6 +165,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@benchmark", + "//src/utils", ] + select({ ":tint_build_wgsl_reader": [ "//src/tint/cmd/bench:bench", diff --git a/src/tint/lang/wgsl/writer/BUILD.cmake b/src/tint/lang/wgsl/writer/BUILD.cmake index 24754a371e6..fc1cd6874ba 100644 --- a/src/tint/lang/wgsl/writer/BUILD.cmake +++ b/src/tint/lang/wgsl/writer/BUILD.cmake @@ -85,6 +85,10 @@ tint_target_add_dependencies(tint_lang_wgsl_writer lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_wgsl_writer lib + "src_utils" +) + if(TINT_BUILD_WGSL_WRITER) tint_target_add_dependencies(tint_lang_wgsl_writer lib tint_lang_wgsl_writer_ast_printer @@ -136,6 +140,7 @@ tint_target_add_dependencies(tint_lang_wgsl_writer_test test tint_target_add_external_dependencies(tint_lang_wgsl_writer_test test "gtest" + "src_utils" ) if(TINT_BUILD_WGSL_WRITER) @@ -183,6 +188,7 @@ tint_target_add_dependencies(tint_lang_wgsl_writer_bench bench tint_target_add_external_dependencies(tint_lang_wgsl_writer_bench bench "google-benchmark" + "src_utils" ) if(TINT_BUILD_WGSL_READER) @@ -234,6 +240,10 @@ tint_target_add_dependencies(tint_lang_wgsl_writer_fuzz fuzz tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_wgsl_writer_fuzz fuzz + "src_utils" +) + if(TINT_BUILD_WGSL_READER) tint_target_add_sources(tint_lang_wgsl_writer_fuzz fuzz "lang/wgsl/writer/writer_fuzz.cc" diff --git a/src/tint/lang/wgsl/writer/BUILD.gn b/src/tint/lang/wgsl/writer/BUILD.gn index fa18d45b0d3..abb71428448 100644 --- a/src/tint/lang/wgsl/writer/BUILD.gn +++ b/src/tint/lang/wgsl/writer/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -52,6 +53,7 @@ if (tint_build_wgsl_writer) { "writer.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", @@ -95,6 +97,7 @@ if (tint_build_unittests) { "writer_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", @@ -137,6 +140,7 @@ if (tint_build_benchmarks) { tint_benchmarks_source_set("bench") { sources = [ "writer_bench.cc" ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:google_benchmark", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", @@ -177,6 +181,7 @@ if (tint_build_wgsl_writer) { tint_fuzz_source_set("fuzz") { sources = [] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", "${tint_src_dir}/lang/core/type", diff --git a/src/tint/lang/wgsl/writer/ast_printer/BUILD.bazel b/src/tint/lang/wgsl/writer/ast_printer/BUILD.bazel index f5801053eb7..df38a473764 100644 --- a/src/tint/lang/wgsl/writer/ast_printer/BUILD.bazel +++ b/src/tint/lang/wgsl/writer/ast_printer/BUILD.bazel @@ -68,6 +68,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -136,6 +137,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ] + select({ ":tint_build_wgsl_writer": [ "//src/tint/lang/wgsl/writer/ast_printer", diff --git a/src/tint/lang/wgsl/writer/ast_printer/BUILD.cmake b/src/tint/lang/wgsl/writer/ast_printer/BUILD.cmake index 7ce8c419147..ba21d104936 100644 --- a/src/tint/lang/wgsl/writer/ast_printer/BUILD.cmake +++ b/src/tint/lang/wgsl/writer/ast_printer/BUILD.cmake @@ -71,6 +71,10 @@ tint_target_add_dependencies(tint_lang_wgsl_writer_ast_printer lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_wgsl_writer_ast_printer lib + "src_utils" +) + endif(TINT_BUILD_WGSL_WRITER) if(TINT_BUILD_WGSL_WRITER) ################################################################################ @@ -143,6 +147,7 @@ tint_target_add_dependencies(tint_lang_wgsl_writer_ast_printer_test test tint_target_add_external_dependencies(tint_lang_wgsl_writer_ast_printer_test test "gtest" + "src_utils" ) if(TINT_BUILD_WGSL_WRITER) diff --git a/src/tint/lang/wgsl/writer/ast_printer/BUILD.gn b/src/tint/lang/wgsl/writer/ast_printer/BUILD.gn index 3d484a591e2..97e97f37cad 100644 --- a/src/tint/lang/wgsl/writer/ast_printer/BUILD.gn +++ b/src/tint/lang/wgsl/writer/ast_printer/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -48,6 +49,7 @@ if (tint_build_wgsl_writer) { "ast_printer.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", "${tint_src_dir}/lang/core/type", @@ -112,6 +114,7 @@ if (tint_build_unittests) { "variable_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/wgsl/writer/ir_to_program/BUILD.bazel b/src/tint/lang/wgsl/writer/ir_to_program/BUILD.bazel index f1efc80bcd9..f6f9740b5c1 100644 --- a/src/tint/lang/wgsl/writer/ir_to_program/BUILD.bazel +++ b/src/tint/lang/wgsl/writer/ir_to_program/BUILD.bazel @@ -74,6 +74,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -120,6 +121,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ] + select({ ":tint_build_wgsl_writer": [ "//src/tint/lang/wgsl/writer", diff --git a/src/tint/lang/wgsl/writer/ir_to_program/BUILD.cmake b/src/tint/lang/wgsl/writer/ir_to_program/BUILD.cmake index 813f1574cdd..cc4a164aa87 100644 --- a/src/tint/lang/wgsl/writer/ir_to_program/BUILD.cmake +++ b/src/tint/lang/wgsl/writer/ir_to_program/BUILD.cmake @@ -75,6 +75,10 @@ tint_target_add_dependencies(tint_lang_wgsl_writer_ir_to_program lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_wgsl_writer_ir_to_program lib + "src_utils" +) + ################################################################################ # Target: tint_lang_wgsl_writer_ir_to_program_test # Kind: test @@ -117,6 +121,7 @@ tint_target_add_dependencies(tint_lang_wgsl_writer_ir_to_program_test test tint_target_add_external_dependencies(tint_lang_wgsl_writer_ir_to_program_test test "gtest" + "src_utils" ) if(TINT_BUILD_WGSL_WRITER) diff --git a/src/tint/lang/wgsl/writer/ir_to_program/BUILD.gn b/src/tint/lang/wgsl/writer/ir_to_program/BUILD.gn index 1698652692d..61068a405b4 100644 --- a/src/tint/lang/wgsl/writer/ir_to_program/BUILD.gn +++ b/src/tint/lang/wgsl/writer/ir_to_program/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -49,6 +50,7 @@ libtint_source_set("ir_to_program") { "program_options.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", @@ -83,6 +85,7 @@ if (tint_build_unittests) { tint_unittests_source_set("unittests") { sources = [ "ir_to_program_test.h" ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/wgsl/writer/raise/BUILD.bazel b/src/tint/lang/wgsl/writer/raise/BUILD.bazel index 23184a89d9e..a4618f0b707 100644 --- a/src/tint/lang/wgsl/writer/raise/BUILD.bazel +++ b/src/tint/lang/wgsl/writer/raise/BUILD.bazel @@ -72,6 +72,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -107,6 +108,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/lang/wgsl/writer/raise/BUILD.cmake b/src/tint/lang/wgsl/writer/raise/BUILD.cmake index 2a30f2d0c9c..a713c4bea4e 100644 --- a/src/tint/lang/wgsl/writer/raise/BUILD.cmake +++ b/src/tint/lang/wgsl/writer/raise/BUILD.cmake @@ -73,6 +73,10 @@ tint_target_add_dependencies(tint_lang_wgsl_writer_raise lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_lang_wgsl_writer_raise lib + "src_utils" +) + ################################################################################ # Target: tint_lang_wgsl_writer_raise_test # Kind: test @@ -109,6 +113,7 @@ tint_target_add_dependencies(tint_lang_wgsl_writer_raise_test test tint_target_add_external_dependencies(tint_lang_wgsl_writer_raise_test test "gtest" + "src_utils" ) ################################################################################ @@ -144,3 +149,7 @@ tint_target_add_dependencies(tint_lang_wgsl_writer_raise_fuzz fuzz tint_utils_text tint_utils_traits ) + +tint_target_add_external_dependencies(tint_lang_wgsl_writer_raise_fuzz fuzz + "src_utils" +) diff --git a/src/tint/lang/wgsl/writer/raise/BUILD.gn b/src/tint/lang/wgsl/writer/raise/BUILD.gn index aa690711fe9..4f20c870539 100644 --- a/src/tint/lang/wgsl/writer/raise/BUILD.gn +++ b/src/tint/lang/wgsl/writer/raise/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -52,6 +53,7 @@ libtint_source_set("raise") { "value_to_let.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", @@ -85,6 +87,7 @@ if (tint_build_unittests) { "value_to_let_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", @@ -118,6 +121,7 @@ tint_fuzz_source_set("fuzz") { "value_to_let_fuzz.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/api/common", "${tint_src_dir}/cmd/fuzz/ir:fuzz", "${tint_src_dir}/lang/core", diff --git a/src/tint/lang/wgsl/writer/syntax_tree_printer/BUILD.bazel b/src/tint/lang/wgsl/writer/syntax_tree_printer/BUILD.bazel index 674222741e9..05b2860e7f4 100644 --- a/src/tint/lang/wgsl/writer/syntax_tree_printer/BUILD.bazel +++ b/src/tint/lang/wgsl/writer/syntax_tree_printer/BUILD.bazel @@ -68,6 +68,7 @@ cc_library( "//src/tint/utils/symbol", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/lang/wgsl/writer/syntax_tree_printer/BUILD.cmake b/src/tint/lang/wgsl/writer/syntax_tree_printer/BUILD.cmake index 889fd35623f..3fbd02dcb59 100644 --- a/src/tint/lang/wgsl/writer/syntax_tree_printer/BUILD.cmake +++ b/src/tint/lang/wgsl/writer/syntax_tree_printer/BUILD.cmake @@ -68,3 +68,7 @@ tint_target_add_dependencies(tint_lang_wgsl_writer_syntax_tree_printer lib tint_utils_text tint_utils_traits ) + +tint_target_add_external_dependencies(tint_lang_wgsl_writer_syntax_tree_printer lib + "src_utils" +) diff --git a/src/tint/lang/wgsl/writer/syntax_tree_printer/BUILD.gn b/src/tint/lang/wgsl/writer/syntax_tree_printer/BUILD.gn index 8a70111d5d8..731fda82978 100644 --- a/src/tint/lang/wgsl/writer/syntax_tree_printer/BUILD.gn +++ b/src/tint/lang/wgsl/writer/syntax_tree_printer/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -44,6 +45,7 @@ libtint_source_set("syntax_tree_printer") { "syntax_tree_printer.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/lang/core", "${tint_src_dir}/lang/core/constant", "${tint_src_dir}/lang/core/type", diff --git a/src/tint/utils/BUILD.gn b/src/tint/utils/BUILD.gn index e74a2fd7ca4..9806aa37b26 100644 --- a/src/tint/utils/BUILD.gn +++ b/src/tint/utils/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../scripts/dawn_overrides_with_defaults.gni") import("../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") diff --git a/src/tint/utils/bytes/BUILD.bazel b/src/tint/utils/bytes/BUILD.bazel index 3daeace96b4..a7c15f8e70d 100644 --- a/src/tint/utils/bytes/BUILD.bazel +++ b/src/tint/utils/bytes/BUILD.bazel @@ -65,6 +65,7 @@ cc_library( "//src/tint/utils/rtti", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -92,6 +93,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/utils/bytes/BUILD.cmake b/src/tint/utils/bytes/BUILD.cmake index 3438bbbadb4..d125e1375d4 100644 --- a/src/tint/utils/bytes/BUILD.cmake +++ b/src/tint/utils/bytes/BUILD.cmake @@ -66,6 +66,10 @@ tint_target_add_dependencies(tint_utils_bytes lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_utils_bytes lib + "src_utils" +) + ################################################################################ # Target: tint_utils_bytes_test # Kind: test @@ -94,4 +98,5 @@ tint_target_add_dependencies(tint_utils_bytes_test test tint_target_add_external_dependencies(tint_utils_bytes_test test "gtest" + "src_utils" ) diff --git a/src/tint/utils/bytes/BUILD.gn b/src/tint/utils/bytes/BUILD.gn index 6618381fffa..208fd8e354a 100644 --- a/src/tint/utils/bytes/BUILD.gn +++ b/src/tint/utils/bytes/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -57,6 +58,7 @@ libtint_source_set("bytes") { "writer.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/utils/containers", "${tint_src_dir}/utils/diagnostic", "${tint_src_dir}/utils/ice", @@ -79,6 +81,7 @@ if (tint_build_unittests) { "swap_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/utils/bytes", "${tint_src_dir}/utils/containers", diff --git a/src/tint/utils/cli/BUILD.bazel b/src/tint/utils/cli/BUILD.bazel index 19a72112c95..1d783989b48 100644 --- a/src/tint/utils/cli/BUILD.bazel +++ b/src/tint/utils/cli/BUILD.bazel @@ -56,6 +56,7 @@ cc_library( "//src/tint/utils/strconv", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -80,6 +81,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/utils/cli/BUILD.cmake b/src/tint/utils/cli/BUILD.cmake index 42cbb1f5851..9d7b9b39693 100644 --- a/src/tint/utils/cli/BUILD.cmake +++ b/src/tint/utils/cli/BUILD.cmake @@ -57,6 +57,10 @@ tint_target_add_dependencies(tint_utils_cli lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_utils_cli lib + "src_utils" +) + ################################################################################ # Target: tint_utils_cli_test # Kind: test @@ -82,4 +86,5 @@ tint_target_add_dependencies(tint_utils_cli_test test tint_target_add_external_dependencies(tint_utils_cli_test test "gtest" + "src_utils" ) diff --git a/src/tint/utils/cli/BUILD.gn b/src/tint/utils/cli/BUILD.gn index 9b49d04efbb..4211c421a98 100644 --- a/src/tint/utils/cli/BUILD.gn +++ b/src/tint/utils/cli/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -48,6 +49,7 @@ libtint_source_set("cli") { "cli.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/utils/containers", "${tint_src_dir}/utils/diagnostic", "${tint_src_dir}/utils/ice", @@ -65,6 +67,7 @@ if (tint_build_unittests) { tint_unittests_source_set("unittests") { sources = [ "cli_test.cc" ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/utils/cli", "${tint_src_dir}/utils/containers", diff --git a/src/tint/utils/command/BUILD.gn b/src/tint/utils/command/BUILD.gn index 4f42d68e996..67d6e4cd871 100644 --- a/src/tint/utils/command/BUILD.gn +++ b/src/tint/utils/command/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") diff --git a/src/tint/utils/containers/BUILD.bazel b/src/tint/utils/containers/BUILD.bazel index 07523ce449b..489b70825a7 100644 --- a/src/tint/utils/containers/BUILD.bazel +++ b/src/tint/utils/containers/BUILD.bazel @@ -66,6 +66,7 @@ cc_library( "//src/tint/utils/memory", "//src/tint/utils/rtti", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -113,6 +114,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/utils/containers/BUILD.cmake b/src/tint/utils/containers/BUILD.cmake index c00bd5e4756..e1094f32554 100644 --- a/src/tint/utils/containers/BUILD.cmake +++ b/src/tint/utils/containers/BUILD.cmake @@ -67,6 +67,10 @@ tint_target_add_dependencies(tint_utils_containers lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_utils_containers lib + "src_utils" +) + ################################################################################ # Target: tint_utils_containers_test # Kind: test @@ -115,4 +119,5 @@ tint_target_add_dependencies(tint_utils_containers_test test tint_target_add_external_dependencies(tint_utils_containers_test test "gtest" + "src_utils" ) diff --git a/src/tint/utils/containers/BUILD.gn b/src/tint/utils/containers/BUILD.gn index c1cbce3d0fe..226f8f403d1 100644 --- a/src/tint/utils/containers/BUILD.gn +++ b/src/tint/utils/containers/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -63,6 +64,7 @@ libtint_source_set("containers") { "vector.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/utils/ice", "${tint_src_dir}/utils/macros", "${tint_src_dir}/utils/math", @@ -90,6 +92,7 @@ if (tint_build_unittests) { "vector_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/api/common", "${tint_src_dir}/lang/core", diff --git a/src/tint/utils/debug/BUILD.gn b/src/tint/utils/debug/BUILD.gn index 00401f2125a..d7fcb98287a 100644 --- a/src/tint/utils/debug/BUILD.gn +++ b/src/tint/utils/debug/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") diff --git a/src/tint/utils/diagnostic/BUILD.bazel b/src/tint/utils/diagnostic/BUILD.bazel index 568132ab3ac..76c97153783 100644 --- a/src/tint/utils/diagnostic/BUILD.bazel +++ b/src/tint/utils/diagnostic/BUILD.bazel @@ -57,6 +57,7 @@ cc_library( "//src/tint/utils/rtti", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -80,6 +81,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/utils/diagnostic/BUILD.cmake b/src/tint/utils/diagnostic/BUILD.cmake index c0c2bc69a8a..db14e57f20c 100644 --- a/src/tint/utils/diagnostic/BUILD.cmake +++ b/src/tint/utils/diagnostic/BUILD.cmake @@ -58,6 +58,10 @@ tint_target_add_dependencies(tint_utils_diagnostic lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_utils_diagnostic lib + "src_utils" +) + ################################################################################ # Target: tint_utils_diagnostic_test # Kind: test @@ -82,4 +86,5 @@ tint_target_add_dependencies(tint_utils_diagnostic_test test tint_target_add_external_dependencies(tint_utils_diagnostic_test test "gtest" + "src_utils" ) diff --git a/src/tint/utils/diagnostic/BUILD.gn b/src/tint/utils/diagnostic/BUILD.gn index ccb25943c37..3be06fd66dd 100644 --- a/src/tint/utils/diagnostic/BUILD.gn +++ b/src/tint/utils/diagnostic/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -52,6 +53,7 @@ libtint_source_set("diagnostic") { "source.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/utils/containers", "${tint_src_dir}/utils/ice", "${tint_src_dir}/utils/macros", @@ -70,6 +72,7 @@ if (tint_build_unittests) { "source_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/utils/containers", "${tint_src_dir}/utils/diagnostic", diff --git a/src/tint/utils/file/BUILD.bazel b/src/tint/utils/file/BUILD.bazel index d74bc23799b..b9a96a4760f 100644 --- a/src/tint/utils/file/BUILD.bazel +++ b/src/tint/utils/file/BUILD.bazel @@ -62,6 +62,7 @@ cc_library( "//src/tint/utils/ice", "//src/tint/utils/macros", "//src/tint/utils/text", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/utils/file/BUILD.cmake b/src/tint/utils/file/BUILD.cmake index 0dc6cb83e64..23265245010 100644 --- a/src/tint/utils/file/BUILD.cmake +++ b/src/tint/utils/file/BUILD.cmake @@ -48,6 +48,10 @@ tint_target_add_dependencies(tint_utils_file lib tint_utils_text ) +tint_target_add_external_dependencies(tint_utils_file lib + "src_utils" +) + if((NOT TINT_BUILD_IS_LINUX) AND (NOT TINT_BUILD_IS_MAC) AND (NOT TINT_BUILD_IS_WIN)) tint_target_add_sources(tint_utils_file lib "utils/file/tmpfile_other.cc" diff --git a/src/tint/utils/file/BUILD.gn b/src/tint/utils/file/BUILD.gn index 62e1cdc3dfe..02b5efa74a0 100644 --- a/src/tint/utils/file/BUILD.gn +++ b/src/tint/utils/file/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -45,6 +46,7 @@ if (tint_build_unittests || tint_build_benchmarks) { libtint_source_set("file") { sources = [ "tmpfile.h" ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/utils/ice", "${tint_src_dir}/utils/macros", "${tint_src_dir}/utils/text", diff --git a/src/tint/utils/generator/BUILD.bazel b/src/tint/utils/generator/BUILD.bazel index 9465052eb01..0773d98e501 100644 --- a/src/tint/utils/generator/BUILD.bazel +++ b/src/tint/utils/generator/BUILD.bazel @@ -54,6 +54,7 @@ cc_library( "//src/tint/utils/rtti", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/utils/generator/BUILD.cmake b/src/tint/utils/generator/BUILD.cmake index 994da1aef47..19ac62a41b1 100644 --- a/src/tint/utils/generator/BUILD.cmake +++ b/src/tint/utils/generator/BUILD.cmake @@ -54,3 +54,7 @@ tint_target_add_dependencies(tint_utils_generator lib tint_utils_text tint_utils_traits ) + +tint_target_add_external_dependencies(tint_utils_generator lib + "src_utils" +) diff --git a/src/tint/utils/generator/BUILD.gn b/src/tint/utils/generator/BUILD.gn index ed5402a07e3..97ea666e3d8 100644 --- a/src/tint/utils/generator/BUILD.gn +++ b/src/tint/utils/generator/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -44,6 +45,7 @@ libtint_source_set("generator") { "text_generator.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/utils/containers", "${tint_src_dir}/utils/diagnostic", "${tint_src_dir}/utils/ice", diff --git a/src/tint/utils/ice/BUILD.bazel b/src/tint/utils/ice/BUILD.bazel index 9b7d8be2a6b..e64afb85273 100644 --- a/src/tint/utils/ice/BUILD.bazel +++ b/src/tint/utils/ice/BUILD.bazel @@ -47,6 +47,7 @@ cc_library( deps = [ "//src/tint/utils/debug", "//src/tint/utils/macros", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -61,6 +62,7 @@ cc_library( "//src/tint/utils/ice", "//src/tint/utils/macros", "@gtest", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/utils/ice/BUILD.cmake b/src/tint/utils/ice/BUILD.cmake index f5c15a14004..dcf955a8529 100644 --- a/src/tint/utils/ice/BUILD.cmake +++ b/src/tint/utils/ice/BUILD.cmake @@ -48,6 +48,10 @@ tint_target_add_dependencies(tint_utils_ice lib tint_utils_macros ) +tint_target_add_external_dependencies(tint_utils_ice lib + "src_utils" +) + ################################################################################ # Target: tint_utils_ice_test # Kind: test @@ -63,4 +67,5 @@ tint_target_add_dependencies(tint_utils_ice_test test tint_target_add_external_dependencies(tint_utils_ice_test test "gtest" + "src_utils" ) diff --git a/src/tint/utils/ice/BUILD.gn b/src/tint/utils/ice/BUILD.gn index 05c3e77c9cd..d487312d1c6 100644 --- a/src/tint/utils/ice/BUILD.gn +++ b/src/tint/utils/ice/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -48,6 +49,7 @@ libtint_source_set("ice") { "ice.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/utils/debug", "${tint_src_dir}/utils/macros", ] @@ -56,6 +58,7 @@ if (tint_build_unittests) { tint_unittests_source_set("unittests") { sources = [ "ice_test.cc" ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/utils/ice", "${tint_src_dir}/utils/macros", diff --git a/src/tint/utils/id/BUILD.bazel b/src/tint/utils/id/BUILD.bazel index b818527c8f1..46996852633 100644 --- a/src/tint/utils/id/BUILD.bazel +++ b/src/tint/utils/id/BUILD.bazel @@ -49,6 +49,7 @@ cc_library( "//src/tint/utils/macros", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/utils/id/BUILD.cmake b/src/tint/utils/id/BUILD.cmake index 12880a34d50..bf1abd5f42c 100644 --- a/src/tint/utils/id/BUILD.cmake +++ b/src/tint/utils/id/BUILD.cmake @@ -49,3 +49,7 @@ tint_target_add_dependencies(tint_utils_id lib tint_utils_text tint_utils_traits ) + +tint_target_add_external_dependencies(tint_utils_id lib + "src_utils" +) diff --git a/src/tint/utils/id/BUILD.gn b/src/tint/utils/id/BUILD.gn index 162f44e8b4a..6ed229d9a4f 100644 --- a/src/tint/utils/id/BUILD.gn +++ b/src/tint/utils/id/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -44,6 +45,7 @@ libtint_source_set("id") { "generation_id.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/utils/ice", "${tint_src_dir}/utils/macros", "${tint_src_dir}/utils/text", diff --git a/src/tint/utils/macros/BUILD.bazel b/src/tint/utils/macros/BUILD.bazel index d4a443b60c8..da2a1fa7f75 100644 --- a/src/tint/utils/macros/BUILD.bazel +++ b/src/tint/utils/macros/BUILD.bazel @@ -50,6 +50,7 @@ cc_library( "static_init.h", ], deps = [ + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/utils/macros/BUILD.cmake b/src/tint/utils/macros/BUILD.cmake index c1527a5e095..06d22052e94 100644 --- a/src/tint/utils/macros/BUILD.cmake +++ b/src/tint/utils/macros/BUILD.cmake @@ -48,6 +48,10 @@ tint_add_target(tint_utils_macros lib utils/macros/static_init.h ) +tint_target_add_external_dependencies(tint_utils_macros lib + "src_utils" +) + ################################################################################ # Target: tint_utils_macros_test # Kind: test diff --git a/src/tint/utils/macros/BUILD.gn b/src/tint/utils/macros/BUILD.gn index e656c36c716..cffac0f07f9 100644 --- a/src/tint/utils/macros/BUILD.gn +++ b/src/tint/utils/macros/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -52,7 +53,7 @@ libtint_source_set("macros") { "scoped_assignment.h", "static_init.h", ] - deps = [] + deps = [ "${dawn_root}/src/utils:utils" ] } if (tint_build_unittests) { tint_unittests_source_set("unittests") { diff --git a/src/tint/utils/macros/compiler.h b/src/tint/utils/macros/compiler.h index 6a2c81840dc..b32f2a0ecb1 100644 --- a/src/tint/utils/macros/compiler.h +++ b/src/tint/utils/macros/compiler.h @@ -26,18 +26,13 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "src/tint/utils/macros/concat.h" +#include "src/utils/compiler.h" #ifndef SRC_TINT_UTILS_MACROS_COMPILER_H_ #define SRC_TINT_UTILS_MACROS_COMPILER_H_ #define TINT_REQUIRE_SEMICOLON static_assert(true) -#if defined(__has_attribute) -#define TINT_HAS_ATTRIBUTE(x) __has_attribute(x) -#else -#define TINT_HAS_ATTRIBUTE(x) 0 -#endif - #if TINT_HAS_ATTRIBUTE(no_sanitize) #define TINT_NO_SANITIZE(instrumentation) __attribute__((no_sanitize(instrumentation))) #else diff --git a/src/tint/utils/math/BUILD.bazel b/src/tint/utils/math/BUILD.bazel index 33a099c608f..e72ad6b20cf 100644 --- a/src/tint/utils/math/BUILD.bazel +++ b/src/tint/utils/math/BUILD.bazel @@ -68,6 +68,7 @@ cc_library( "//src/tint/utils/rtti", "//src/tint/utils/traits", "@gtest", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/utils/math/BUILD.cmake b/src/tint/utils/math/BUILD.cmake index d6bf13cd58e..cc70159ad0a 100644 --- a/src/tint/utils/math/BUILD.cmake +++ b/src/tint/utils/math/BUILD.cmake @@ -67,4 +67,5 @@ tint_target_add_dependencies(tint_utils_math_test test tint_target_add_external_dependencies(tint_utils_math_test test "gtest" + "src_utils" ) diff --git a/src/tint/utils/math/BUILD.gn b/src/tint/utils/math/BUILD.gn index 94a722c842e..7b4feee158a 100644 --- a/src/tint/utils/math/BUILD.gn +++ b/src/tint/utils/math/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -59,6 +60,7 @@ if (tint_build_unittests) { "math_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/utils/containers", "${tint_src_dir}/utils/ice", diff --git a/src/tint/utils/memory/BUILD.bazel b/src/tint/utils/memory/BUILD.bazel index 6cb1b678cd1..be209decf79 100644 --- a/src/tint/utils/memory/BUILD.bazel +++ b/src/tint/utils/memory/BUILD.bazel @@ -50,6 +50,7 @@ cc_library( deps = [ "//src/tint/utils/macros", "//src/tint/utils/math", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -67,6 +68,7 @@ cc_library( "//src/tint/utils/math", "//src/tint/utils/memory", "@gtest", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/utils/memory/BUILD.cmake b/src/tint/utils/memory/BUILD.cmake index 1d690775b30..021881c5e5a 100644 --- a/src/tint/utils/memory/BUILD.cmake +++ b/src/tint/utils/memory/BUILD.cmake @@ -51,6 +51,10 @@ tint_target_add_dependencies(tint_utils_memory lib tint_utils_math ) +tint_target_add_external_dependencies(tint_utils_memory lib + "src_utils" +) + ################################################################################ # Target: tint_utils_memory_test # Kind: test @@ -69,4 +73,5 @@ tint_target_add_dependencies(tint_utils_memory_test test tint_target_add_external_dependencies(tint_utils_memory_test test "gtest" + "src_utils" ) diff --git a/src/tint/utils/memory/BUILD.gn b/src/tint/utils/memory/BUILD.gn index 0ab12e1d302..347b9fc17f5 100644 --- a/src/tint/utils/memory/BUILD.gn +++ b/src/tint/utils/memory/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -51,6 +52,7 @@ libtint_source_set("memory") { "memory.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/utils/macros", "${tint_src_dir}/utils/math", ] @@ -63,6 +65,7 @@ if (tint_build_unittests) { "bump_allocator_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/utils/macros", "${tint_src_dir}/utils/math", diff --git a/src/tint/utils/protos/BUILD.gn b/src/tint/utils/protos/BUILD.gn index 5dfc24cf05a..41f2688e18a 100644 --- a/src/tint/utils/protos/BUILD.gn +++ b/src/tint/utils/protos/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") diff --git a/src/tint/utils/protos/ir/BUILD.gn b/src/tint/utils/protos/ir/BUILD.gn index 2056e07f470..6120bf8ca37 100644 --- a/src/tint/utils/protos/ir/BUILD.gn +++ b/src/tint/utils/protos/ir/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") diff --git a/src/tint/utils/protos/ir_fuzz/BUILD.gn b/src/tint/utils/protos/ir_fuzz/BUILD.gn index 21ac5998c79..644809bf772 100644 --- a/src/tint/utils/protos/ir_fuzz/BUILD.gn +++ b/src/tint/utils/protos/ir_fuzz/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") diff --git a/src/tint/utils/reflection/BUILD.bazel b/src/tint/utils/reflection/BUILD.bazel index a262d245cf4..012c8c3dbc5 100644 --- a/src/tint/utils/reflection/BUILD.bazel +++ b/src/tint/utils/reflection/BUILD.bazel @@ -55,6 +55,7 @@ cc_library( "//src/tint/utils/rtti", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -78,6 +79,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/utils/reflection/BUILD.cmake b/src/tint/utils/reflection/BUILD.cmake index 3071a7c8a75..51a2ef0818d 100644 --- a/src/tint/utils/reflection/BUILD.cmake +++ b/src/tint/utils/reflection/BUILD.cmake @@ -56,6 +56,10 @@ tint_target_add_dependencies(tint_utils_reflection lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_utils_reflection lib + "src_utils" +) + ################################################################################ # Target: tint_utils_reflection_test # Kind: test @@ -80,4 +84,5 @@ tint_target_add_dependencies(tint_utils_reflection_test test tint_target_add_external_dependencies(tint_utils_reflection_test test "gtest" + "src_utils" ) diff --git a/src/tint/utils/reflection/BUILD.gn b/src/tint/utils/reflection/BUILD.gn index f363dc688d1..f1c86caeab0 100644 --- a/src/tint/utils/reflection/BUILD.gn +++ b/src/tint/utils/reflection/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -48,6 +49,7 @@ libtint_source_set("reflection") { "reflection.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/utils/containers", "${tint_src_dir}/utils/diagnostic", "${tint_src_dir}/utils/ice", @@ -64,6 +66,7 @@ if (tint_build_unittests) { tint_unittests_source_set("unittests") { sources = [ "reflection_test.cc" ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/utils/containers", "${tint_src_dir}/utils/diagnostic", diff --git a/src/tint/utils/result/BUILD.bazel b/src/tint/utils/result/BUILD.bazel index 4266f7acb3b..c9988f07095 100644 --- a/src/tint/utils/result/BUILD.bazel +++ b/src/tint/utils/result/BUILD.bazel @@ -54,6 +54,7 @@ cc_library( "//src/tint/utils/rtti", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -76,6 +77,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/utils/result/BUILD.cmake b/src/tint/utils/result/BUILD.cmake index 3aaca939fb4..8d76d449af2 100644 --- a/src/tint/utils/result/BUILD.cmake +++ b/src/tint/utils/result/BUILD.cmake @@ -55,6 +55,10 @@ tint_target_add_dependencies(tint_utils_result lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_utils_result lib + "src_utils" +) + ################################################################################ # Target: tint_utils_result_test # Kind: test @@ -78,4 +82,5 @@ tint_target_add_dependencies(tint_utils_result_test test tint_target_add_external_dependencies(tint_utils_result_test test "gtest" + "src_utils" ) diff --git a/src/tint/utils/result/BUILD.gn b/src/tint/utils/result/BUILD.gn index f6ba2382208..c99b1aa9f11 100644 --- a/src/tint/utils/result/BUILD.gn +++ b/src/tint/utils/result/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -48,6 +49,7 @@ libtint_source_set("result") { "result.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/utils/containers", "${tint_src_dir}/utils/diagnostic", "${tint_src_dir}/utils/ice", @@ -63,6 +65,7 @@ if (tint_build_unittests) { tint_unittests_source_set("unittests") { sources = [ "result_test.cc" ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/utils/containers", "${tint_src_dir}/utils/diagnostic", diff --git a/src/tint/utils/rtti/BUILD.bazel b/src/tint/utils/rtti/BUILD.bazel index 56b972cf765..2f326d55e18 100644 --- a/src/tint/utils/rtti/BUILD.bazel +++ b/src/tint/utils/rtti/BUILD.bazel @@ -53,6 +53,7 @@ cc_library( "//src/tint/utils/math", "//src/tint/utils/memory", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -71,6 +72,7 @@ cc_library( "//src/tint/utils/rtti", "//src/tint/utils/traits", "@gtest", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -88,6 +90,7 @@ cc_library( "//src/tint/utils/rtti", "//src/tint/utils/traits", "@benchmark", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/utils/rtti/BUILD.cmake b/src/tint/utils/rtti/BUILD.cmake index 72e54907338..48253b24c43 100644 --- a/src/tint/utils/rtti/BUILD.cmake +++ b/src/tint/utils/rtti/BUILD.cmake @@ -54,6 +54,10 @@ tint_target_add_dependencies(tint_utils_rtti lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_utils_rtti lib + "src_utils" +) + ################################################################################ # Target: tint_utils_rtti_test # Kind: test @@ -73,6 +77,7 @@ tint_target_add_dependencies(tint_utils_rtti_test test tint_target_add_external_dependencies(tint_utils_rtti_test test "gtest" + "src_utils" ) ################################################################################ @@ -93,4 +98,5 @@ tint_target_add_dependencies(tint_utils_rtti_bench bench tint_target_add_external_dependencies(tint_utils_rtti_bench bench "google-benchmark" + "src_utils" ) diff --git a/src/tint/utils/rtti/BUILD.gn b/src/tint/utils/rtti/BUILD.gn index 5f88e8431b6..590125ab2af 100644 --- a/src/tint/utils/rtti/BUILD.gn +++ b/src/tint/utils/rtti/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -51,6 +52,7 @@ libtint_source_set("rtti") { "switch.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/utils/ice", "${tint_src_dir}/utils/macros", "${tint_src_dir}/utils/math", @@ -65,6 +67,7 @@ if (tint_build_unittests) { "switch_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/utils/macros", "${tint_src_dir}/utils/math", @@ -78,6 +81,7 @@ if (tint_build_benchmarks) { tint_benchmarks_source_set("bench") { sources = [ "switch_bench.cc" ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:google_benchmark", "${tint_src_dir}/utils/macros", "${tint_src_dir}/utils/math", diff --git a/src/tint/utils/socket/BUILD.bazel b/src/tint/utils/socket/BUILD.bazel index c2365319a10..41e3e43f9bf 100644 --- a/src/tint/utils/socket/BUILD.bazel +++ b/src/tint/utils/socket/BUILD.bazel @@ -47,6 +47,7 @@ cc_library( ], deps = [ "//src/tint/utils/macros", + "//src/utils", ] + select({ ":tint_build_is_win": [ diff --git a/src/tint/utils/socket/BUILD.cmake b/src/tint/utils/socket/BUILD.cmake index 6c69f4c3bc6..78e2460f8e3 100644 --- a/src/tint/utils/socket/BUILD.cmake +++ b/src/tint/utils/socket/BUILD.cmake @@ -48,6 +48,10 @@ tint_target_add_dependencies(tint_utils_socket lib tint_utils_macros ) +tint_target_add_external_dependencies(tint_utils_socket lib + "src_utils" +) + if(TINT_BUILD_IS_WIN) tint_target_add_external_dependencies(tint_utils_socket lib "winsock" diff --git a/src/tint/utils/socket/BUILD.gn b/src/tint/utils/socket/BUILD.gn index 746a415f836..a9cc0236563 100644 --- a/src/tint/utils/socket/BUILD.gn +++ b/src/tint/utils/socket/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -44,7 +45,10 @@ libtint_source_set("socket") { "socket.cc", "socket.h", ] - deps = [ "${tint_src_dir}/utils/macros" ] + deps = [ + "${dawn_root}/src/utils:utils", + "${tint_src_dir}/utils/macros", + ] if (tint_build_is_win) { deps += [ "${tint_src_dir}:winsock" ] diff --git a/src/tint/utils/strconv/BUILD.bazel b/src/tint/utils/strconv/BUILD.bazel index 0d1102ab42b..186fa60febd 100644 --- a/src/tint/utils/strconv/BUILD.bazel +++ b/src/tint/utils/strconv/BUILD.bazel @@ -58,6 +58,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@abseil_cpp//absl/strings", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/utils/strconv/BUILD.cmake b/src/tint/utils/strconv/BUILD.cmake index 38db12bfc97..943f7beba7c 100644 --- a/src/tint/utils/strconv/BUILD.cmake +++ b/src/tint/utils/strconv/BUILD.cmake @@ -60,6 +60,7 @@ tint_target_add_dependencies(tint_utils_strconv lib tint_target_add_external_dependencies(tint_utils_strconv lib "abseil" + "src_utils" ) ################################################################################ diff --git a/src/tint/utils/strconv/BUILD.gn b/src/tint/utils/strconv/BUILD.gn index d0977eb16de..a7ba3cffb67 100644 --- a/src/tint/utils/strconv/BUILD.gn +++ b/src/tint/utils/strconv/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -50,6 +51,7 @@ libtint_source_set("strconv") { "parse_num.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:abseil", "${tint_src_dir}/utils/containers", "${tint_src_dir}/utils/diagnostic", diff --git a/src/tint/utils/symbol/BUILD.bazel b/src/tint/utils/symbol/BUILD.bazel index aceeeba0899..d72076807ac 100644 --- a/src/tint/utils/symbol/BUILD.bazel +++ b/src/tint/utils/symbol/BUILD.bazel @@ -56,6 +56,7 @@ cc_library( "//src/tint/utils/rtti", "//src/tint/utils/text", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -79,6 +80,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/utils/symbol/BUILD.cmake b/src/tint/utils/symbol/BUILD.cmake index 08d283f5674..e5eadcf853b 100644 --- a/src/tint/utils/symbol/BUILD.cmake +++ b/src/tint/utils/symbol/BUILD.cmake @@ -57,6 +57,10 @@ tint_target_add_dependencies(tint_utils_symbol lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_utils_symbol lib + "src_utils" +) + ################################################################################ # Target: tint_utils_symbol_test # Kind: test @@ -81,4 +85,5 @@ tint_target_add_dependencies(tint_utils_symbol_test test tint_target_add_external_dependencies(tint_utils_symbol_test test "gtest" + "src_utils" ) diff --git a/src/tint/utils/symbol/BUILD.gn b/src/tint/utils/symbol/BUILD.gn index 68cb101bf7e..dae3f1fccb2 100644 --- a/src/tint/utils/symbol/BUILD.gn +++ b/src/tint/utils/symbol/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -50,6 +51,7 @@ libtint_source_set("symbol") { "symbol_table.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/utils/containers", "${tint_src_dir}/utils/ice", "${tint_src_dir}/utils/id", @@ -68,6 +70,7 @@ if (tint_build_unittests) { "symbol_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/utils/containers", "${tint_src_dir}/utils/ice", diff --git a/src/tint/utils/system/BUILD.bazel b/src/tint/utils/system/BUILD.bazel index 4c739e39aa8..75861b6d734 100644 --- a/src/tint/utils/system/BUILD.bazel +++ b/src/tint/utils/system/BUILD.bazel @@ -73,6 +73,7 @@ cc_library( "//src/tint/utils/memory", "//src/tint/utils/rtti", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/utils/system/BUILD.cmake b/src/tint/utils/system/BUILD.cmake index f9b377f9026..62570e00912 100644 --- a/src/tint/utils/system/BUILD.cmake +++ b/src/tint/utils/system/BUILD.cmake @@ -53,6 +53,10 @@ tint_target_add_dependencies(tint_utils_system lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_utils_system lib + "src_utils" +) + if((NOT TINT_BUILD_IS_LINUX) AND (NOT TINT_BUILD_IS_MAC) AND (NOT TINT_BUILD_IS_WIN)) tint_target_add_sources(tint_utils_system lib "utils/system/terminal_other.cc" diff --git a/src/tint/utils/system/BUILD.gn b/src/tint/utils/system/BUILD.gn index 285aa06a908..19a3f5f744c 100644 --- a/src/tint/utils/system/BUILD.gn +++ b/src/tint/utils/system/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -44,6 +45,7 @@ libtint_source_set("system") { "terminal.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/utils/containers", "${tint_src_dir}/utils/ice", "${tint_src_dir}/utils/macros", diff --git a/src/tint/utils/text/BUILD.bazel b/src/tint/utils/text/BUILD.bazel index 33e241b8765..acf689cad2c 100644 --- a/src/tint/utils/text/BUILD.bazel +++ b/src/tint/utils/text/BUILD.bazel @@ -84,6 +84,7 @@ cc_library( "//src/tint/utils/rtti", "//src/tint/utils/system", "//src/tint/utils/traits", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], @@ -109,6 +110,7 @@ cc_library( "//src/tint/utils/text", "//src/tint/utils/traits", "@gtest", + "//src/utils", ], copts = COPTS, visibility = ["//visibility:public"], diff --git a/src/tint/utils/text/BUILD.cmake b/src/tint/utils/text/BUILD.cmake index 438335665af..28db9302a36 100644 --- a/src/tint/utils/text/BUILD.cmake +++ b/src/tint/utils/text/BUILD.cmake @@ -70,6 +70,10 @@ tint_target_add_dependencies(tint_utils_text lib tint_utils_traits ) +tint_target_add_external_dependencies(tint_utils_text lib + "src_utils" +) + if((NOT TINT_BUILD_IS_LINUX) AND (NOT TINT_BUILD_IS_MAC) AND (NOT TINT_BUILD_IS_WIN)) tint_target_add_sources(tint_utils_text lib "utils/text/styled_text_printer_other.cc" @@ -114,4 +118,5 @@ tint_target_add_dependencies(tint_utils_text_test test tint_target_add_external_dependencies(tint_utils_text_test test "gtest" + "src_utils" ) diff --git a/src/tint/utils/text/BUILD.gn b/src/tint/utils/text/BUILD.gn index f522561ae44..a8883e4e750 100644 --- a/src/tint/utils/text/BUILD.gn +++ b/src/tint/utils/text/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -64,6 +65,7 @@ libtint_source_set("text") { "unicode.h", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}/utils/containers", "${tint_src_dir}/utils/ice", "${tint_src_dir}/utils/macros", @@ -97,6 +99,7 @@ if (tint_build_unittests) { "unicode_test.cc", ] deps = [ + "${dawn_root}/src/utils:utils", "${tint_src_dir}:gmock_and_gtest", "${tint_src_dir}/utils/containers", "${tint_src_dir}/utils/ice", diff --git a/src/tint/utils/traits/BUILD.gn b/src/tint/utils/traits/BUILD.gn index 20faff32201..505fd615b64 100644 --- a/src/tint/utils/traits/BUILD.gn +++ b/src/tint/utils/traits/BUILD.gn @@ -34,6 +34,7 @@ # Do not modify this file directly ################################################################################ +import("../../../../scripts/dawn_overrides_with_defaults.gni") import("../../../../scripts/tint_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") diff --git a/src/utils/BUILD.bazel b/src/utils/BUILD.bazel new file mode 100644 index 00000000000..23139e05b1d --- /dev/null +++ b/src/utils/BUILD.bazel @@ -0,0 +1,41 @@ +# Copyright 2023 The Dawn & Tint Authors +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# 3. Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +load("//src/tint:flags.bzl", "COPTS") + +cc_library( + name = "utils", + hdrs = [ + "compiler.h", + ], + srcs = [ + "placeholder.cc", + ], + deps = [], + copts = COPTS, + visibility = ["//visibility:public"], +) diff --git a/src/utils/BUILD.gn b/src/utils/BUILD.gn new file mode 100644 index 00000000000..8ed9784fab6 --- /dev/null +++ b/src/utils/BUILD.gn @@ -0,0 +1,45 @@ +# Copyright 2024 The Dawn & Tint Authors +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# 3. Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +############################################################################### +# Utils library +############################################################################### + +import("../../scripts/dawn_overrides_with_defaults.gni") + +config("internal_config") { + include_dirs = [ "${dawn_root}" ] +} + +static_library("utils") { + sources = [ + "compiler.h", + "placeholder.cc", + ] + + public_configs = [ ":internal_config" ] +} diff --git a/src/utils/CMakeLists.txt b/src/utils/CMakeLists.txt new file mode 100644 index 00000000000..5e177b46179 --- /dev/null +++ b/src/utils/CMakeLists.txt @@ -0,0 +1,47 @@ +# Copyright 2024 The Dawn & Tint Authors +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# 3. Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +set(private_headers + "compiler.h" +) + +set(sources + "placeholder.cc" +) + +set(conditional_private_depends) + +dawn_add_library( + dawn_shared_utils + ENABLE_EMSCRIPTEN + HEADER_ONLY + UTILITY_TARGET dawn_internal_config + HEADERS + ${private_headers} + SOURCES + ${sources} +) diff --git a/src/utils/OWNERS b/src/utils/OWNERS new file mode 100644 index 00000000000..766065953b7 --- /dev/null +++ b/src/utils/OWNERS @@ -0,0 +1,3 @@ +cwallez@chromium.org +dsinclair@chromium.org +jrprice@google.com diff --git a/src/utils/compiler.h b/src/utils/compiler.h new file mode 100644 index 00000000000..6229552bcdc --- /dev/null +++ b/src/utils/compiler.h @@ -0,0 +1,56 @@ +// Copyright 2024 The Dawn & Tint Authors +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// 1. Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// 3. Neither the name of the copyright holder nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#ifndef SRC_UTILS_COMPILER_H_ +#define SRC_UTILS_COMPILER_H_ + +#if defined(__has_attribute) +#define TINT_HAS_ATTRIBUTE(x) __has_attribute(x) +#else +#define TINT_HAS_ATTRIBUTE(x) 0 +#endif + +// DAWN_HAS_ATTRIBUTE +// +// A wrapper around `__has_attribute`. This test whether its operand is recognized by the compiler. +#if defined(__has_attribute) +#define DAWN_HAS_ATTRIBUTE(x) __has_attribute(x) +#else +#define DAWN_HAS_ATTRIBUTE(x) 0 +#endif + +// DAWN_HAS_CPP_ATTRIBUTE +// +// A wrapper around `__has_cpp_attribute`. This test whether its operand is recognized by the +// compiler. +#if defined(__has_cpp_attribute) +#define DAWN_HAS_CPP_ATTRIBUTE(x) __has_cpp_attribute(x) +#else +#define DAWN_HAS_CPP_ATTRIBUTE(x) 0 +#endif + +#endif // SRC_UTILS_COMPILER_H_ diff --git a/src/utils/placeholder.cc b/src/utils/placeholder.cc new file mode 100644 index 00000000000..05a68bd2384 --- /dev/null +++ b/src/utils/placeholder.cc @@ -0,0 +1,33 @@ +// Copyright 2024 The Dawn & Tint Authors +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// 1. Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// 3. Neither the name of the copyright holder nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wmissing-variable-declarations" +#endif + +// A placeholder symbol used to emit a symbol for this lib target. +int src_utils_symbol = 1; diff --git a/tools/src/cmd/gen/build/BUILD.bazel.tmpl b/tools/src/cmd/gen/build/BUILD.bazel.tmpl index 939ec4c3d4b..eef7d5160c7 100644 --- a/tools/src/cmd/gen/build/BUILD.bazel.tmpl +++ b/tools/src/cmd/gen/build/BUILD.bazel.tmpl @@ -157,6 +157,7 @@ cc_binary( {{- else if eq $.Name "spirv-tools" -}}"@spirv_tools", {{- else if eq $.Name "thread" -}}{{/* unsupported */}} {{- else if eq $.Name "winsock" -}}{{/* unsupported */}} +{{- else if eq $.Name "src_utils" -}}"//src/utils", {{- else -}}{{Error (printf "unhandled external dependency '%v'" $.Name)}} {{- end}} {{- end}} diff --git a/tools/src/cmd/gen/build/BUILD.gn.tmpl b/tools/src/cmd/gen/build/BUILD.gn.tmpl index df7c41b2845..940c9a8adb3 100644 --- a/tools/src/cmd/gen/build/BUILD.gn.tmpl +++ b/tools/src/cmd/gen/build/BUILD.gn.tmpl @@ -1,5 +1,6 @@ import("{{Repeat "../" .Depth}}../../../scripts/tint_overrides_with_defaults.gni") +import("{{Repeat "../" .Depth}}../../../scripts/dawn_overrides_with_defaults.gni") import("${tint_src_dir}/tint.gni") @@ -181,6 +182,7 @@ tint_fuzzer_test("{{$.Directory.Name}}") { {{- else if eq $.Name "spirv-tools" -}}"${tint_spirv_tools_dir}:spvtools_headers", "${tint_spirv_tools_dir}:spvtools_val", {{- else if eq $.Name "thread" -}}"${tint_src_dir}:thread", {{- else if eq $.Name "winsock" -}}"${tint_src_dir}:winsock", +{{- else if eq $.Name "src_utils" -}}"${dawn_root}/src/utils:utils", {{- else -}}{{Error (printf "unhandled external dependency '%v'" $.Name)}} {{- end}} {{- end}}