Skip to content

Commit 62ae6c0

Browse files
committed
Disable FH4 so that we don't require VCRUNTIME140_1.dll.
For more details, see: https://devblogs.microsoft.com/cppblog/making-cpp-exception-handling-smaller-x64/ pypa/cibuildwheel#423 (comment)
1 parent bd6f39b commit 62ae6c0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

setup.py

+6
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,12 @@ def build_extensions(self):
169169
self.compiler.compiler_so.remove('-Wstrict-prototypes')
170170
except (ValueError, AttributeError):
171171
pass
172+
if sys.platform == 'win32':
173+
# Disable FH4 so that we don't require VCRUNTIME140_1.dll. For more
174+
# details, see:
175+
# https://devblogs.microsoft.com/cppblog/making-cpp-exception-handling-smaller-x64/
176+
# https://github.com/joerick/cibuildwheel/issues/423#issuecomment-677763904
177+
self.compiler.compiler_so.append('/d2FH4-')
172178

173179
env = self.add_optimization_flags()
174180
for package in good_packages:

0 commit comments

Comments
 (0)