aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-06-06 10:45:22 -0700
committerAlon Zakai <alonzakai@gmail.com>2014-06-06 10:45:22 -0700
commit4ea61a6a61360ad4d3d6363941bd0d53aadf0c7f (patch)
treed29fa9d65c7556bc1a5ff4a0aa789c817e6a260a
parent292bf20c67104f5dede74f0a828eef6bcd2c18b3 (diff)
recurse on deps_info.json, and remove workaround we needed without that
-rw-r--r--src/deps_info.json2
-rw-r--r--tools/system_libs.py8
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)