File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 7
7
import re
8
8
import sys
9
9
import tempfile
10
- from driver .popenwrapper import Popen
11
10
12
11
fullSelfPath = os .path .realpath (__file__ )
13
12
prefix = os .path .dirname (fullSelfPath )
14
13
driverDir = prefix
15
14
15
+ # This is a bit hacky.
16
+ # We cannot do
17
+ # from .popenwrapper import Popen
18
+ # OR
19
+ # from driver.popenwrapper import Popen
20
+ # because then 'as' will not succesfully import us (wllvm/wllvm++ can
21
+ # successfully import however).
22
+ #
23
+ # Using
24
+ # from popenwrapper import Popen
25
+ # will allow 'as' to import us but then wllvm/wllvm++ will not be able to.
26
+ #
27
+ # The work around is to put this directory in the search path for modules.
28
+ sys .path .insert (0 ,driverDir )
29
+ from popenwrapper import Popen
30
+
16
31
# Environmental variable for path to compiler tools (clang/llvm-link etc..)
17
32
llvmCompilerPathEnv = 'LLVM_COMPILER_PATH'
18
33
You can’t perform that action at this time.
0 commit comments