Skip to content

Commit

Permalink
Only build glslang if Vulkan or Direct3D 12 rendering is enabled
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
Calinou committed Jan 10, 2024
1 parent 3524346 commit 2aaa4cd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/glslang/config.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down

0 comments on commit 2aaa4cd

Please sign in to comment.