diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-02-03 16:33:20 -0500 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-02-03 16:33:20 -0500 |
commit | 2d106105d1da2d733a75342b73a378357835f76f (patch) | |
tree | 8ab19057b8c6cc386dbb134cb34751ec8a20a412 /emscripten.py | |
parent | 0e12ac57ce95fc25c2f85061162c9f17e8b946f5 (diff) |
support for floats in fastcomp
Diffstat (limited to 'emscripten.py')
-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() |