From ba466927d9c7c4da18c7ee9fcdcc19af51b7ba7b Mon Sep 17 00:00:00 2001 From: Adam Scott Date: Mon, 5 Feb 2024 11:42:28 -0500 Subject: [PATCH] Fix emscripten 3.1.51 breaking change about `*glGetProcAddress()` (cherry picked from commit 5922ac0fb11105da67d28847b60a521406a77cdb) --- platform/javascript/detect.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py index 9d022dd72..c3fd389b7 100644 --- a/platform/javascript/detect.py +++ b/platform/javascript/detect.py @@ -232,6 +232,11 @@ def configure(env): # This setting just makes WebGL 2 APIs available, it does NOT disable WebGL 1. env.Append(LINKFLAGS=["-s", "USE_WEBGL2=1"]) + # Breaking change since emscripten 3.1.51 + # https://github.com/emscripten-core/emscripten/blob/main/ChangeLog.md#3151---121323 + if cc_semver >= (3, 1, 51): + # Enables the use of *glGetProcAddress() + env.Append(LINKFLAGS=["-s", "GL_ENABLE_GET_PROC_ADDRESS=1"]) # Do not call main immediately when the support code is ready. env.Append(LINKFLAGS=["-s", "INVOKE_RUN=0"])