mirror of
https://github.com/KhronosGroup/glslang
synced 2024-09-19 12:19:53 +00:00
Build.gn: allow optimization in glslang lib and standalone
This commit is contained in:
parent
6e384fef6c
commit
741fc4ab77
7
BUILD.gn
7
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",
|
||||
|
Loading…
Reference in New Issue
Block a user