diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-03-21 19:50:03 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-03-21 19:50:03 -0700 |
commit | b956a15fb40aa661c7feb0f8b078f1bb0ea1d622 (patch) | |
tree | 6b8a457060fd2765232d0d3705fde59f674383cc /tools/exec_llvm.py | |
parent | 24856d20699818b35f01963e4144c87d1a5c56ff (diff) |
poppler-related tweaks
Diffstat (limited to 'tools/exec_llvm.py')
-rwxr-xr-x | tools/exec_llvm.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/exec_llvm.py b/tools/exec_llvm.py index c6071934..060c6bf9 100755 --- a/tools/exec_llvm.py +++ b/tools/exec_llvm.py @@ -1,3 +1,5 @@ +#!/usr/bin/python + ''' Small utility to execute some llvm bitcode. @@ -35,7 +37,9 @@ exec(open(path_from_root('tools', 'shared.py'), 'r').read()) 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] + +# Execute with empty environment - just like the JS script will have +Popen([LLVM_INTERPRETER, sys.argv[1]+'.clean.bc'] + sys.argv[2:], env={'HOME': '.'}).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] |