diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-01-30 10:41:55 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-01-30 10:41:55 -0800 |
commit | 764e81bd041395d4e3bd78c9c53b0676e34ef377 (patch) | |
tree | ab4a01e7388f4403fcec2a7cb312c06437be13e9 /emcc | |
parent | 7caf985807c372e609425d45f7630ea0407c9abb (diff) |
do not do -Ox or LTO when building a linkable module
Diffstat (limited to 'emcc')
-rwxr-xr-x | emcc | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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: |