From 5bec56b32fb9f8edc24f922a4bbc0bb6444341a1 Mon Sep 17 00:00:00 2001 From: Eugene Kliuchnikov Date: Wed, 12 Aug 2020 23:13:20 +0200 Subject: [PATCH] Add support for "-Ofast" compiler option --- emcc.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/emcc.py b/emcc.py index 662425d59f60e..e51a17a5e1cf0 100755 --- a/emcc.py +++ b/emcc.py @@ -2826,6 +2826,9 @@ def consume_arg(): options.requested_level = 2 shared.Settings.SHRINK_LEVEL = 2 settings_changes.append('INLINING_LIMIT=25') + elif options.requested_level == 'fast': + options.llvm_opts = ['-Ofast'] + options.requested_level = 3 shared.Settings.OPT_LEVEL = validate_arg_level(options.requested_level, 3, 'Invalid optimization level: ' + newargs[i], clamp=True) elif check_arg('--js-opts'): options.js_opts = int(consume_arg())