diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-12-31 11:56:53 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-12-31 11:56:53 -0800 |
commit | 2325baf34e144586d71251f31c01c7f2abfdb8b7 (patch) | |
tree | 6dec7e37e75040034d443786d4701e62b38a4d6d /tools/nativize_llvm.py | |
parent | 8aa6919b7acf0b4034735ac7ee597e946fefaf4d (diff) | |
parent | a55c2a24a50a93fcf9035eb2a809d13d3a8d3555 (diff) |
Merge branch 'incoming' into asm_js
Conflicts:
src/library_browser.js
Diffstat (limited to 'tools/nativize_llvm.py')
-rwxr-xr-x | tools/nativize_llvm.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/nativize_llvm.py b/tools/nativize_llvm.py index e76b9a4e..d9558c32 100755 --- a/tools/nativize_llvm.py +++ b/tools/nativize_llvm.py @@ -23,9 +23,12 @@ libs = sys.argv[2:] # e.g.: dl for dlopen/dlclose, util for openpty/forkpty print 'bc => clean bc' Popen([LLVM_OPT, filename, '-strip-debug', '-o=' + filename + '.clean.bc']).communicate()[0] print 'bc => s' -Popen([LLVM_COMPILER, filename + '.clean.bc', '-o=' + filename + '.s']).communicate()[0] -print 's => o' -Popen(['as', filename + '.s', '-o', filename + '.o']).communicate()[0] +for params in [[], ['-march=x86-64']]: # try x86, then x86-64 FIXME + print 'params', params + Popen([LLVM_COMPILER] + params + [filename + '.clean.bc', '-o=' + filename + '.s']).communicate()[0] + print 's => o' + Popen(['as', filename + '.s', '-o', filename + '.o']).communicate()[0] + if os.path.exists(filename + '.o'): break print 'o => runnable' Popen(['g++', path_from_root('system', 'lib', 'debugging.cpp'), filename + '.o', '-o', filename + '.run'] + ['-l' + lib for lib in libs]).communicate()[0] |