This commit is contained in:
Alon Zakai 2012-12-11 11:28:06 -08:00
Родитель 266ffa4567
Коммит 4fa23c0a8c
1 изменённых файлов: 5 добавлений и 5 удалений

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')