File tree Expand file tree Collapse file tree 4 files changed +26
-5
lines changed Expand file tree Collapse file tree 4 files changed +26
-5
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ dist: clean
35
35
# publish: dist
36
36
# python setup.py sdist upload
37
37
38
- publish :
38
+ publish : dist
39
39
python3 -m twine upload dist/*
40
40
41
41
Original file line number Diff line number Diff line change @@ -251,6 +251,14 @@ cross-compiling you must ensure to use the appropriate `objcopy` for the target
251
251
architecture. The ` BINUTILS_TARGET_PREFIX ` environment variable can be used to
252
252
set the objcopy of choice, for example, ` arm-linux-gnueabihf ` .
253
253
254
+ LTO Support
255
+ -----------
256
+
257
+ In some situations it is desirable to pass certain flags to clang in the step that
258
+ produces the bitcode. This can be fulfilled by setting the
259
+ ` LLVM_BITCODE_GENERATION_FLAGS ` environment variable to the desired
260
+ flags, for example ` "-flto -fwhole-program-vtables" ` .
261
+
254
262
Debugging
255
263
---------
256
264
Original file line number Diff line number Diff line change @@ -200,9 +200,18 @@ def getCommand(self):
200
200
201
201
202
202
class ClangBuilder (BuilderBase ):
203
+
204
+ def getBitcodeGenerationFlags (self ):
205
+ # iam: If the environment variable LLVM_BITCODE_GENERATION_FLAGS is set we will add them to the
206
+ # bitcode generation step
207
+ bitcodeFLAGS = os .getenv ('LLVM_BITCODE_GENERATION_FLAGS' )
208
+ if bitcodeFLAGS :
209
+ return bitcodeFLAGS .split ()
210
+ return []
211
+
203
212
def getBitcodeCompiler (self ):
204
213
cc = self .getCompiler ()
205
- return cc + ['-emit-llvm' ]
214
+ return cc + ['-emit-llvm' ] + self . getBitcodeGenerationFlags ()
206
215
207
216
def getCompiler (self ):
208
217
if self .mode == "wllvm++" :
Original file line number Diff line number Diff line change 74
74
75
75
1.2.5 - 4/17/2019 Fixing the pip package, hopefully.
76
76
77
- 1.2.6 - 6/18/2019 Various compiler cmd line options parsing tweaks."
77
+ 1.2.6 - 6/18/2019 Various compiler cmd line options parsing tweaks.
78
+
79
+ 1.2.7 - 3/23/2020 Added the LLVM_BITCODE_GENERATION_FLAGS to allow LTO support.
80
+
81
+ 1.2.8 - 3/23/2020 Added the LLVM_BITCODE_GENERATION_FLAGS to allow LTO support. (pip uploading issues)
78
82
"""
79
83
80
- wllvm_version = '1.2.6 '
81
- wllvm_date = 'June 18 2019 '
84
+ wllvm_version = '1.2.8 '
85
+ wllvm_date = 'March 23 2020 '
You can’t perform that action at this time.
0 commit comments