improve lto
This commit is contained in:
Родитель
266ffa4567
Коммит
4fa23c0a8c
10
emcc
10
emcc
|
@ -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')
|
||||
|
|
Загрузка…
Ссылка в новой задаче