File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 39
39
CIBW_MANYLINUX_X86_64_IMAGE : manylinux1
40
40
CIBW_MANYLINUX_I686_IMAGE : manylinux1
41
41
CIBW_BEFORE_BUILD : pip install numpy==1.15
42
+ MPL_DISABLE_FH4 : " yes"
42
43
43
44
- name : Build wheels for CPython 3.6
44
45
run : |
48
49
CIBW_MANYLINUX_X86_64_IMAGE : manylinux1
49
50
CIBW_MANYLINUX_I686_IMAGE : manylinux1
50
51
CIBW_BEFORE_BUILD : pip install numpy==1.15
52
+ MPL_DISABLE_FH4 : " yes"
51
53
if : >
52
54
startsWith(github.ref, 'refs/heads/v3.3') ||
53
55
startsWith(github.ref, 'refs/tags/v3.3')
Original file line number Diff line number Diff line change @@ -169,6 +169,14 @@ def build_extensions(self):
169
169
self .compiler .compiler_so .remove ('-Wstrict-prototypes' )
170
170
except (ValueError , AttributeError ):
171
171
pass
172
+ if (self .compiler .compiler_type == 'msvc' and
173
+ os .environ .get ('MPL_DISABLE_FH4' )):
174
+ # Disable FH4 Exception Handling implementation so that we don't
175
+ # require VCRUNTIME140_1.dll. For more details, see:
176
+ # https://devblogs.microsoft.com/cppblog/making-cpp-exception-handling-smaller-x64/
177
+ # https://github.com/joerick/cibuildwheel/issues/423#issuecomment-677763904
178
+ for ext in self .extensions :
179
+ ext .extra_compile_args .append ('/d2FH4-' )
172
180
173
181
env = self .add_optimization_flags ()
174
182
for package in good_packages :
You can’t perform that action at this time.
0 commit comments