|
| 1 | +from __future__ import absolute_import |
| 2 | +from __future__ import print_function |
| 3 | + |
1 | 4 | from subprocess import *
|
2 | 5 | import collections
|
3 | 6 | import pprint
|
|
7 | 10 | import re
|
8 | 11 | import sys
|
9 | 12 | import tempfile
|
| 13 | +from .popenwrapper import Popen |
10 | 14 |
|
11 | 15 | fullSelfPath = os.path.realpath(__file__)
|
12 | 16 | prefix = os.path.dirname(fullSelfPath)
|
13 | 17 | driverDir = prefix
|
14 | 18 |
|
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 |
| 19 | + |
30 | 20 |
|
31 | 21 | # Environmental variable for path to compiler tools (clang/llvm-link etc..)
|
32 | 22 | llvmCompilerPathEnv = 'LLVM_COMPILER_PATH'
|
@@ -391,15 +381,15 @@ def getArtifactNames(self, srcFile, hidden=False):
|
391 | 381 |
|
392 | 382 | #iam: for printing our partitioning of the args
|
393 | 383 | def dump(self):
|
394 |
| - print "compileArgs: ", self.compileArgs |
395 |
| - print "inputFiles: ", self.inputFiles |
396 |
| - print "linkArgs: ", self.linkArgs |
397 |
| - print "objectFiles: ", self.objectFiles |
398 |
| - print "outputFilename: ", self.outputFilename |
| 384 | + print("compileArgs: ", self.compileArgs) |
| 385 | + print("inputFiles: ", self.inputFiles) |
| 386 | + print("linkArgs: ", self.linkArgs) |
| 387 | + print("objectFiles: ", self.objectFiles) |
| 388 | + print("outputFilename: ", self.outputFilename) |
399 | 389 | for srcFile in self.inputFiles:
|
400 |
| - print "srcFile: ", srcFile |
| 390 | + print("srcFile: ", srcFile) |
401 | 391 | (objFile, bcFile) = self.getArtifactNames(srcFile)
|
402 |
| - print "{0} ===> ({1}, {2})".format(srcFile, objFile, bcFile) |
| 392 | + print("{0} ===> ({1}, {2})".format(srcFile, objFile, bcFile)) |
403 | 393 |
|
404 | 394 |
|
405 | 395 |
|
|
0 commit comments