mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-09 20:10:06 +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.cpp",
|
||||||
"SPIRV/SpvBuilder.h",
|
"SPIRV/SpvBuilder.h",
|
||||||
"SPIRV/SpvPostProcess.cpp",
|
"SPIRV/SpvPostProcess.cpp",
|
||||||
|
"SPIRV/SpvTools.cpp",
|
||||||
|
"SPIRV/SpvTools.h",
|
||||||
"SPIRV/bitutils.h",
|
"SPIRV/bitutils.h",
|
||||||
"SPIRV/disassemble.cpp",
|
"SPIRV/disassemble.cpp",
|
||||||
"SPIRV/disassemble.h",
|
"SPIRV/disassemble.h",
|
||||||
@ -130,7 +132,7 @@ source_set("glslang_sources") {
|
|||||||
"glslang/Public/ShaderLang.h",
|
"glslang/Public/ShaderLang.h",
|
||||||
]
|
]
|
||||||
|
|
||||||
defines = []
|
defines = [ "ENABLE_OPT=1" ]
|
||||||
if (is_win) {
|
if (is_win) {
|
||||||
sources += [ "glslang/OSDependent/Windows/ossource.cpp" ]
|
sources += [ "glslang/OSDependent/Windows/ossource.cpp" ]
|
||||||
defines += [ "GLSLANG_OSINCLUDE_WIN32" ]
|
defines += [ "GLSLANG_OSINCLUDE_WIN32" ]
|
||||||
@ -158,6 +160,7 @@ source_set("glslang_sources") {
|
|||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
"${spirv_tools_dir}:spvtools_opt",
|
"${spirv_tools_dir}:spvtools_opt",
|
||||||
|
"${spirv_tools_dir}:spvtools_val",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -178,7 +181,7 @@ executable("glslang_validator") {
|
|||||||
if (!is_win) {
|
if (!is_win) {
|
||||||
cflags = [ "-Woverflow" ]
|
cflags = [ "-Woverflow" ]
|
||||||
}
|
}
|
||||||
defines = [ "ENABLE_OPT=0" ]
|
defines = [ "ENABLE_OPT=1" ]
|
||||||
deps = [
|
deps = [
|
||||||
":glslang_default_resource_limits_sources",
|
":glslang_default_resource_limits_sources",
|
||||||
":glslang_sources",
|
":glslang_sources",
|
||||||
|
Loading…
Reference in New Issue
Block a user