From 1f5799c155d30b90871c79d4ca92f8da4d3f3872 Mon Sep 17 00:00:00 2001 From: David 'Digit' Turner Date: Fri, 21 Jun 2019 14:58:30 +0200 Subject: [PATCH] BUILD.gn: Fix file for use with Fuchsia platform build. In order to upgrade the version of glslang used by the Fuchsia platform source tree, BUILD.gn needs to be slightly modified to care about the case where it is not used with the Chromium //build configuration: - Remove a new compiler warning to ensure proper compilation with -Werror (which is the default). - Add a build target for spirv-remap, which is used by Fuchsia at build time to optimize the precompiled shaders of some of its graphics libraries. --- BUILD.gn | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/BUILD.gn b/BUILD.gn index 860247cb..e38e78a4 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -148,6 +148,7 @@ source_set("glslang_sources") { "-Wno-inconsistent-missing-override", "-Wno-sign-compare", "-Wno-unused-variable", + "-Wno-missing-field-initializers", ] } if (is_win && !is_clang) { @@ -186,3 +187,13 @@ executable("glslang_validator") { ":glslang_sources", ] } + +executable("spirv-remap") { + sources = [ + "StandAlone/spirv-remap.cpp", + ] + defines = [ "ENABLE_OPT=1" ] + deps = [ + ":glslang_sources", + ] +}