From b79f51ece3d42e96ea4952b9b1469b8d0563f337 Mon Sep 17 00:00:00 2001 From: Antonio Maiorano Date: Fri, 4 Feb 2022 23:24:43 +0000 Subject: [PATCH] Fix clang-cl msvc build Change-Id: I4834c03370db78ed1ba462eeb54a0dc91f481791 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/79461 Auto-Submit: Antonio Maiorano Kokoro: Kokoro Reviewed-by: Ben Clayton Commit-Queue: Ben Clayton --- CMakeLists.txt | 1 + samples/main.cc | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6049b1b7f5..c26ae7e709 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -380,6 +380,7 @@ function(tint_default_compile_options TARGET) -Wno-shorten-64-to-32 -Wno-shadow-field-in-constructor -Wno-reserved-id-macro + -Wno-language-extension-token ) endif() endif() diff --git a/samples/main.cc b/samples/main.cc index 05f4e42202..0ea122580a 100644 --- a/samples/main.cc +++ b/samples/main.cc @@ -828,13 +828,13 @@ bool GenerateGlsl(const tint::Program* program, const Options& options) { glslang::InitializeProcess(); } - auto generate = [&](const tint::Program* program, + auto generate = [&](const tint::Program* prg, const std::string entry_point_name) -> bool { tint::writer::glsl::Options gen_options; auto result = - tint::writer::glsl::Generate(program, gen_options, entry_point_name); + tint::writer::glsl::Generate(prg, gen_options, entry_point_name); if (!result.success) { - PrintWGSL(std::cerr, *program); + PrintWGSL(std::cerr, *prg); std::cerr << "Failed to generate: " << result.error << std::endl; return false; }