aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xemcc6
1 files changed, 5 insertions, 1 deletions
diff --git a/emcc b/emcc
index 7686e818..854a04d4 100755
--- a/emcc
+++ b/emcc
@@ -853,7 +853,11 @@ try:
requested_level = 2
settings_changes.append('INLINING_LIMIT=50')
opt_level = validate_arg_level(requested_level, 3, 'Invalid optimization level: ' + newargs[i])
- newargs[i] = ''
+ # We leave the -O option in place so that the clang front-end runs in that
+ # optimization mode, but we disable the actual optimization passes, as we'll
+ # run them seperately.
+ newargs.append('-mllvm')
+ newargs.append('-disable-llvm-optzns');
elif newargs[i].startswith('--js-opts'):
check_bad_eq(newargs[i])
js_opts = eval(newargs[i+1])