From 2aaa4cd64525daa24a033f1ea3468d5cfdd6b735 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Wed, 8 Nov 2023 12:23:47 +0100 Subject: [PATCH] Only build glslang if Vulkan or Direct3D 12 rendering is enabled glslang isn't needed for OpenGL rendering, which includes the web export. This reduces the web release export template's `.wasm` size by about 20 KB, since web builds use `vulkan=no`. --- modules/glslang/config.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/glslang/config.py b/modules/glslang/config.py index d22f9454ed2..1169776a739 100644 --- a/modules/glslang/config.py +++ b/modules/glslang/config.py @@ -1,5 +1,7 @@ def can_build(env, platform): - return True + # glslang is only needed when Vulkan or Direct3D 12-based renderers are available, + # as OpenGL doesn't use glslang. + return env["vulkan"] or env["d3d12"] def configure(env):