Skip to content

Commit 59fb2d6

Browse files
committed
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 <[email protected]>
1 parent 8c49d15 commit 59fb2d6

File tree

11 files changed

+13491
-3043
lines changed

11 files changed

+13491
-3043
lines changed

BUILD.gn

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ template("glslang_sources_common") {
130130
"glslang/MachineIndependent/attribute.cpp",
131131
"glslang/MachineIndependent/attribute.h",
132132
"glslang/MachineIndependent/gl_types.h",
133-
"glslang/MachineIndependent/glslang_tab.cpp",
133+
"glslang/MachineIndependent/glslang_angle_tab.cpp.h",
134134
"glslang/MachineIndependent/glslang_tab.cpp.h",
135135
"glslang/MachineIndependent/intermOut.cpp",
136136
"glslang/MachineIndependent/iomapper.cpp",
@@ -181,6 +181,18 @@ template("glslang_sources_common") {
181181
}
182182

183183
defines = []
184+
if (invoker.is_angle) {
185+
sources += [
186+
"glslang/MachineIndependent/glslang_angle_tab.cpp",
187+
]
188+
defines += [ "GLSLANG_ANGLE" ]
189+
}
190+
else {
191+
sources += [
192+
"glslang/MachineIndependent/glslang_tab.cpp",
193+
]
194+
}
195+
184196
if (invoker.enable_opt) {
185197
sources += [ "SPIRV/SpvTools.cpp" ]
186198
defines += [ "ENABLE_OPT=1" ]

0 commit comments

Comments
 (0)