Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added some more Microsoft compilers to Lib/distutils and a fix to adjust the majorVersion for VS2015 #120

Merged
merged 2 commits into from
Sep 3, 2019

Conversation

arizvisa
Copy link
Contributor

@arizvisa arizvisa commented Sep 1, 2019

As per https://bugs.python.org/issue35172:

Distutils makes a few incorrect assumptions that prevent it from supporting the newer Microsoft-y C compilers. This patch fixes it up till MSVC 14.0. There are 2 assumptions that are made by distutils and they are as follows.

The first one is that MSVC's versions scale linearly (subtracting 6). This assumption breaks when encountering major version 13.0 as VS2013 (12.0) uses 1800 and VS2015 (14.0) uses 1900 and so the calculation for version 13.0 does not actually exist. This was fixed in the patch for both msvc9compiler.py and msvccompiler.py by skipping the major version 13.

The second assumption is in the get_msvcr() function in cygwinccompiler.py and is responsible for identifying the CRT name. The newer versions of MSVC aren't listed, so these were added in the patch. However, for version 1900 (MSVC 14.0) the crt is now named "vcruntime140" which was included. It might be better to to make this table-based if there is long-term interest in supporting these other compilers.

…me missing symbols in timemodule.c, and re-implements _PyVerify_fd in posixmodule.c so that it validates the handle/fd.
@stefantalpalaru stefantalpalaru merged commit 14f4193 into naftaliharris:master Sep 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants