Split base_src apart.

This CL splits the base_src set in the GN build into a symbols_src and a
utils_src.

Change-Id: I39036a4ba5163aa816233b42d9a2ebfe34ddf038
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/128361
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
dan sinclair 2023-04-21 10:54:13 +00:00 committed by Dawn LUCI CQ
parent 2f845021d8
commit d1d1bf7135
3 changed files with 76 additions and 62 deletions

View File

@ -58,11 +58,11 @@ tint (except for `base` which is a mix of things in `src/tint` and
|------------------------------+
V
+-----------------------------------------+
| Base |
| Symbols |
+-----------------------------------------+
|
V
+-----------------------------------------+ +-------------+
| Text (unicode) | | Initializer |
| Utils | | Initializer |
+-----------------------------------------+ +-------------+
```

View File

@ -131,7 +131,7 @@ source_set("tint_utils_io") {
sources += [ "utils/io/tmpfile_other.cc" ]
}
deps = [ ":libtint_base_src" ]
deps = [ ":libtint_utils_src" ]
}
###############################################################################
@ -147,8 +147,8 @@ source_set("tint_val") {
]
deps = [
":libtint_ast_src",
":libtint_base_src",
":libtint_program_src",
":libtint_utils_src",
":tint_utils_io",
]
}
@ -193,7 +193,23 @@ template("libtint_source_set") {
}
}
libtint_source_set("libtint_base_src") {
libtint_source_set("libtint_symbols_src") {
sources = [
"number.cc",
"number.h",
"program_id.cc",
"program_id.h",
"reflection.h",
"scope_stack.h",
"symbol.cc",
"symbol.h",
"symbol_table.cc",
"symbol_table.h",
]
deps = [ ":libtint_utils_src" ]
}
libtint_source_set("libtint_utils_src") {
sources = [
"debug.cc",
"debug.h",
@ -203,19 +219,9 @@ libtint_source_set("libtint_base_src") {
"diagnostic/formatter.h",
"diagnostic/printer.cc",
"diagnostic/printer.h",
"number.cc",
"number.h",
"program_id.cc",
"program_id.h",
"reflection.h",
"scope_stack.h",
"source.cc",
"source.h",
"switch.h",
"symbol.cc",
"symbol.h",
"symbol_table.cc",
"symbol_table.h",
"utils/bitcast.h",
"utils/bitset.h",
"utils/block_allocator.h",
@ -261,7 +267,10 @@ libtint_source_set("libtint_base_src") {
libtint_source_set("libtint_clone_context_hdrs") {
sources = [ "clone_context.h" ]
deps = [ ":libtint_base_src" ]
deps = [
":libtint_symbols_src",
":libtint_utils_src",
]
}
libtint_source_set("libtint_program_src") {
@ -299,11 +308,12 @@ libtint_source_set("libtint_program_src") {
deps = [
":libtint_ast_hdrs",
":libtint_base_src",
":libtint_builtins_src",
":libtint_constant_src",
":libtint_sem_src",
":libtint_symbols_src",
":libtint_type_src",
":libtint_utils_src",
]
}
@ -324,11 +334,11 @@ libtint_source_set("libtint_inspector_src") {
]
deps = [
":libtint_ast_src",
":libtint_base_src",
":libtint_builtins_src",
":libtint_program_src",
":libtint_sem_src",
":libtint_type_src",
":libtint_utils_src",
]
}
@ -439,11 +449,12 @@ libtint_source_set("libtint_transform_src") {
]
deps = [
":libtint_ast_src",
":libtint_base_src",
":libtint_builtins_src",
":libtint_program_src",
":libtint_sem_src",
":libtint_symbols_src",
":libtint_type_src",
":libtint_utils_src",
]
}
@ -528,10 +539,11 @@ libtint_source_set("libtint_ast_hdrs") {
"ast/workgroup_attribute.h",
]
deps = [
":libtint_base_src",
":libtint_builtins_src",
":libtint_clone_context_hdrs",
":libtint_symbols_src",
":libtint_type_src",
":libtint_utils_src",
]
}
@ -615,10 +627,10 @@ libtint_source_set("libtint_ast_src") {
]
public_deps = [ ":libtint_ast_hdrs" ]
deps = [
":libtint_base_src",
":libtint_builtins_src",
":libtint_program_src",
":libtint_type_src",
":libtint_utils_src",
]
}
@ -696,10 +708,11 @@ libtint_source_set("libtint_sem_src") {
deps = [
":libtint_ast_hdrs",
":libtint_base_src",
":libtint_builtins_src",
":libtint_constant_src",
":libtint_symbols_src",
":libtint_type_src",
":libtint_utils_src",
]
}
@ -730,7 +743,7 @@ libtint_source_set("libtint_builtins_src") {
"builtin/texel_format.cc",
"builtin/texel_format.h",
]
deps = [ ":libtint_base_src" ]
deps = [ ":libtint_utils_src" ]
}
libtint_source_set("libtint_type_src") {
@ -801,8 +814,9 @@ libtint_source_set("libtint_type_src") {
]
deps = [
":libtint_base_src",
":libtint_builtins_src",
":libtint_symbols_src",
":libtint_utils_src",
]
}
@ -821,8 +835,9 @@ libtint_source_set("libtint_constant_src") {
"constant/value.h",
]
deps = [
":libtint_base_src",
":libtint_symbols_src",
":libtint_type_src",
":libtint_utils_src",
]
}
@ -864,12 +879,13 @@ libtint_source_set("libtint_spv_reader_src") {
deps = [
":libtint_ast_src",
":libtint_base_src",
":libtint_builtins_src",
":libtint_program_src",
":libtint_reader_src",
":libtint_sem_src",
":libtint_symbols_src",
":libtint_type_src",
":libtint_utils_src",
"${tint_spirv_tools_dir}/:spvtools_opt",
]
@ -903,13 +919,13 @@ libtint_source_set("libtint_writer_src") {
deps = [
":libtint_ast_src",
":libtint_base_src",
":libtint_builtins_src",
":libtint_inspector_src",
":libtint_program_src",
":libtint_sem_src",
":libtint_transform_src",
":libtint_type_src",
":libtint_utils_src",
]
}
@ -934,13 +950,14 @@ libtint_source_set("libtint_spv_writer_src") {
deps = [
":libtint_ast_src",
":libtint_base_src",
":libtint_builtins_src",
":libtint_constant_src",
":libtint_program_src",
":libtint_sem_src",
":libtint_symbols_src",
":libtint_transform_src",
":libtint_type_src",
":libtint_utils_src",
":libtint_writer_src",
]
}
@ -963,11 +980,12 @@ libtint_source_set("libtint_wgsl_reader_src") {
deps = [
":abseil",
":libtint_ast_src",
":libtint_base_src",
":libtint_builtins_src",
":libtint_program_src",
":libtint_reader_src",
":libtint_symbols_src",
":libtint_type_src",
":libtint_utils_src",
]
}
@ -981,11 +999,11 @@ libtint_source_set("libtint_wgsl_writer_src") {
deps = [
":libtint_ast_src",
":libtint_base_src",
":libtint_builtins_src",
":libtint_program_src",
":libtint_sem_src",
":libtint_type_src",
":libtint_utils_src",
":libtint_writer_src",
]
}
@ -1000,13 +1018,14 @@ libtint_source_set("libtint_msl_writer_src") {
deps = [
":libtint_ast_src",
":libtint_base_src",
":libtint_builtins_src",
":libtint_constant_src",
":libtint_program_src",
":libtint_sem_src",
":libtint_symbols_src",
":libtint_transform_src",
":libtint_type_src",
":libtint_utils_src",
":libtint_writer_src",
]
}
@ -1021,13 +1040,14 @@ libtint_source_set("libtint_hlsl_writer_src") {
deps = [
":libtint_ast_src",
":libtint_base_src",
":libtint_builtins_src",
":libtint_constant_src",
":libtint_program_src",
":libtint_sem_src",
":libtint_symbols_src",
":libtint_transform_src",
":libtint_type_src",
":libtint_utils_src",
":libtint_writer_src",
]
}
@ -1042,13 +1062,14 @@ libtint_source_set("libtint_glsl_writer_src") {
deps = [
":libtint_ast_src",
":libtint_base_src",
":libtint_builtins_src",
":libtint_constant_src",
":libtint_program_src",
":libtint_sem_src",
":libtint_symbols_src",
":libtint_transform_src",
":libtint_type_src",
":libtint_utils_src",
":libtint_writer_src",
]
}
@ -1063,11 +1084,11 @@ libtint_source_set("libtint_syntax_tree_writer_src") {
deps = [
":libtint_ast_src",
":libtint_base_src",
":libtint_builtins_src",
":libtint_program_src",
":libtint_sem_src",
":libtint_type_src",
":libtint_utils_src",
":libtint_writer_src",
]
}
@ -1075,14 +1096,15 @@ libtint_source_set("libtint_syntax_tree_writer_src") {
source_set("libtint") {
public_deps = [
":libtint_ast_src",
":libtint_base_src",
":libtint_constant_src",
":libtint_initializer_src",
":libtint_inspector_src",
":libtint_program_src",
":libtint_sem_src",
":libtint_symbols_src",
":libtint_transform_src",
":libtint_type_src",
":libtint_utils_src",
":libtint_writer_src",
]
@ -1263,10 +1285,7 @@ if (tint_build_unittests) {
"ast/test_helper.h",
"ast/test_helper_test.cc",
]
deps = [
":libtint_ast_src",
":libtint_base_src",
]
deps = [ ":libtint_ast_src" ]
}
tint_unittests_source_set("tint_unittests_ast_src") {
@ -1332,10 +1351,10 @@ if (tint_build_unittests) {
]
deps = [
":libtint_ast_src",
":libtint_base_src",
":libtint_builtins_src",
":libtint_transform_src",
":libtint_unittests_ast_helper",
":libtint_utils_src",
]
if (tint_build_wgsl_reader && tint_build_wgsl_writer) {
@ -1367,7 +1386,6 @@ if (tint_build_unittests) {
"diagnostic/formatter_test.cc",
"diagnostic/printer_test.cc",
]
deps = [ ":libtint_base_src" ]
}
tint_unittests_source_set("tint_unittests_inspector_src") {
@ -1449,9 +1467,9 @@ if (tint_build_unittests) {
"resolver/variable_validation_test.cc",
]
deps = [
":libtint_base_src",
":libtint_builtins_src",
":libtint_transform_src",
":libtint_utils_src",
":tint_unittests_ast_src",
]
}
@ -1497,10 +1515,7 @@ if (tint_build_unittests) {
"type/u32_test.cc",
"type/vector_test.cc",
]
deps = [
":libtint_base_src",
":libtint_builtins_src",
]
deps = [ ":libtint_builtins_src" ]
}
tint_unittests_source_set("tint_unittests_transform_src") {
@ -1562,10 +1577,10 @@ if (tint_build_unittests) {
]
deps = [
":libtint_base_src",
":libtint_builtins_src",
":libtint_transform_src",
":libtint_unittests_ast_helper",
":libtint_utils_src",
":libtint_wgsl_reader_src",
":libtint_wgsl_writer_src",
]
@ -1573,6 +1588,9 @@ if (tint_build_unittests) {
tint_unittests_source_set("tint_unittests_utils_src") {
sources = [
"debug_test.cc",
"source_test.cc",
"switch_test.cc",
"utils/bitcast_test.cc",
"utils/bitset_test.cc",
"utils/block_allocator_test.cc",
@ -1601,7 +1619,7 @@ if (tint_build_unittests) {
"utils/unique_vector_test.cc",
"utils/vector_test.cc",
]
deps = [ ":libtint_base_src" ]
deps = [ ":libtint_utils_src" ]
}
tint_unittests_source_set("tint_unittests_writer_src") {
@ -1613,8 +1631,8 @@ if (tint_build_unittests) {
"writer/text_generator_test.cc",
]
deps = [
":libtint_base_src",
":libtint_unittests_ast_helper",
":libtint_utils_src",
":libtint_writer_src",
]
}
@ -1668,7 +1686,6 @@ if (tint_build_unittests) {
]
deps = [
":libtint_base_src",
":libtint_spv_reader_src",
":libtint_wgsl_writer_src",
"${tint_spirv_tools_dir}/:spvtools_opt",
@ -1713,9 +1730,9 @@ if (tint_build_unittests) {
]
deps = [
":libtint_base_src",
":libtint_builtins_src",
":libtint_spv_writer_src",
":libtint_utils_src",
":tint_unittests_ast_src",
"${tint_spirv_tools_dir}/:spvtools",
]
@ -1794,7 +1811,6 @@ if (tint_build_unittests) {
]
deps = [
":libtint_base_src",
":libtint_builtins_src",
":libtint_unittests_ast_helper",
":libtint_wgsl_reader_src",
@ -1838,6 +1854,7 @@ if (tint_build_unittests) {
deps = [
":libtint_builtins_src",
":libtint_utils_src",
":libtint_wgsl_writer_src",
":tint_unittests_ast_src",
]
@ -1879,6 +1896,7 @@ if (tint_build_unittests) {
deps = [
":libtint_msl_writer_src",
":libtint_utils_src",
":tint_unittests_ast_src",
]
}
@ -1921,6 +1939,7 @@ if (tint_build_unittests) {
deps = [
":libtint_hlsl_writer_src",
":libtint_transform_src",
":libtint_utils_src",
":tint_unittests_ast_src",
]
}
@ -1962,25 +1981,23 @@ if (tint_build_unittests) {
]
deps = [
":libtint_base_src",
":libtint_glsl_writer_src",
":libtint_symbols_src",
":libtint_transform_src",
":libtint_utils_src",
":tint_unittests_ast_src",
]
}
tint_unittests_source_set("tint_unittests_base_src") {
tint_unittests_source_set("tint_unittests_symbols_src") {
sources = [
"debug_test.cc",
"number_test.cc",
"reflection_test.cc",
"scope_stack_test.cc",
"source_test.cc",
"switch_test.cc",
"symbol_table_test.cc",
"symbol_test.cc",
]
deps = [ ":libtint_base_src" ]
deps = [ ":libtint_symbols_src" ]
}
tint_unittests_source_set("tint_unittests_core_src") {
@ -1991,7 +2008,6 @@ if (tint_build_unittests) {
]
deps = [
":libtint_base_src",
":libtint_unittests_ast_helper",
":tint_unittests_ast_src",
]
@ -2015,7 +2031,6 @@ if (tint_build_unittests) {
":libtint_wgsl_reader_src",
":libtint_wgsl_writer_src",
":tint_unittests_ast_src",
":tint_unittests_base_src",
":tint_unittests_builtins_src",
":tint_unittests_cmd_src",
":tint_unittests_constant_src",
@ -2024,6 +2039,7 @@ if (tint_build_unittests) {
":tint_unittests_inspector_src",
":tint_unittests_resolver_src",
":tint_unittests_sem_src",
":tint_unittests_symbols_src",
":tint_unittests_transform_src",
":tint_unittests_type_src",
":tint_unittests_utils_src",

View File

@ -34,7 +34,6 @@ executable("tint") {
deps = [
":tint_cmd_helper",
"${tint_root_dir}/src/tint:libtint",
"${tint_root_dir}/src/tint:libtint_base_src",
"${tint_root_dir}/src/tint:tint_utils_io",
"${tint_root_dir}/src/tint:tint_val",
"${tint_spirv_tools_dir}/:spvtools",
@ -65,7 +64,6 @@ executable("tint_info") {
deps = [
":tint_cmd_helper",
"${tint_root_dir}/src/tint:libtint",
"${tint_root_dir}/src/tint:libtint_base_src",
"${tint_root_dir}/src/tint:tint_utils_io",
"${tint_root_dir}/src/tint:tint_val",
"${tint_spirv_tools_dir}/:spvtools",