-
-
Notifications
You must be signed in to change notification settings - Fork 315
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
Fix 4312 and add Windows on ARM64 support for msvc. #4324
Conversation
Changes for SCons#4312: * The installed VCS list is cached but has an indirect dependency on the value of the environment's TARGET_ARCH during construction. For the initial construction, force the env['TARGET_ARCH'] to be undefined and then restore the value after construction. * Protect against an empty regular expression list when iteratively removing default tool sequences. Changes for ARM64 host support: * Add configuration data structures to support ARM64 hosts and ARM64 native tools for VS2022. Update the tests for the renamed data structures. * Evaluate the PROCESSOR_ARCHITECTURE value from the windows registry before evaluating the os environment values for host architecture determination on Windows. * Set VSCMD_SKIP_SENDTELEMETRY=1 for arm32 process on arm64 host if not already defined to prevent powershell dll not found error. * The os environment variable value for PROCESSOR_ARCHITECTURE is AMD64 for Windows ARM64 hosts when using a python built for AMD64. Related MSVC changes for SCons#4312 and ARM64 hosts: * Check that cl.exe exists in find_batch_file for VS6 to VS2015. Move the sdk batch file query code to its own function. Query for the sdk batch file only when all of the vc script host/target combinations have been exhausted and a valid script has not been found. * Hoist the query for the vc product directory outside the current vc script host/target loop. Catch the internal exceptions as before. * Clear the sdk batch file path for VCForPython as the sdk batch files do not appear to be updated during installation and do not point to the VCForPython installation location. * Move the sdk batch file determination to its own function. Defer evaluation of candidate sdk batch files until after all host/target combinations of the vc scripts have been evaluated. * Always check that cl.exe is found in vc script environment path. Miscellaneous: * Reorder and group exception definitions in Tool\MSCommon\vc.py by external exceptions and internal exceptions. * Adjust debug messages. * Convert the floating point msvc version to an integer version number for product range comparisons (e.g., 14.3 is 143). Adjust the comparison ranges accordingly.
…dule reset when debug logging is enabled.
Test EnvironmentsTest Env 1 - Windows 10 Pro on AMD64 [AMD Ryzen Threadripper 3960X, 64GB]
Test Env 2 - Windows 11 Pro on ARM64 [Snapdragon 7c, 8GB]
Test Env 3 - Windows 10 Pro on AMD64 [VMWare, 4GB]
Micellaneous NotesARM64Native ARM64 tools only exist for the
Stress TestsFor stress testing, the number of combinations takes into account:
|
…er to be consistent with the current documentation of MSVS_ARCH. Update the documentation for HOST_ARCH.
Perhaps an Last AppVeyor job failure:
No additional work for this PR is planned. |
We'll try to get some kind of look at this, thanks for the efforts! |
@mwichmann I need to review the MSVC/MSVS tests. It appears that the host architecture is used in some of the tests. ARM64 likely needs to be added to tests that use a dictionary to re-map to a canonical host. In addition, the registry probably should be queried due to amd64 builds of python on arm64 have an environment PROCESSOR_ARCHITECTURE of amd64 rather than arm64. |
First query the windows registry for the processor architecture and then fallback to the platform machine architecture. The platform.machine() architecture return value for an amd64 build of python (3.6.8) on arm64 is amd64. Update the _ARCH_TO_CANONICAL dictionary from Tool\MSCommon\vc.py.
Update The boy who cried "Wolf!" says that no additional work is planned ... again. |
Manually resolve conflicts in CHANGES.txt.
@jcbrill - can you resolve the conflict with (Sorry for the delay in reviewing. March was consumed by locusts.. ;) |
Manually resolve conflicts: * SCons/Tool/MSCommon/common.py
I hate it when that happens. Conflicts resolved but there may be "missing" autotyping annotations for the new/modified code. |
Don't worry about missings, I'll sweep through and get at least the "cheap" ones at some point after we get this merged (they were done by a tool). |
Manually resolve conflicts in CHANGES.txt and RELEASE.txt.
Manually resolve conflicts in RELEASE.txt.
@jcbrill - finally got back to this. Added a few questions. I think once you get a chance to answer them, should be able to merge fairly quickly. Thanks for your patience! |
No worries! Any and all questions are welcome. |
Changes for #4312:
Changes for ARM64 host support:
Related MSVC changes for #4312 and ARM64 hosts:
Miscellaneous:
MSVS_ARCH
.Known issues;
test\Configure\config-h.py
fails on non-AMD64 hosts with the default VS2015+ target architecture. Theprintf
function is exported only from the AMD64 libraries used for the test. This test fails on both x86 and ARM64 hosts with VS2015 and later installed.See MSVC: Configure test failure on non-AMD64 hosts with default VS 2015+ target architecture #4320 for details.
Contributor Checklist:
CHANGES.txt
(and read theREADME.rst
)RELEASE.txt