Build.gn: allow optimization in glslang lib and standalone

This commit is contained in:
Shahbaz Youssefi 2019-05-16 23:53:15 -04:00
parent 6e384fef6c
commit 741fc4ab77

View File

@ -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",