diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-01-31 14:11:57 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-01-31 14:11:57 -0800 |
commit | 2761fe8d19002c94aa25d92246fc9968ba7c2cac (patch) | |
tree | d2c4eb386d071f96330ce5de55ed79c815734efd /tools/exec_llvm.py | |
parent | ab7dacbf6278ad1cbe1633231d1c04abaa80b702 (diff) | |
parent | d48cba10976ff7665fb39768ca251c8f08e1bbe8 (diff) |
Merge pull request #198 from ehsan/import_shared_properly
Import shared.py properly
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 1b1bba1b..a2a000f0 100755 --- a/tools/exec_llvm.py +++ b/tools/exec_llvm.py @@ -36,10 +36,11 @@ the .ll into native code. This can be done as follows: 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] |