diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-05-23 18:25:54 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-05-23 18:25:54 -0700 |
commit | 2f8ca9a8c98cd77c57a5fff49874f64f67a1df55 (patch) | |
tree | b633a61ccb611a89133b9f773c14cd75094f93a2 /tools | |
parent | 41ea37201c7b0c2aaec8631a09c7754b36a83d4c (diff) |
properly expand response files in EXPORTED_FUNCTIONS, which is used before compiler.js
Diffstat (limited to 'tools')
-rw-r--r-- | tools/shared.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/shared.py b/tools/shared.py index 321fa073..dd448b31 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -631,6 +631,11 @@ def unique_ordered(values): # return a list of unique values in an input list, w return True return filter(check, values) +def expand_response(data): + if type(data) == str and data[0] == '@': + return json.loads(open(data[1:]).read()) + return data + # Settings. A global singleton. Not pretty, but nicer than passing |, settings| everywhere class Settings: @@ -1097,7 +1102,7 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)''' % { 'winfix': '' if not WINDOWS e @staticmethod def get_safe_internalize(): - exports = ','.join(map(lambda exp: exp[1:], Settings.EXPORTED_FUNCTIONS)) + exports = ','.join(map(lambda exp: exp[1:], expand_response(Settings.EXPORTED_FUNCTIONS))) # internalize carefully, llvm 3.2 will remove even main if not told not to return ['-internalize', '-internalize-public-api-list=' + exports] |