diff options
-rwxr-xr-x | emscripten.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/emscripten.py b/emscripten.py index 0b1c0bf4..f908a339 100755 --- a/emscripten.py +++ b/emscripten.py @@ -737,14 +737,15 @@ def emscript_fast(infile, settings, outfile, libraries=[], compiler_engine=None, # * Run compiler.js on the metadata to emit the shell js code, pre/post-ambles, # JS library dependencies, etc. - if DEBUG: - logging.debug('emscript: llvm backend') - t = time.time() - temp_js = temp_files.get('.4.js').name backend_compiler = os.path.join(shared.LLVM_ROOT, 'llc') - shared.jsrun.timeout_run(subprocess.Popen([backend_compiler, infile, '-march=js', '-filetype=asm', '-o', temp_js], stdout=subprocess.PIPE)) - + backend_args = [backend_compiler, infile, '-march=js', '-filetype=asm', '-o', temp_js] + if settings['PRECISE_F32']: + backend_args += ['-emscripten-precise-f32'] + if DEBUG: + logging.debug('emscript: llvm backend: ' + ' '.join(backend_args)) + t = time.time() + shared.jsrun.timeout_run(subprocess.Popen(backend_args, stdout=subprocess.PIPE)) if DEBUG: logging.debug(' emscript: llvm backend took %s seconds' % (time.time() - t)) t = time.time() |