mirror of
https://github.com/php-win-ext/grpc.git
synced 2026-04-27 11:03:43 +02:00
ea16833187
This PR makes necessary changes to Python build scripts for C++17 support, which were missed in #37919 - Fixed handling of C and C++ standard options for MSVC. - Previously, a workaround relied on a specific method, `_compiler` found in the compiler class. [unixcompiler](https://github.com/pypa/distutils/blob/ff11eed0c36b35bd68615a8ebf36763b7c8a6f28/distutils/unixccompiler.py#L191) has it but [msvccompiler](https://github.com/pypa/distutils/blob/ff11eed0c36b35bd68615a8ebf36763b7c8a6f28/distutils/_msvccompiler.py#L367) doesn't. Therefore this won't work for MSVC even though it's supposed to work across all compilers. - To resolve this, a new workaround has been implemented. This involves adding logic directly into the `_commandfile_spawn` function, which is considered the most suitable location for this fix. Although not ideal, this ensures that C and C++ standard options are managed correctly for MSVC. - Removed `compiler_ok_with_extra_std function` as isolating C and C++ standard options is always recommended. - Updated comments to correctly refer to C++17. Closes #38410 PiperOrigin-RevId: 713442384