File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3939 CIBW_MANYLINUX_X86_64_IMAGE : manylinux1
4040 CIBW_MANYLINUX_I686_IMAGE : manylinux1
4141 CIBW_BEFORE_BUILD : pip install numpy==1.15
42+ MPL_DISABLE_FH4 : " yes"
4243
4344 - name : Build wheels for CPython 3.6
4445 run : |
4849 CIBW_MANYLINUX_X86_64_IMAGE : manylinux1
4950 CIBW_MANYLINUX_I686_IMAGE : manylinux1
5051 CIBW_BEFORE_BUILD : pip install numpy==1.15
52+ MPL_DISABLE_FH4 : " yes"
5153 if : >
5254 startsWith(github.ref, 'refs/heads/v3.3') ||
5355 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):
169169 self .compiler .compiler_so .remove ('-Wstrict-prototypes' )
170170 except (ValueError , AttributeError ):
171171 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-' )
172180
173181 env = self .add_optimization_flags ()
174182 for package in good_packages :
You can’t perform that action at this time.
0 commit comments