Skip to content

Commit 5655859

Browse files
author
Ian A.Mason
committed
Merge branch 'master' of github.com:SRI-CSL/whole-program-llvm
2 parents b17cc61 + f074b03 commit 5655859

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

wllvm/compilers.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -200,15 +200,18 @@ def getCommand(self):
200200

201201

202202
class ClangBuilder(BuilderBase):
203-
def getBitcodeCompiler(self):
204-
cc = self.getCompiler()
205-
retval = cc + ['-emit-llvm']
203+
204+
def getBitcodeGenerationFlags(self):
206205
# iam: If the environment variable LLVM_BITCODE_GENERATION_FLAGS is set we will add them to the
207206
# bitcode generation step
208207
bitcodeFLAGS = os.getenv('LLVM_BITCODE_GENERATION_FLAGS')
209208
if bitcodeFLAGS:
210-
retval = retval + bitcodeFLAGS.split()
211-
return retval
209+
return bitcodeFLAGS.split()
210+
return []
211+
212+
def getBitcodeCompiler(self):
213+
cc = self.getCompiler()
214+
return cc + ['-emit-llvm'] + self.getBitcodeGenerationFlags()
212215

213216
def getCompiler(self):
214217
if self.mode == "wllvm++":

0 commit comments

Comments
 (0)