@@ -543,16 +543,24 @@ def getBitcodeFileName(self, argFilter):
543
543
class ClangBuilder (BuilderBase ):
544
544
def __init__ (self , cmd , isCxx , prefixPath = None ):
545
545
super (ClangBuilder , self ).__init__ (cmd , isCxx , prefixPath )
546
-
546
+
547
547
def getBitcodeCompiler (self ):
548
548
cc = self .getCompiler ()
549
549
return cc + ['-emit-llvm' ]
550
550
551
551
def getCompiler (self ):
552
552
if self .isCxx :
553
- return ['{0}clang++' .format (self .prefixPath )]
553
+ cxx = os .getenv ('LLVM_CXX_NAME' )
554
+ if cxx :
555
+ return ['{0}{1}' .format (self .prefixPath , cxx )]
556
+ else :
557
+ return ['{0}clang++' .format (self .prefixPath )]
554
558
else :
555
- return ['{0}clang' .format (self .prefixPath )]
559
+ cc = os .getenv ('LLVM_CC_NAME' )
560
+ if cc :
561
+ return ['{0}{1}' .format (self .prefixPath , cc )]
562
+ else :
563
+ return ['{0}clang' .format (self .prefixPath )]
556
564
557
565
def getBitcodeArglistFilter (self ):
558
566
return ClangBitcodeArgumentListFilter (self .cmd )
@@ -566,7 +574,6 @@ def attachBitcode(self, argFilter):
566
574
outFile = argFilter .getOutputFilename ()
567
575
attachBitcodePathToObject (bcname , outFile )
568
576
569
- #iam: this should join the dodo soon, yes?
570
577
class DragoneggBuilder (BuilderBase ):
571
578
def __init__ (self , cmd , isCxx , prefixPath = None ):
572
579
super (DragoneggBuilder , self ).__init__ (cmd , isCxx , prefixPath )
0 commit comments