diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-06-16 14:40:45 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-06-16 14:40:45 -0700 |
commit | ba387574f23867d889a04f1586e6dd9597e8bad8 (patch) | |
tree | 6934000fdd9c173c552a382676b5046f58877b26 /tools/system_libs.py | |
parent | 7acb48826165890ebc9d3794d8d7473aa62b762e (diff) | |
parent | 7c26bbdb7d3c40d68777cc93f54ebfa5355a48bc (diff) |
Merge branch 'incoming' into proxyGL
Diffstat (limited to 'tools/system_libs.py')
-rw-r--r-- | tools/system_libs.py | 8 |
1 files changed, 7 insertions, 1 deletions
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) |