Skip to content

Commit

Permalink
cmd headers cleanup
Browse files Browse the repository at this point in the history
This CL removes extraneous headers from the `tint/cmd` files.

Change-Id: I8dd09d38100297c8a3654cbbbed5f6a850770ff4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/203855
Reviewed-by: James Price <[email protected]>
Commit-Queue: dan sinclair <[email protected]>
  • Loading branch information
dj2 authored and Dawn LUCI CQ committed Aug 26, 2024
1 parent 803a9f4 commit b07b920
Show file tree
Hide file tree
Showing 15 changed files with 3 additions and 81 deletions.
1 change: 1 addition & 0 deletions src/tint/cmd/bench/bench.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

#include <utility>

#include "src/tint/cmd/bench/inputs_bench.h"
#include "src/tint/lang/wgsl/reader/reader.h"

namespace tint::bench {
Expand Down
6 changes: 2 additions & 4 deletions src/tint/cmd/bench/bench.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,11 @@

#include <memory>
#include <string>
#include <variant>

#include "benchmark/benchmark.h"
#include "src/tint/cmd/bench/inputs_bench.h"
#include "benchmark/benchmark.h" // IWYU pragma: export
#include "src/tint/cmd/bench/inputs_bench.h" // IWYU pragma: export
#include "src/tint/lang/wgsl/program/program.h"
#include "src/tint/utils/macros/compiler.h"
#include "src/tint/utils/macros/concat.h"
#include "src/tint/utils/result/result.h"

namespace tint::bench {
Expand Down
1 change: 0 additions & 1 deletion src/tint/cmd/bench/main_bench.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
// 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.

#include <iomanip>
#include <iostream>

#include "src/tint/cmd/bench/bench.h"
Expand Down
1 change: 0 additions & 1 deletion src/tint/cmd/common/helper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#endif

#if TINT_BUILD_WGSL_WRITER
#include "src/tint/lang/wgsl/writer/ir_to_program/ir_to_program.h"
#include "src/tint/lang/wgsl/writer/writer.h"
#endif

Expand Down
2 changes: 0 additions & 2 deletions src/tint/cmd/fuzz/ir/as/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include <iostream>
#include <memory>
#include <string>
#include "src/tint/lang/wgsl/sem/variable.h"

#include "src/tint/api/tint.h"
#include "src/tint/cmd/common/helper.h"
Expand All @@ -39,7 +38,6 @@
#include "src/tint/lang/core/ir/validator.h"
#include "src/tint/lang/wgsl/ast/module.h"
#include "src/tint/lang/wgsl/helpers/apply_substitute_overrides.h"
#include "src/tint/lang/wgsl/helpers/flatten_bindings.h"
#include "src/tint/lang/wgsl/reader/reader.h"
#include "src/tint/utils/cli/cli.h"
#include "src/tint/utils/containers/transform.h"
Expand Down
2 changes: 0 additions & 2 deletions src/tint/cmd/fuzz/wgsl/main_fuzz.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,10 @@

#include <iostream>
#include <string>
#include <unordered_map>

#include "src/tint/cmd/fuzz/wgsl/fuzz.h"
#include "src/tint/utils/cli/cli.h"
#include "src/tint/utils/command/command.h"
#include "src/tint/utils/macros/defer.h"
#include "src/tint/utils/text/base64.h"
#include "src/tint/utils/text/string.h"

Expand Down
19 changes: 0 additions & 19 deletions src/tint/cmd/info/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ cc_binary(
"//src/tint/lang/wgsl/inspector",
"//src/tint/lang/wgsl/program",
"//src/tint/lang/wgsl/sem",
"//src/tint/utils/command",
"//src/tint/utils/containers",
"//src/tint/utils/diagnostic",
"//src/tint/utils/ice",
Expand All @@ -73,11 +72,6 @@ cc_binary(
"//src/tint/lang/spirv/reader/common",
],
"//conditions:default": [],
}) + select({
":tint_build_spv_reader_or_tint_build_spv_writer": [
"@spirv_tools",
],
"//conditions:default": [],
}),
copts = COPTS,
visibility = ["//visibility:public"],
Expand All @@ -88,16 +82,3 @@ alias(
actual = "//src/tint:tint_build_spv_reader_true",
)

alias(
name = "tint_build_spv_writer",
actual = "//src/tint:tint_build_spv_writer_true",
)

selects.config_setting_group(
name = "tint_build_spv_reader_or_tint_build_spv_writer",
match_any = [
"tint_build_spv_reader",
"tint_build_spv_writer",
],
)

7 changes: 0 additions & 7 deletions src/tint/cmd/info/BUILD.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ tint_target_add_dependencies(tint_cmd_info_cmd cmd
tint_lang_wgsl_inspector
tint_lang_wgsl_program
tint_lang_wgsl_sem
tint_utils_command
tint_utils_containers
tint_utils_diagnostic
tint_utils_ice
Expand All @@ -77,10 +76,4 @@ if(TINT_BUILD_SPV_READER)
)
endif(TINT_BUILD_SPV_READER)

if(TINT_BUILD_SPV_READER OR TINT_BUILD_SPV_WRITER)
tint_target_add_external_dependencies(tint_cmd_info_cmd cmd
"spirv-tools"
)
endif(TINT_BUILD_SPV_READER OR TINT_BUILD_SPV_WRITER)

tint_target_set_output_name(tint_cmd_info_cmd cmd "tint_info")
8 changes: 0 additions & 8 deletions src/tint/cmd/info/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ tint_executable("info") {
"${tint_src_dir}/lang/wgsl/inspector",
"${tint_src_dir}/lang/wgsl/program",
"${tint_src_dir}/lang/wgsl/sem",
"${tint_src_dir}/utils/command",
"${tint_src_dir}/utils/containers",
"${tint_src_dir}/utils/diagnostic",
"${tint_src_dir}/utils/ice",
Expand All @@ -73,11 +72,4 @@ tint_executable("info") {
if (tint_build_spv_reader) {
deps += [ "${tint_src_dir}/lang/spirv/reader/common" ]
}

if (tint_build_spv_reader || tint_build_spv_writer) {
deps += [
"${tint_spirv_tools_dir}:spvtools_headers",
"${tint_spirv_tools_dir}:spvtools_val",
]
}
}
7 changes: 0 additions & 7 deletions src/tint/cmd/info/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,9 @@

#include "src/tint/utils/text/styled_text_printer.h"

#if TINT_BUILD_SPV_READER
#include "spirv-tools/libspirv.hpp"
#endif // TINT_BUILD_SPV_READER

#include "src/tint/cmd/common/helper.h"
#include "src/tint/lang/core/type/struct.h"
#include "src/tint/lang/wgsl/ast/module.h"
#include "src/tint/lang/wgsl/inspector/entry_point.h"
#include "src/tint/utils/command/command.h"
#include "src/tint/utils/containers/transform.h"
#include "src/tint/utils/text/string.h"

namespace {
Expand Down
1 change: 0 additions & 1 deletion src/tint/cmd/loopy/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@

#include "src/tint/api/tint.h"
#include "src/tint/cmd/common/helper.h"
#include "src/tint/lang/core/ir/module.h"

#if TINT_BUILD_GLSL_WRITER
#include "src/tint/lang/glsl/writer/helpers/generate_bindings.h"
Expand Down
11 changes: 0 additions & 11 deletions src/tint/cmd/tint/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ cc_binary(
"//src/tint/utils/rtti",
"//src/tint/utils/strconv",
"//src/tint/utils/symbol",
"//src/tint/utils/system",
"//src/tint/utils/text",
"//src/tint/utils/traits",
] + select({
Expand All @@ -96,11 +95,6 @@ cc_binary(
"//src/tint/lang/hlsl/writer",
],
"//conditions:default": [],
}) + select({
":tint_build_ir_binary": [
"//src/tint/lang/core/ir/binary",
],
"//conditions:default": [],
}) + select({
":tint_build_msl_writer": [
"//src/tint/lang/msl/validate",
Expand Down Expand Up @@ -157,11 +151,6 @@ alias(
actual = "//src/tint:tint_build_hlsl_writer_true",
)

alias(
name = "tint_build_ir_binary",
actual = "//src/tint:tint_build_ir_binary_true",
)

alias(
name = "tint_build_msl_writer",
actual = "//src/tint:tint_build_msl_writer_true",
Expand Down
7 changes: 0 additions & 7 deletions src/tint/cmd/tint/BUILD.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ tint_target_add_dependencies(tint_cmd_tint_cmd cmd
tint_utils_rtti
tint_utils_strconv
tint_utils_symbol
tint_utils_system
tint_utils_text
tint_utils_traits
)
Expand All @@ -102,12 +101,6 @@ if(TINT_BUILD_HLSL_WRITER)
)
endif(TINT_BUILD_HLSL_WRITER)

if(TINT_BUILD_IR_BINARY)
tint_target_add_dependencies(tint_cmd_tint_cmd cmd
tint_lang_core_ir_binary
)
endif(TINT_BUILD_IR_BINARY)

if(TINT_BUILD_MSL_WRITER)
tint_target_add_dependencies(tint_cmd_tint_cmd cmd
tint_lang_msl_validate
Expand Down
5 changes: 0 additions & 5 deletions src/tint/cmd/tint/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ tint_executable("tint") {
"${tint_src_dir}/utils/rtti",
"${tint_src_dir}/utils/strconv",
"${tint_src_dir}/utils/symbol",
"${tint_src_dir}/utils/system",
"${tint_src_dir}/utils/text",
"${tint_src_dir}/utils/traits",
]
Expand All @@ -99,10 +98,6 @@ tint_executable("tint") {
]
}

if (tint_build_ir_binary) {
deps += [ "${tint_src_dir}/lang/core/ir/binary" ]
}

if (tint_build_msl_writer) {
deps += [
"${tint_src_dir}/lang/msl/validate",
Expand Down
6 changes: 0 additions & 6 deletions src/tint/cmd/tint/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
#include "src/tint/api/tint.h"
#include "src/tint/cmd/common/helper.h"
#include "src/tint/lang/core/ir/disassembler.h"
#include "src/tint/lang/core/ir/module.h"
#include "src/tint/lang/wgsl/ast/module.h"
#include "src/tint/lang/wgsl/ast/transform/first_index_offset.h"
#include "src/tint/lang/wgsl/ast/transform/manager.h"
Expand All @@ -57,21 +56,16 @@
#include "src/tint/utils/containers/transform.h"
#include "src/tint/utils/diagnostic/formatter.h"
#include "src/tint/utils/macros/defer.h"
#include "src/tint/utils/system/env.h"
#include "src/tint/utils/system/terminal.h"
#include "src/tint/utils/text/string.h"
#include "src/tint/utils/text/string_stream.h"
#include "src/tint/utils/text/styled_text.h"
#include "src/tint/utils/text/styled_text_printer.h"
#include "src/tint/utils/text/styled_text_theme.h"

#if TINT_BUILD_WGSL_READER
#include "src/tint/lang/wgsl/reader/program_to_ir/program_to_ir.h"
#include "src/tint/lang/wgsl/reader/reader.h"

#if TINT_BUILD_IR_BINARY
#include "src/tint/lang/core/ir/binary/encode.h"
#include "src/tint/lang/core/ir/validator.h"
#include "src/tint/lang/wgsl/helpers/apply_substitute_overrides.h"
#endif // TINT_BUILD_IR_BINARY

Expand Down

0 comments on commit b07b920

Please sign in to comment.