aboutsummaryrefslogtreecommitdiff
path: root/tools/exec_llvm.py
diff options
context:
space:
mode:
authorAlon Zakai <azakai@mozilla.com>2011-03-13 12:13:21 -0700
committerAlon Zakai <azakai@mozilla.com>2011-03-13 12:13:21 -0700
commit6c22a66671b6f42ad63044b0fd46a5dc892298b4 (patch)
tree2dcbf1895b6d97be7b6e1a9f26561045c3e8fa28 /tools/exec_llvm.py
parentf534adece703cadde53e2e14b199219376d63028 (diff)
misc compiler tweaks
Diffstat (limited to 'tools/exec_llvm.py')
-rwxr-xr-xtools/exec_llvm.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/tools/exec_llvm.py b/tools/exec_llvm.py
index 05194b1a..c6071934 100755
--- a/tools/exec_llvm.py
+++ b/tools/exec_llvm.py
@@ -12,7 +12,7 @@ symbols will crash it due to
http://llvm.org/bugs/show_bug.cgi?id=6981
-So instead we compile the bitcode into native code.
+So we must get around that.
To use this, change the Makefile so that instead of
running
@@ -32,8 +32,12 @@ def path_from_root(*pathelems):
return os.path.join(os.path.sep, *(abspath.split(os.sep)[:-1] + list(pathelems)))
exec(open(path_from_root('tools', 'shared.py'), 'r').read())
-print 'EXEC_LLVM: ', sys.argv
-Popen([LLVM_COMPILER, '-march=c', sys.argv[1]]).communicate()[0]
-Popen(['gcc', sys.argv[1]+'.cbe.c']).communicate()[0]
-Popen(['./a.out'] + sys.argv[2:]).communicate()[0]
+print '// EXEC_LLVM: ', sys.argv
+
+Popen([LLVM_OPT, sys.argv[1], '-strip-debug', '-o=' + sys.argv[1]+'.clean.bc']).communicate()[0]
+Popen([LLVM_INTERPRETER, sys.argv[1]+'.clean.bc'] + sys.argv[2:]).communicate()[0]
+
+#Popen([LLVM_COMPILER, '-march=c', sys.argv[1], '-o=' + sys.argv[1]+'.cbe.c']).communicate()[0]
+#Popen(['gcc', sys.argv[1]+'.cbe.c', '-lstdc++']).communicate()[0]
+#Popen(['./a.out'] + sys.argv[2:]).communicate()[0]