diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-12-10 12:23:42 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-12-21 10:47:39 -0800 |
commit | e9fe31fb2f629a2b94809c7f9a91577425728b1e (patch) | |
tree | e80be918fcd74573db05bd2e87880cfda5141b25 | |
parent | c5845c5f593a87cebd8117ec7d6b26ade962e276 (diff) |
llvm 3.2 internalize internalizes even main, so manually keep it and other exports alive
-rwxr-xr-x | emcc | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1060,7 +1060,8 @@ try: link_opts.append('-std-link-opts') else: # At least remove dead functions etc., this potentially saves a lot in the size of the generated code (and the time to compile it) - link_opts += ['-internalize', '-globaldce'] + exports = ','.join(map(lambda exp: exp[1:], shared.Settings.EXPORTED_FUNCTIONS)) + link_opts += ['-internalize', '-internalize-public-api-list=' + exports, '-globaldce'] if link_opts: if DEBUG: print >> sys.stderr, 'emcc: LLVM linktime:', link_opts shared.Building.llvm_opt(in_temp(target_basename + '.bc'), link_opts) |