From 57d41fe06d82edd35126f8acf7ba6a97561dd319 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 9 Aug 2024 21:14:05 -0400 Subject: [PATCH] Stop disabling FH4 Exception Handling on MSVC As of #28687, our extensions depend on `VCRUNTIME140_1.dll`, and this was allowed because Python 3.8+ started shipping that file. The original report in #18292 was for Python 3.7, which didn't ship the DLL, but we require Python 3.10 now, so it's safe again. Since we can use that dependency, there's no need to disable the option that started requiring it in the first place. As noted in the original blog post [1], this will make our extensions smaller, and slightly faster. [1] https://devblogs.microsoft.com/cppblog/making-cpp-exception-handling-smaller-x64/ --- src/meson.build | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/meson.build b/src/meson.build index bbef93c13d92..a046b3306ab8 100644 --- a/src/meson.build +++ b/src/meson.build @@ -160,21 +160,12 @@ extension_data = { }, } -cpp_special_arguments = [] -if cpp.get_id() == 'msvc' and get_option('buildtype') != 'plain' - # Disable FH4 Exception Handling implementation so that we don't require - # VCRUNTIME140_1.dll. For more details, see: - # https://devblogs.microsoft.com/cppblog/making-cpp-exception-handling-smaller-x64/ - # https://github.com/joerick/cibuildwheel/issues/423#issuecomment-677763904 - cpp_special_arguments += ['/d2FH4-'] -endif - foreach ext, kwargs : extension_data # Ensure that PY_ARRAY_UNIQUE_SYMBOL is uniquely defined for each extension. unique_array_api = '-DPY_ARRAY_UNIQUE_SYMBOL=MPL_@0@_ARRAY_API'.format(ext.replace('.', '_')) additions = { 'c_args': [unique_array_api] + kwargs.get('c_args', []), - 'cpp_args': cpp_special_arguments + [unique_array_api] + kwargs.get('cpp_args', []), + 'cpp_args': [unique_array_api] + kwargs.get('cpp_args', []), } py3.extension_module( ext, pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy