diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-02-24 14:33:34 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-02-24 14:33:34 -0800 |
commit | a75d43ec8dfc66a461dbe736692e70352d7dc556 (patch) | |
tree | 78004f2935a323dc46bb2db83d72c4458e63ed7f /tools/nativize_llvm.py | |
parent | d47a30c26ab0f76c74cb53d9eb54cb049ea05d21 (diff) | |
parent | cd3e0b2ceef728c27745d1e7f5d6b95671bcaf04 (diff) |
Merge branch 'fastcomp-by-default' into incoming
Diffstat (limited to 'tools/nativize_llvm.py')
-rwxr-xr-x | tools/nativize_llvm.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/nativize_llvm.py b/tools/nativize_llvm.py index b327bdfc..52dfdea1 100755 --- a/tools/nativize_llvm.py +++ b/tools/nativize_llvm.py @@ -25,9 +25,11 @@ Popen([LLVM_OPT, filename, '-strip-debug', '-o', filename + '.clean.bc']).commun print 'bc => s' for params in [['-march=x86'], ['-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] + for triple in [['-mtriple=i386-pc-linux-gnu'], []]: + Popen([LLVM_COMPILER] + params + triple + [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 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] |