diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-12-03 15:00:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-03 15:00:58 +0100 |
commit | 52e2105e61704bd078e9d0e2a07257512e761cb3 (patch) | |
tree | 23b1bd97321e68c0ea47f81d413c32791f435bdd | |
parent | 2b824b4e455cfd43ab9442387c2333c134cf88cf (diff) | |
parent | 6d6280dfa3a470a08287f294bb78bc9ea08ef0b0 (diff) |
Merge pull request #34082 from akien-mga/emscripten-clamp-fastcomp
Emscripten: Re-add BINARYEN_TRAP_MODE='clamp' for fastcomp
-rw-r--r-- | platform/javascript/detect.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py index c05b765c5e..7bf3e1bc1d 100644 --- a/platform/javascript/detect.py +++ b/platform/javascript/detect.py @@ -131,6 +131,13 @@ def configure(env): env.Append(LINKFLAGS=['-s', 'BINARYEN=1']) + # This needs to be defined for Emscripten using 'fastcomp' (default pre-1.39.0) + # and undefined if using 'upstream'. And to make things simple, earlier + # Emscripten versions didn't include 'fastcomp' in their path, so we check + # against the presence of 'upstream' to conditionally add the flag. + if not "upstream" in em_config['EMSCRIPTEN_ROOT']: + env.Append(LINKFLAGS=['-s', 'BINARYEN_TRAP_MODE=\'clamp\'']) + # Allow increasing memory buffer size during runtime. This is efficient # when using WebAssembly (in comparison to asm.js) and works well for # us since we don't know requirements at compile-time. |