Build.gn: allow optimization in glslang lib and standalone
diff --git a/BUILD.gn b/BUILD.gn
index d8bfe61..07dff8a 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -58,6 +58,8 @@
"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 @@
"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 @@
deps = [
"${spirv_tools_dir}:spvtools_opt",
+ "${spirv_tools_dir}:spvtools_val",
]
}
@@ -178,7 +181,7 @@
if (!is_win) {
cflags = [ "-Woverflow" ]
}
- defines = [ "ENABLE_OPT=0" ]
+ defines = [ "ENABLE_OPT=1" ]
deps = [
":glslang_default_resource_limits_sources",
":glslang_sources",