Skip to content

Commit 13d2d5e

Browse files
committed
experimental additional flags for bitcode generation.
1 parent 0ba2815 commit 13d2d5e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

wllvm/compilers.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,13 @@ def getCommand(self):
202202
class ClangBuilder(BuilderBase):
203203
def getBitcodeCompiler(self):
204204
cc = self.getCompiler()
205-
return cc + ['-emit-llvm']
205+
retval = cc + ['-emit-llvm']
206+
# iam: If the environment variable LLVM_BITCODE_GENERATION_FLAGS is set we will add them to the
207+
# bitcode generation step
208+
bitcodeFLAGS = os.getenv('LLVM_BITCODE_GENERATION_FLAGS')
209+
if bitcodeFLAGS:
210+
retval = retval + bitcodeFLAGS.split()
211+
return retval
206212

207213
def getCompiler(self):
208214
if self.mode == "wllvm++":

0 commit comments

Comments
 (0)