aboutsummaryrefslogtreecommitdiff
path: root/emcc
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-02-01 10:37:40 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-02-01 10:37:40 -0800
commitfe6518c8daaac34f8c40167b00f3cd7be7df2d62 (patch)
tree2e9b0b235a914bd1a99a30609f1e70c75f217d1f /emcc
parent1204c42f4f7f5b5658fce74e0e29e0f09ca44029 (diff)
refactor build checks for standalone and unsafe opts
Diffstat (limited to 'emcc')
-rwxr-xr-xemcc4
1 files changed, 2 insertions, 2 deletions
diff --git a/emcc b/emcc
index 03d729b7..b1016a60 100755
--- a/emcc
+++ b/emcc
@@ -568,13 +568,13 @@ try:
shared.Building.llvm_opt(in_temp(target_basename + '.bc'), llvm_opts)
if DEBUG: save_intermediate('opt', 'bc')
# Do LTO in a separate pass to work around LLVM bug XXX (see failure e.g. in cubescript)
- if not shared.Settings.BUILD_AS_SHARED_LIB and not shared.Settings.LINKABLE:
+ if shared.Building.can_use_unsafe_opts() and shared.Building.can_build_standalone():
if DEBUG: print >> sys.stderr, 'emcc: LLVM LTO'
shared.Building.llvm_opt(in_temp(target_basename + '.bc'), ['-disable-inlining', '-std-link-opts'])
if DEBUG: save_intermediate('lto', 'bc')
else:
# If possible, remove dead functions etc., this potentially saves a lot in the size of the generated code (and the time to compile it)
- if not LEAVE_INPUTS_RAW and not shared.Settings.BUILD_AS_SHARED_LIB and not shared.Settings.LINKABLE:
+ if not LEAVE_INPUTS_RAW and shared.Building.can_build_standalone():
if DEBUG: print >> sys.stderr, 'emcc: LLVM dead globals elimination'
shared.Building.llvm_opt(in_temp(target_basename + '.bc'), ['-internalize', '-globaldce'])
if DEBUG: save_intermediate('dce', 'bc')