From f7910f5b9557e0db5ceab6649b6400594cee4095 Mon Sep 17 00:00:00 2001 From: Ben Clayton Date: Fri, 3 Mar 2023 14:20:53 +0000 Subject: [PATCH] tint.h: Remove 'libspirv.hpp' include This does not belong in the public header - the spirv writer public header does not depend on it. Change-Id: Id1b2107c3a2003632e1868c2d6a337ddbb0c8b48 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122382 Reviewed-by: James Price Kokoro: Kokoro Commit-Queue: Ben Clayton Auto-Submit: Ben Clayton --- include/tint/tint.h | 1 - src/tint/cmd/BUILD.gn | 5 ++++- src/tint/cmd/helper.cc | 4 ++++ 3 files changed, 8 insertions(+), 2 deletions(-) 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 {