llvmlite
llvmlite copied to clipboard
Add MSVC `-GL` workaround
On windows, HEAD is suffering from a segfault problem when running the testsuite. The problem is associated with the use of -GL flag on MSVC. The flag enables whole-program optimization. I cannot find any mentioning of this issue on LLVM issue tracker.
The patch simply discard -GL from CFLAGS and CXXFLAGS. These environment variables can be set by user or build system (e.g. conda-build).
an ipython reproducer
!python -m llvmlite.tests -vb
ct = 0
while _exit_code == 0:
!python -m llvmlite.tests -vb
ct += 1
print("count", ct)
This loops until it fails because it may takes several trial to reproduce. Usually within 3 runs.
BFID: llvmlite_310