diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-01-31 18:11:28 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-01-31 18:11:28 -0800 |
commit | 88c3f163048d7f9107f314c98fc94abc9271d641 (patch) | |
tree | d94283c0e1b1de0f3c2aefa9db44040ec7885183 /tools/exec_llvm.py | |
parent | f6c2ee75635583e2652df34045464ce908645044 (diff) | |
parent | 195c3e39cc0fba69d551836e7806d1cb55b742f0 (diff) |
Merge branch 'master' into llvmopts
Diffstat (limited to 'tools/exec_llvm.py')
-rwxr-xr-x | tools/exec_llvm.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/exec_llvm.py b/tools/exec_llvm.py index 5cf55e46..71c0f18d 100755 --- a/tools/exec_llvm.py +++ b/tools/exec_llvm.py @@ -33,10 +33,11 @@ useful when this fails. import os, sys from subprocess import Popen, PIPE, STDOUT -__rootpath__ = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) +__rootpath__ = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) def path_from_root(*pathelems): return os.path.join(__rootpath__, *pathelems) -exec(open(path_from_root('tools', 'shared.py'), 'r').read()) +sys.path += [path_from_root('')] +from tools.shared import * Popen([LLVM_OPT, sys.argv[1], '-strip-debug', '-o=' + sys.argv[1]+'.clean.bc']).communicate()[0] |