diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-12-11 11:28:06 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-12-21 10:47:41 -0800 |
commit | 4fa23c0a8cd565acc40dbc3a345009ae8ffa0bea (patch) | |
tree | 2ac572e2b8e92bb6f9a50b6216f8d15cef9d1500 | |
parent | 266ffa456796c59584cdc126dcfc7656a3013bbd (diff) |
improve lto
-rwxr-xr-x | emcc | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1058,11 +1058,11 @@ try: # If we can LTO, do it before dce, since it opens up dce opportunities if llvm_lto and shared.Building.can_use_unsafe_opts(): if not shared.Building.can_inline(): link_opts.append('-disable-inlining') - # do not internalize in std-link-opts - it ignores the internalize-public-api-list we pass later - link_opts += ['-disable-internalize', '-std-link-opts'] - # At minimum remove dead functions etc., this potentially saves a lot in the size of the generated code (and the time to compile it) - exports = ','.join(map(lambda exp: exp[1:], shared.Settings.EXPORTED_FUNCTIONS)) - link_opts += shared.Building.get_safe_internalize() + ['-globaldce'] + # do not internalize in std-link-opts - it ignores internalize-public-api-list - and add a manual internalize + link_opts += ['-disable-internalize'] + shared.Building.get_safe_internalize() + ['-std-link-opts'] + else: + # At minimum remove dead functions etc., this potentially saves a lot in the size of the generated code (and the time to compile it) + link_opts += shared.Building.get_safe_internalize() + ['-globaldce'] if DEBUG: print >> sys.stderr, 'emcc: LLVM linktime:', link_opts shared.Building.llvm_opt(in_temp(target_basename + '.bc'), link_opts) if DEBUG: save_intermediate('linktime', 'bc') |