Customize glslang.y to GLSLANG_ANGLE
glslang.y is specialized to remove what is not supported or won't be supported by ANGLE. This change shaves about 125KB off of ANGLE's binary size with minor improvement to the cost of SetupBuiltinSymbolTable. Signed-off-by: Shahbaz Youssefi <ShabbyX@gmail.com>
This commit is contained in:
14
BUILD.gn
14
BUILD.gn
@@ -130,7 +130,7 @@ template("glslang_sources_common") {
|
||||
"glslang/MachineIndependent/attribute.cpp",
|
||||
"glslang/MachineIndependent/attribute.h",
|
||||
"glslang/MachineIndependent/gl_types.h",
|
||||
"glslang/MachineIndependent/glslang_tab.cpp",
|
||||
"glslang/MachineIndependent/glslang_angle_tab.cpp.h",
|
||||
"glslang/MachineIndependent/glslang_tab.cpp.h",
|
||||
"glslang/MachineIndependent/intermOut.cpp",
|
||||
"glslang/MachineIndependent/iomapper.cpp",
|
||||
@@ -181,6 +181,18 @@ template("glslang_sources_common") {
|
||||
}
|
||||
|
||||
defines = []
|
||||
if (invoker.is_angle) {
|
||||
sources += [
|
||||
"glslang/MachineIndependent/glslang_angle_tab.cpp",
|
||||
]
|
||||
defines += [ "GLSLANG_ANGLE" ]
|
||||
}
|
||||
else {
|
||||
sources += [
|
||||
"glslang/MachineIndependent/glslang_tab.cpp",
|
||||
]
|
||||
}
|
||||
|
||||
if (invoker.enable_opt) {
|
||||
sources += [ "SPIRV/SpvTools.cpp" ]
|
||||
defines += [ "ENABLE_OPT=1" ]
|
||||
|
||||
Reference in New Issue
Block a user