summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Madden <jamadden@gmail.com>2022-10-30 07:24:11 -0500
committerJason Madden <jamadden@gmail.com>2022-10-30 07:24:11 -0500
commita0a6d5bfc129c5ccaaf21c4100802ff53293ac5d (patch)
tree9ac843d59c88154696e20d82f02f982cb7966887
parent6c47fbe9aa0ffd6379e18a8e8be0104c0542834e (diff)
downloadgreenlet-a0a6d5bfc129c5ccaaf21c4100802ff53293ac5d.tar.gz
win32 compiler: don't assume C functions cannot throw.
-rwxr-xr-xsetup.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index 0c1d9ad..4c2e728 100755
--- a/setup.py
+++ b/setup.py
@@ -51,10 +51,13 @@ elif is_win and "MSC" in platform.python_compiler():
# OR
# "a" == standard C++, and Windows SEH; anything may throw, compiler optimizations
# around try blocks are less aggressive.
- # /EHsc is suggested, as /EHa isn't supposed to be linked to other things not built
- # with it.
+ # /EHsc is suggested, and /EHa isn't supposed to be linked to other things not built
+ # with it. Leaving off the "c" should just result in slower, safer code.
+ # Other options:
+ # "r" == Always generate standard confirming checks for noexcept blocks, terminating
+ # if violated.
# See https://docs.microsoft.com/en-us/cpp/build/reference/eh-exception-handling-model?view=msvc-160
- handler = "/EHsc"
+ handler = "/EHsr"
cpp_compile_args.append(handler)
# To disable most optimizations:
#cpp_compile_args.append('/Od')