Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/dawn-ci.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ if (WIN32)
endif ()
set(DAWN_FETCH_DEPENDENCIES ON CACHE BOOL "")
set(DAWN_ENABLE_INSTALL ON CACHE BOOL "")
set(TINT_BUILD_CMD_TOOLS ON CACHE BOOL "")
set(TINT_ENABLE_INSTALL ON CACHE BOOL "")

if (CMAKE_SYTEM_NAME STREQUAL "Linux")
# `sccache` seems effective only on linux.
Expand Down
11 changes: 10 additions & 1 deletion src/tint/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,15 @@ function(tint_fuzz_compile_options TARGET)
set_target_properties(${TARGET} PROPERTIES FOLDER "Fuzzers")
endfunction()

function(tint_cmd_compile_options TARGET)
if (TINT_ENABLE_INSTALL)
install(TARGETS ${TARGET}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
endif()
tint_default_compile_options(${TARGET})
endfunction()

function(tint_test_cmd_compile_options TARGET)
tint_test_compile_options(${TARGET})

Expand Down Expand Up @@ -408,7 +417,7 @@ function(tint_add_target TARGET KIND)
tint_proto_compile_options(${TARGET})
elseif(${KIND} STREQUAL cmd)
add_executable(${TARGET})
tint_default_compile_options(${TARGET})
tint_cmd_compile_options(${TARGET})
elseif(${KIND} STREQUAL test_cmd)
add_executable(${TARGET})
tint_test_cmd_compile_options(${TARGET})
Expand Down
2 changes: 1 addition & 1 deletion src/tint/api/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ cc_library(
"//src/tint/lang/core/constant",
"//src/tint/lang/core/ir",
"//src/tint/lang/core/type",
"//src/tint/lang/hlsl/writer/common",
"//src/tint/lang/wgsl",
"//src/tint/lang/wgsl/ast",
"//src/tint/lang/wgsl/inspector",
Expand All @@ -77,6 +76,7 @@ cc_library(
}) + select({
":tint_build_hlsl_writer": [
"//src/tint/lang/hlsl/writer",
"//src/tint/lang/hlsl/writer/common",
],
"//conditions:default": [],
}) + select({
Expand Down
2 changes: 1 addition & 1 deletion src/tint/api/BUILD.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ tint_target_add_dependencies(tint_api lib
tint_lang_core_constant
tint_lang_core_ir
tint_lang_core_type
tint_lang_hlsl_writer_common
tint_lang_wgsl
tint_lang_wgsl_ast
tint_lang_wgsl_inspector
Expand Down Expand Up @@ -84,6 +83,7 @@ endif(TINT_BUILD_GLSL_WRITER)
if(TINT_BUILD_HLSL_WRITER)
tint_target_add_dependencies(tint_api lib
tint_lang_hlsl_writer
tint_lang_hlsl_writer_common
)
endif(TINT_BUILD_HLSL_WRITER)

Expand Down
4 changes: 2 additions & 2 deletions src/tint/cmd/bench/hlsl/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ cc_library(
"//src/tint/lang/core/constant",
"//src/tint/lang/core/ir",
"//src/tint/lang/core/type",
"//src/tint/lang/hlsl/writer/common",
"//src/tint/lang/hlsl/writer/helpers",
"//src/tint/lang/wgsl",
"//src/tint/lang/wgsl/ast",
"//src/tint/lang/wgsl/program",
Expand All @@ -69,6 +67,8 @@ cc_library(
] + select({
":tint_build_hlsl_writer": [
"//src/tint/lang/hlsl/writer",
"//src/tint/lang/hlsl/writer/common",
"//src/tint/lang/hlsl/writer/helpers",
],
"//conditions:default": [],
}) + select({
Expand Down
4 changes: 2 additions & 2 deletions src/tint/cmd/bench/hlsl/BUILD.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ tint_target_add_dependencies(tint_cmd_bench_hlsl_bench bench
tint_lang_core_constant
tint_lang_core_ir
tint_lang_core_type
tint_lang_hlsl_writer_common
tint_lang_hlsl_writer_helpers
tint_lang_wgsl
tint_lang_wgsl_ast
tint_lang_wgsl_program
Expand All @@ -76,6 +74,8 @@ tint_target_add_external_dependencies(tint_cmd_bench_hlsl_bench bench
if(TINT_BUILD_HLSL_WRITER)
tint_target_add_dependencies(tint_cmd_bench_hlsl_bench bench
tint_lang_hlsl_writer
tint_lang_hlsl_writer_common
tint_lang_hlsl_writer_helpers
)
endif(TINT_BUILD_HLSL_WRITER)

Expand Down
2 changes: 1 addition & 1 deletion src/tint/cmd/fuzz/ir/BUILD.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ tint_target_add_dependencies(tint_cmd_fuzz_ir_fuzz_cmd fuzz_cmd
tint_lang_core_ir
tint_lang_core_ir_transform_fuzz
tint_lang_core_type
tint_lang_hlsl_writer_raise_fuzz
tint_lang_wgsl_program_fuzz
tint_lang_wgsl_writer_raise_fuzz
tint_utils
Expand Down Expand Up @@ -88,6 +87,7 @@ endif(TINT_BUILD_GLSL_WRITER)

if(TINT_BUILD_HLSL_WRITER)
tint_target_add_dependencies(tint_cmd_fuzz_ir_fuzz_cmd fuzz_cmd
tint_lang_hlsl_writer_raise_fuzz
tint_lang_hlsl_writer_fuzz
)
endif(TINT_BUILD_HLSL_WRITER)
Expand Down
2 changes: 1 addition & 1 deletion src/tint/cmd/fuzz/wgsl/BUILD.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ tint_target_add_dependencies(tint_cmd_fuzz_wgsl_fuzz_cmd fuzz_cmd
tint_lang_core_constant
tint_lang_core_ir_transform_fuzz
tint_lang_core_type
tint_lang_hlsl_writer_raise_fuzz
tint_lang_wgsl
tint_lang_wgsl_ast
tint_lang_wgsl_program
Expand Down Expand Up @@ -86,6 +85,7 @@ endif(TINT_BUILD_GLSL_WRITER)
if(TINT_BUILD_HLSL_WRITER)
tint_target_add_dependencies(tint_cmd_fuzz_wgsl_fuzz_cmd fuzz_cmd
tint_lang_hlsl_validate
tint_lang_hlsl_writer_raise_fuzz
tint_lang_hlsl_writer_fuzz
)
tint_target_add_external_dependencies(tint_cmd_fuzz_wgsl_fuzz_cmd fuzz_cmd
Expand Down
4 changes: 2 additions & 2 deletions src/tint/cmd/test/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ cc_binary(
"//src/tint/lang/glsl/ir:test",
"//src/tint/lang/hlsl/ir:test",
"//src/tint/lang/hlsl/type:test",
"//src/tint/lang/hlsl/writer/common:test",
"//src/tint/lang/hlsl/writer/raise:test",
"//src/tint/lang/msl/ir/transform:test",
"//src/tint/lang/msl/ir:test",
"//src/tint/lang/msl/type:test",
Expand Down Expand Up @@ -103,6 +101,8 @@ cc_binary(
}) + select({
":tint_build_hlsl_writer": [
"//src/tint/lang/hlsl/writer/ast_printer:test",
"//src/tint/lang/hlsl/writer/common:test",
"//src/tint/lang/hlsl/writer/raise:test",
"//src/tint/lang/hlsl/writer:test",
],
"//conditions:default": [],
Expand Down
4 changes: 2 additions & 2 deletions src/tint/cmd/test/BUILD.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ tint_target_add_dependencies(tint_cmd_test_test_cmd test_cmd
tint_lang_glsl_ir_test
tint_lang_hlsl_ir_test
tint_lang_hlsl_type_test
tint_lang_hlsl_writer_common_test
tint_lang_hlsl_writer_raise_test
tint_lang_msl_ir_transform_test
tint_lang_msl_ir_test
tint_lang_msl_type_test
Expand Down Expand Up @@ -111,6 +109,8 @@ endif(TINT_BUILD_GLSL_WRITER AND TINT_BUILD_GLSL_VALIDATOR)
if(TINT_BUILD_HLSL_WRITER)
tint_target_add_dependencies(tint_cmd_test_test_cmd test_cmd
tint_lang_hlsl_writer_ast_printer_test
tint_lang_hlsl_writer_common_test
tint_lang_hlsl_writer_raise_test
tint_lang_hlsl_writer_test
)
endif(TINT_BUILD_HLSL_WRITER)
Expand Down
4 changes: 2 additions & 2 deletions src/tint/cmd/tint/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ cc_binary(
"//src/tint/lang/core/ir",
"//src/tint/lang/core/ir/transform",
"//src/tint/lang/core/type",
"//src/tint/lang/hlsl/writer/common",
"//src/tint/lang/hlsl/writer/helpers",
"//src/tint/lang/msl/ir/transform",
"//src/tint/lang/wgsl",
"//src/tint/lang/wgsl/ast",
Expand Down Expand Up @@ -89,6 +87,8 @@ cc_binary(
":tint_build_hlsl_writer": [
"//src/tint/lang/hlsl/validate",
"//src/tint/lang/hlsl/writer",
"//src/tint/lang/hlsl/writer/common",
"//src/tint/lang/hlsl/writer/helpers",
],
"//conditions:default": [],
}) + select({
Expand Down
4 changes: 2 additions & 2 deletions src/tint/cmd/tint/BUILD.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ tint_target_add_dependencies(tint_cmd_tint_cmd cmd
tint_lang_core_ir
tint_lang_core_ir_transform
tint_lang_core_type
tint_lang_hlsl_writer_common
tint_lang_hlsl_writer_helpers
tint_lang_msl_ir_transform
tint_lang_wgsl
tint_lang_wgsl_ast
Expand Down Expand Up @@ -97,6 +95,8 @@ if(TINT_BUILD_HLSL_WRITER)
tint_target_add_dependencies(tint_cmd_tint_cmd cmd
tint_lang_hlsl_validate
tint_lang_hlsl_writer
tint_lang_hlsl_writer_common
tint_lang_hlsl_writer_helpers
)
endif(TINT_BUILD_HLSL_WRITER)

Expand Down
8 changes: 4 additions & 4 deletions src/tint/lang/hlsl/writer/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ cc_library(
"//src/tint/lang/core/constant",
"//src/tint/lang/core/ir",
"//src/tint/lang/core/type",
"//src/tint/lang/hlsl/writer/common",
"//src/tint/lang/hlsl/writer/printer",
"//src/tint/lang/hlsl/writer/raise",
"//src/tint/lang/wgsl",
"//src/tint/lang/wgsl/ast",
"//src/tint/lang/wgsl/ast/transform",
Expand All @@ -74,6 +71,9 @@ cc_library(
":tint_build_hlsl_writer": [
"//src/tint/lang/hlsl/writer/ast_printer",
"//src/tint/lang/hlsl/writer/ast_raise",
"//src/tint/lang/hlsl/writer/common",
"//src/tint/lang/hlsl/writer/printer",
"//src/tint/lang/hlsl/writer/raise",
],
"//conditions:default": [],
}),
Expand Down Expand Up @@ -108,7 +108,6 @@ cc_library(
"//src/tint/lang/core/intrinsic",
"//src/tint/lang/core/ir",
"//src/tint/lang/core/type",
"//src/tint/lang/hlsl/writer/common",
"//src/tint/lang/wgsl/ast",
"//src/tint/utils",
"//src/tint/utils/command",
Expand All @@ -127,6 +126,7 @@ cc_library(
":tint_build_hlsl_writer": [
"//src/tint/lang/hlsl/validate",
"//src/tint/lang/hlsl/writer",
"//src/tint/lang/hlsl/writer/common",
],
"//conditions:default": [],
}),
Expand Down
12 changes: 6 additions & 6 deletions src/tint/lang/hlsl/writer/BUILD.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ tint_target_add_dependencies(tint_lang_hlsl_writer lib
tint_lang_core_constant
tint_lang_core_ir
tint_lang_core_type
tint_lang_hlsl_writer_common
tint_lang_hlsl_writer_printer
tint_lang_hlsl_writer_raise
tint_lang_wgsl
tint_lang_wgsl_ast
tint_lang_wgsl_ast_transform
Expand All @@ -87,6 +84,9 @@ if(TINT_BUILD_HLSL_WRITER)
tint_target_add_dependencies(tint_lang_hlsl_writer lib
tint_lang_hlsl_writer_ast_printer
tint_lang_hlsl_writer_ast_raise
tint_lang_hlsl_writer_common
tint_lang_hlsl_writer_printer
tint_lang_hlsl_writer_raise
)
endif(TINT_BUILD_HLSL_WRITER)

Expand Down Expand Up @@ -123,7 +123,6 @@ tint_target_add_dependencies(tint_lang_hlsl_writer_test test
tint_lang_core_intrinsic
tint_lang_core_ir
tint_lang_core_type
tint_lang_hlsl_writer_common
tint_lang_wgsl_ast
tint_utils
tint_utils_command
Expand All @@ -147,6 +146,7 @@ if(TINT_BUILD_HLSL_WRITER)
tint_target_add_dependencies(tint_lang_hlsl_writer_test test
tint_lang_hlsl_validate
tint_lang_hlsl_writer
tint_lang_hlsl_writer_common
)
endif(TINT_BUILD_HLSL_WRITER)

Expand All @@ -168,8 +168,6 @@ tint_target_add_dependencies(tint_lang_hlsl_writer_fuzz fuzz
tint_lang_core_constant
tint_lang_core_ir
tint_lang_core_type
tint_lang_hlsl_writer_common
tint_lang_hlsl_writer_helpers
tint_lang_wgsl
tint_lang_wgsl_ast
tint_lang_wgsl_ast_transform
Expand Down Expand Up @@ -197,6 +195,8 @@ if(TINT_BUILD_HLSL_WRITER)
tint_target_add_dependencies(tint_lang_hlsl_writer_fuzz fuzz
tint_lang_hlsl_validate
tint_lang_hlsl_writer
tint_lang_hlsl_writer_common
tint_lang_hlsl_writer_helpers
)
endif(TINT_BUILD_HLSL_WRITER)

Expand Down
4 changes: 2 additions & 2 deletions src/tint/lang/hlsl/writer/ast_printer/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ cc_library(
"//src/tint/lang/core/constant",
"//src/tint/lang/core/ir/transform",
"//src/tint/lang/core/type",
"//src/tint/lang/hlsl/writer/common",
"//src/tint/lang/wgsl",
"//src/tint/lang/wgsl/ast",
"//src/tint/lang/wgsl/ast/transform",
Expand All @@ -72,6 +71,7 @@ cc_library(
] + select({
":tint_build_hlsl_writer": [
"//src/tint/lang/hlsl/writer/ast_raise",
"//src/tint/lang/hlsl/writer/common",
],
"//conditions:default": [],
}),
Expand Down Expand Up @@ -119,7 +119,6 @@ cc_library(
"//src/tint/lang/core",
"//src/tint/lang/core/constant",
"//src/tint/lang/core/type",
"//src/tint/lang/hlsl/writer/common",
"//src/tint/lang/wgsl",
"//src/tint/lang/wgsl/ast",
"//src/tint/lang/wgsl/ast/transform",
Expand All @@ -145,6 +144,7 @@ cc_library(
"//src/tint/lang/hlsl/writer",
"//src/tint/lang/hlsl/writer/ast_printer",
"//src/tint/lang/hlsl/writer/ast_raise",
"//src/tint/lang/hlsl/writer/common",
],
"//conditions:default": [],
}),
Expand Down
4 changes: 2 additions & 2 deletions src/tint/lang/hlsl/writer/ast_printer/BUILD.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ tint_target_add_dependencies(tint_lang_hlsl_writer_ast_printer lib
tint_lang_core_constant
tint_lang_core_ir_transform
tint_lang_core_type
tint_lang_hlsl_writer_common
tint_lang_wgsl
tint_lang_wgsl_ast
tint_lang_wgsl_ast_transform
Expand All @@ -78,6 +77,7 @@ tint_target_add_external_dependencies(tint_lang_hlsl_writer_ast_printer lib
if(TINT_BUILD_HLSL_WRITER)
tint_target_add_dependencies(tint_lang_hlsl_writer_ast_printer lib
tint_lang_hlsl_writer_ast_raise
tint_lang_hlsl_writer_common
)
endif(TINT_BUILD_HLSL_WRITER)

Expand Down Expand Up @@ -127,7 +127,6 @@ tint_target_add_dependencies(tint_lang_hlsl_writer_ast_printer_test test
tint_lang_core
tint_lang_core_constant
tint_lang_core_type
tint_lang_hlsl_writer_common
tint_lang_wgsl
tint_lang_wgsl_ast
tint_lang_wgsl_ast_transform
Expand Down Expand Up @@ -158,6 +157,7 @@ if(TINT_BUILD_HLSL_WRITER)
tint_lang_hlsl_writer
tint_lang_hlsl_writer_ast_printer
tint_lang_hlsl_writer_ast_raise
tint_lang_hlsl_writer_common
)
endif(TINT_BUILD_HLSL_WRITER)

Expand Down
13 changes: 11 additions & 2 deletions src/tint/lang/hlsl/writer/common/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ cc_library(
deps = [
"//src/tint/api/common",
"//src/tint/lang/core",
"//src/tint/lang/hlsl/writer/common",
"//src/tint/utils",
"//src/tint/utils/containers",
"//src/tint/utils/ice",
Expand All @@ -86,8 +85,18 @@ cc_library(
"//src/tint/utils/rtti",
"@gtest",
"//src/utils",
],
] + select({
":tint_build_hlsl_writer": [
"//src/tint/lang/hlsl/writer/common",
],
"//conditions:default": [],
}),
copts = COPTS,
visibility = ["//visibility:public"],
)

alias(
name = "tint_build_hlsl_writer",
actual = "//src/tint:tint_build_hlsl_writer_true",
)

3 changes: 3 additions & 0 deletions src/tint/lang/hlsl/writer/common/BUILD.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"condition": "tint_build_hlsl_writer",
}
Loading
Loading