From 417d47d0482cc63f97c1b5fb95be40e993539b1e Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 5 Oct 2011 11:12:45 -0700 Subject: path fixes --- tools/exec_llvm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/exec_llvm.py') diff --git a/tools/exec_llvm.py b/tools/exec_llvm.py index 04801649..1b1bba1b 100755 --- a/tools/exec_llvm.py +++ b/tools/exec_llvm.py @@ -36,9 +36,9 @@ 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__))) def path_from_root(*pathelems): - rootpath = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) - return os.path.join(rootpath, *pathelems) + return os.path.join(__rootpath__, *pathelems) exec(open(path_from_root('tools', 'shared.py'), 'r').read()) Popen([LLVM_OPT, sys.argv[1], '-strip-debug', '-o=' + sys.argv[1]+'.clean.bc']).communicate()[0] -- cgit v1.2.3-18-g5258