From 741fc4ab77ff56de3c2e34ed14f838f3083a43eb Mon Sep 17 00:00:00 2001 From: Shahbaz Youssefi Date: Thu, 16 May 2019 23:53:15 -0400 Subject: [PATCH] Build.gn: allow optimization in glslang lib and standalone --- BUILD.gn | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index d8bfe616a..07dff8adc 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -58,6 +58,8 @@ source_set("glslang_sources") { "SPIRV/SpvBuilder.cpp", "SPIRV/SpvBuilder.h", "SPIRV/SpvPostProcess.cpp", + "SPIRV/SpvTools.cpp", + "SPIRV/SpvTools.h", "SPIRV/bitutils.h", "SPIRV/disassemble.cpp", "SPIRV/disassemble.h", @@ -130,7 +132,7 @@ source_set("glslang_sources") { "glslang/Public/ShaderLang.h", ] - defines = [] + defines = [ "ENABLE_OPT=1" ] if (is_win) { sources += [ "glslang/OSDependent/Windows/ossource.cpp" ] defines += [ "GLSLANG_OSINCLUDE_WIN32" ] @@ -158,6 +160,7 @@ source_set("glslang_sources") { deps = [ "${spirv_tools_dir}:spvtools_opt", + "${spirv_tools_dir}:spvtools_val", ] } @@ -178,7 +181,7 @@ executable("glslang_validator") { if (!is_win) { cflags = [ "-Woverflow" ] } - defines = [ "ENABLE_OPT=0" ] + defines = [ "ENABLE_OPT=1" ] deps = [ ":glslang_default_resource_limits_sources", ":glslang_sources",