diff options
-rw-r--r-- | src/deps_info.json | 2 | ||||
-rw-r--r-- | tools/system_libs.py | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/deps_info.json b/src/deps_info.json index 769a21b5..e0983064 100644 --- a/src/deps_info.json +++ b/src/deps_info.json @@ -3,7 +3,7 @@ "SDL_Init": ["malloc", "free"], "SDL_GL_GetProcAddress": ["emscripten_GetProcAddress"], "eglGetProcAddress": ["emscripten_GetProcAddress"], - "glfwGetProcAddress": ["emscripten_GetProcAddress", "strstr"], + "glfwGetProcAddress": ["emscripten_GetProcAddress"], "emscripten_GetProcAddress": ["strstr"] } diff --git a/tools/system_libs.py b/tools/system_libs.py index 78bf2d48..f7a3e1ac 100644 --- a/tools/system_libs.py +++ b/tools/system_libs.py @@ -427,12 +427,18 @@ def calculate(temp_files, in_temp, stdout, stderr): # TODO: Move all __deps from src/library*.js to deps_info.json, and use that single source of info # both here and in the JS compiler. deps_info = json.loads(open(shared.path_from_root('src', 'deps_info.json')).read()) + added = set() def add_back_deps(need): + more = False for ident, deps in deps_info.iteritems(): - if ident in need.undefs: + if ident in need.undefs and not ident in added: + added.add(ident) + more = True for dep in deps: need.undefs.add(dep) shared.Settings.EXPORTED_FUNCTIONS.append('_' + dep) + if more: + add_back_deps(need) # recurse to get deps of deps for symbols in symbolses: add_back_deps(symbols) |