aboutsummaryrefslogtreecommitdiff
path: root/emcc
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-01-30 10:41:55 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-01-30 10:41:55 -0800
commit764e81bd041395d4e3bd78c9c53b0676e34ef377 (patch)
treeab4a01e7388f4403fcec2a7cb312c06437be13e9 /emcc
parent7caf985807c372e609425d45f7630ea0407c9abb (diff)
do not do -Ox or LTO when building a linkable module
Diffstat (limited to 'emcc')
-rwxr-xr-xemcc7
1 files changed, 4 insertions, 3 deletions
diff --git a/emcc b/emcc
index ae08c516..ef5aae44 100755
--- a/emcc
+++ b/emcc
@@ -565,9 +565,10 @@ try:
shared.Building.llvm_opt(in_temp(target_basename + '.bc'), LLVM_OPT_LEVEL[opt_level])
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 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')
+ if not shared.Settings.BUILD_AS_SHARED_LIB and not shared.Settings.LINKABLE:
+ 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: