Skip to content

Commit

Permalink
Fix issue with gamepads in web.
Browse files Browse the repository at this point in the history
Add stringToNewUTF8 to EXPORTED_RUNTIME_METHODS to fix headless variant compilation.
  • Loading branch information
ekharkunov committed Apr 23, 2024
1 parent 6a61900 commit 1404d1a
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion build_tools/waf_dynamo.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ def default_flags(self):

emflags_link = [
'DISABLE_EXCEPTION_CATCHING=1',
'EXPORTED_RUNTIME_METHODS=["ccall","stackTrace","UTF8ToString","callMain","HEAPU8"]',
'EXPORTED_RUNTIME_METHODS=["ccall","stackTrace","UTF8ToString","callMain","HEAPU8","stringToNewUTF8"]',
'EXPORTED_FUNCTIONS=_main,_malloc,_free',
'ERROR_ON_UNDEFINED_SYMBOLS=1',
'INITIAL_MEMORY=33554432',
Expand All @@ -502,6 +502,8 @@ def default_flags(self):
flags = ['-gsource-map']
linkflags = ['-gsource-map']

flags += ['-O3']
linkflags += ['-O3']
for f in ['CFLAGS', 'CXXFLAGS']:
self.env.append_value(f, ['-Wall', '-fPIC', '-fno-exceptions', '-fno-rtti',
'-DGL_ES_VERSION_2_0', '-DGOOGLE_PROTOBUF_NO_RTTI', '-D__STDC_LIMIT_MACROS', '-DDDF_EXPOSE_DESCRIPTORS', '-DDM_NO_SYSTEM_FUNCTION'])
Expand Down
Binary file modified packages/bullet-2.77-js-web.tar.gz
Binary file not shown.
Binary file modified packages/bullet-2.77-wasm-web.tar.gz
Binary file not shown.
Binary file modified packages/glfw-2.7.1-js-web.tar.gz
Binary file not shown.
Binary file modified packages/glfw-2.7.1-wasm-web.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion share/extender/build_input.yml
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ platforms:
flags: ["-fno-exceptions", "-fno-rtti", "-fPIC"]
linkFlags: ["--emit-symbol-map", "-lidbfs.js"]
emscriptenFlags: ["DISABLE_EXCEPTION_CATCHING=1"]
emscriptenLinkFlags: ["INITIAL_MEMORY=33554432", "DISABLE_EXCEPTION_CATCHING=1", "IMPORTED_MEMORY=1", "EXPORTED_FUNCTIONS=_JSWriteDump,_main,_dmExportedSymbols,_malloc,_free", "EXPORTED_RUNTIME_METHODS=[\"stackTrace\",\"ccall\",\"callMain\",\"UTF8ToString\",\"HEAPU8\"]", "ERROR_ON_UNDEFINED_SYMBOLS=1", "MAX_WEBGL_VERSION=2", "STACK_SIZE=5MB", "MIN_FIREFOX_VERSION=34", "MIN_SAFARI_VERSION=90000", "MIN_CHROME_VERSION=32"]
emscriptenLinkFlags: ["INITIAL_MEMORY=33554432", "DISABLE_EXCEPTION_CATCHING=1", "IMPORTED_MEMORY=1", "EXPORTED_FUNCTIONS=_JSWriteDump,_main,_dmExportedSymbols,_malloc,_free", "EXPORTED_RUNTIME_METHODS=[\"stackTrace\",\"ccall\",\"callMain\",\"UTF8ToString\",\"HEAPU8\",\"stringToNewUTF8\"]", "ERROR_ON_UNDEFINED_SYMBOLS=1", "MAX_WEBGL_VERSION=2", "STACK_SIZE=5MB", "MIN_FIREFOX_VERSION=34", "MIN_SAFARI_VERSION=90000", "MIN_CHROME_VERSION=32"]
libs: []
exePrefix: ''
exeExt: '.js'
Expand Down

0 comments on commit 1404d1a

Please sign in to comment.