diff --git a/BUILD.gn b/BUILD.gn index 133dca06776..4084b3a182a 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -15,35 +15,52 @@ import("scripts/dawn_overrides_with_defaults.gni") import("scripts/tint_overrides_with_defaults.gni") +group("benchmarks") { + testonly = true + deps = [ "src/tint:benchmarks" ] +} + group("fuzzers") { testonly = true deps = [ "src/dawn/fuzzers", - "src/tint/cmd/fuzz/wgsl", - "src/tint/fuzzers", + "src/tint:fuzzers", + ] +} + +group("libs") { + deps = [ + "src/dawn/native:webgpu_dawn", + "src/tint:libs", + ] +} + +group("tests") { + testonly = true + deps = [ + "src/dawn/tests", + "src/tint:tests", + ] +} + +group("cmds") { + deps = [ + "src/dawn/samples", + "src/tint:cmds", ] } group("all") { testonly = true deps = [ + ":benchmarks", ":fuzzers", - "src/dawn/native:webgpu_dawn", - "src/dawn/tests", - "src/tint/api", + ":libs", + ":tests", ] - if (tint_build_unittests) { - deps += [ "src/tint/cmd/test:test_cmd" ] - } - if (tint_build_benchmarks) { - deps += [ "src/tint/cmd/bench:bench_cmd" ] - } + if (dawn_standalone) { - deps += [ - "src/dawn/samples", - "src/tint/cmd/remote_compile", - "src/tint/cmd/tint", - ] + deps += [ ":cmds" ] } } diff --git a/src/tint/BUILD.gn b/src/tint/BUILD.gn index ddc2a7960a1..8842398d5b7 100644 --- a/src/tint/BUILD.gn +++ b/src/tint/BUILD.gn @@ -233,11 +233,50 @@ if (tint_has_fuzzers) { } ############################################################################### -# Aliases +# Groups ############################################################################### -if (tint_build_unittests) { - group("tint_unittests") { - testonly = true - public_deps = [ "${tint_src_dir}/cmd/test:test_cmd" ] +group("libs") { + deps = [ "${tint_src_dir}/api" ] +} + +group("cmds") { + deps = [ "${tint_src_dir}/cmd/tint" ] + if (dawn_standalone) { + deps += [ "${tint_src_dir}/cmd/remote_compile" ] + } +} + +group("fuzzers") { + testonly = true + deps = [] + if (tint_has_fuzzers) { + deps += [ + "${tint_src_dir}/cmd/fuzz/wgsl", + "${tint_src_dir}/fuzzers", + ] + } +} + +group("tests") { + testonly = true + deps = [] + if (tint_build_unittests) { + deps += [ "${tint_src_dir}/cmd/test:test_cmd" ] + } +} + +group("benchmarks") { + testonly = true + deps = [] + if (tint_build_benchmarks) { + deps += [ "${tint_src_dir}/cmd/bench:bench_cmd" ] } } + +############################################################################### +# Aliases +############################################################################### +group("tint_unittests") { + testonly = true + public_deps = [ ":tests" ] +} diff --git a/src/tint/cmd/fuzz/wgsl/BUILD.cfg b/src/tint/cmd/fuzz/wgsl/BUILD.cfg new file mode 100644 index 00000000000..79222262a78 --- /dev/null +++ b/src/tint/cmd/fuzz/wgsl/BUILD.cfg @@ -0,0 +1,11 @@ +{ + "fuzz_cmd": { + /* The Tint fuzzer executable for WGSL-input. */ + "OutputName": "tint_wgsl_fuzzer", + "AdditionalDependencies": { + /* Depend on all the fuzz targets to pull them all together. */ + "Internal": [ "**:fuzz" ] + } + } +} + diff --git a/src/tint/cmd/fuzz/wgsl/BUILD.cmake b/src/tint/cmd/fuzz/wgsl/BUILD.cmake index e8c2f84e546..2ac0bd48f85 100644 --- a/src/tint/cmd/fuzz/wgsl/BUILD.cmake +++ b/src/tint/cmd/fuzz/wgsl/BUILD.cmake @@ -52,6 +52,8 @@ tint_target_add_dependencies(tint_cmd_fuzz_wgsl_fuzz_cmd fuzz_cmd tint_utils_traits ) +tint_target_set_output_name(tint_cmd_fuzz_wgsl_fuzz_cmd fuzz_cmd "tint_wgsl_fuzzer") + ################################################################################ # Target: tint_cmd_fuzz_wgsl_fuzz # Kind: fuzz diff --git a/src/tint/cmd/fuzz/wgsl/BUILD.gn b/src/tint/cmd/fuzz/wgsl/BUILD.gn index 69db37483bd..16730ddc556 100644 --- a/src/tint/cmd/fuzz/wgsl/BUILD.gn +++ b/src/tint/cmd/fuzz/wgsl/BUILD.gn @@ -58,6 +58,7 @@ tint_fuzz_source_set("fuzz") { } tint_fuzzer_test("wgsl") { + output_name = "tint_wgsl_fuzzer" sources = [ "main_fuzz.cc" ] deps = [ "${tint_src_dir}/cmd/fuzz/wgsl:fuzz",