diff --git a/include/tint/tint.h b/include/tint/tint.h index c405175205..758e62ac00 100644 --- a/include/tint/tint.h +++ b/include/tint/tint.h @@ -48,7 +48,6 @@ #endif // TINT_BUILD_WGSL_READER #if TINT_BUILD_SPV_WRITER -#include "spirv-tools/libspirv.hpp" #include "src/tint/writer/spirv/generator.h" #endif // TINT_BUILD_SPV_WRITER diff --git a/src/tint/cmd/BUILD.gn b/src/tint/cmd/BUILD.gn index a44829bd88..ab0c964832 100644 --- a/src/tint/cmd/BUILD.gn +++ b/src/tint/cmd/BUILD.gn @@ -21,7 +21,10 @@ source_set("tint_cmd_helper") { "helper.h", ] - deps = [ "${tint_root_dir}/src/tint:libtint" ] + deps = [ + "${tint_root_dir}/src/tint:libtint", + "${tint_spirv_tools_dir}/:spvtools_headers", + ] } executable("tint") { diff --git a/src/tint/cmd/helper.cc b/src/tint/cmd/helper.cc index c31178d6c6..53013fea15 100644 --- a/src/tint/cmd/helper.cc +++ b/src/tint/cmd/helper.cc @@ -18,6 +18,10 @@ #include #include +#if TINT_BUILD_SPV_WRITER +#include "spirv-tools/libspirv.hpp" +#endif + namespace tint::cmd { namespace {