summaryrefslogtreecommitdiffstats
path: root/SCons/Tool/MSCommon/MSVC/ScriptArguments.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix bug in Config.py initialization and rework support for ↵Joseph Brill2024-05-281-0/+8
| | | | | | | | | | | MsvcQueryVersionToolsetTests. Changes: * module-level initialization index was not renamed from vc_version to msvc_version. * Add function to return toolset sxs map and versions list in ScriptArguments.py * Add additional fields to extended version components * Add data structure for installed vcs versions/toolsets for testing * Update vcTests.py to new data structure.
* Fix issue #4543: Add support for msvc toolset versions 14.4x for msvc ↵Joseph Brill2024-05-271-57/+78
| | | | | | | | | buildtools v143. Changes: * Add msvc build series data structure. * Change msvc build tools data structure to contain list of build series. * Update script argument validation and tests.
* MSVC: detection fixes and changesJoseph Brill2023-09-081-5/+47
| | | | | | | | | | | | | | | | Changes: * VS/VC roots are classified by their installed features (e.g, devenv.com, vcexpress.com, etc.). This provides for special-case verification of batch file arguments based on the internal classification. * Consistent with earlier behavior, express versions are used for the non-express msvc version symbol for 14.1 and 8.0 when the express version is the only version installed. * There is a strong possibility that 14.0Exp may not have been detected correctly. It appears that registry keys for earlier versions of msvc are not populated. Refined detection of 14.0Exp was added. * Special case handling of VS2015 BuildTools was added. The msvc batch files restrict the arguments available as compared to full versions. The arguments may be accepted and ignored possibly resulting in build failures that are likely not easy to diagnose. * Special case handling og VS2015 Express was added. The msvc batch files restrict the arguments available as compared to full versions. For example, store/UWP build are only available for x86 targets. * Windows/Platform SDK installations of 7.1, 7.0, and 6.1 populate registry keys and installation folders that were detected by scons (versions 10.0 and 9.0). Unfortunately, the generated files are intended to be used via SetEnv.cmd and result in errors. The detection of sdk-only installations was added and the roots are ignored. * The relative imports of the MSCommon module were changed to top-level absolute imports in a number of microsoft tools. Moving any of the tools to the site tools folder failed on import (i.e., the relative paths become invalid when moved). * VS2005 to VS2015 vcvarsall.bat dispatches to a dependent batch file when configuring the msvc environment. In certain installation scenarios, the dependent batch file (e.g., vcvars64.bat) may not exist. The existence of vcvarsall.bat, the dependent batch file, and the compiler executable are now verified. * MSVC configuration data specific to versions VS2005 to VS2008 was added as the dependent batch files have different names than the batch files for VS2010 and later. VC++ For Python is handled as a special case as the dependent batch files: are not used and are in different locations. * When VC++ For Python is installed using the ALLUSERS=1 command-line option, the registry keys written are under HKLM rather than HKCU. VC++ For Python installed for all users is now correctly detected. * The existing detection configuration for vswhere and the registry was refactored to separate the two methods of detection. * The detection of the msvc compiler executable has been modified and no longer considers the os environment. The detection of the msvc compiler executable was modified to provide more detailed warning messages.
* More conversions: {repr(var)} -> {var!r}Mats Wichmann2023-08-041-2/+2
| | | | | | | Some of these got done in the tool conversion, some not, so picked up the rest manually. Signed-off-by: Mats Wichmann <mats@linux.com>
* "Modernize" to Python 3.6 via toolMats Wichmann2023-08-041-12/+12
| | | | | | | | | | | | | | | | | | | | | $ pyupgrade --py36-plus $(<filelist) Here's mostly what it's done: - No more 'stringliteral'.encode('utf-8'): now b'stringliteral' - No more unicode literals - the default open mode is 'r', leaves out if default - some f-string conversions (if shorter) - catch OSError instead of subclasses - no more mention of "object" - generator expression instead of list comp. when safe - a few tests had a shebang but actually began with blank line - remove coding: utf-8 comment, per pep 3120 this is the default now Manually - if a file in test/ was modified, then did the copyright header conversion. Signed-off-by: Mats Wichmann <mats@linux.com>
* Add some cheap return and parameter annotationsMats Wichmann2023-05-011-11/+11
| | | | | | | | | | | | | | | | | Use: https://github.com/JelleZijlstra/autotyping to add "safe" return annotations. Where a parameter has a default value that is an obvious scalar type (bool, int, str, etc.) add those annotations as well. Also fixed two small bugs that popped up when sanity-checking with mypy. One in FortranCommon, where a return had been previously annotated to be a tuple of Action, which should be ActionBase - Action is the factory function, not the base class. The other was a typo in the error raised in _add_cppdefines - the message was formatted with the value of "define" which should have been "defines". Signed-off-by: Mats Wichmann <mats@linux.com>
* Minor tweaks for readability and consistency.Joseph Brill2022-07-181-6/+9
|
* Add special case for msvc 14.0 and store/uwp specified via script args and ↵Joseph Brill2022-07-181-20/+24
| | | | sdk specified via construction variable or forced. Revise forced default toolset handling (may have passed default toolset as an argument inadvertently). Add more tests.
* Add function to return toolsets with spectre libs folder (target may not be ↵Joseph Brill2022-07-171-1/+22
| | | | installed). Add additional tests.
* Return previous policy when setting default argument policy. Add more tests.Joseph Brill2022-07-161-4/+5
|
* Rework special case for 9.0 VCForPython handling (vc dir and batchfile ↵Joseph Brill2022-07-141-0/+7
| | | | location). Add additional tests.
* Move toolset version regexes to utility module. Rename default version method.Joseph Brill2022-07-091-33/+15
|
* Rework version convenience functions. Add additional tests.Joseph Brill2022-07-091-2/+4
|
* Add msvc script error global policy and construction variable. Move msvc not ↵Joseph Brill2022-07-051-64/+109
| | | | found policy and msvc script error policy to Policy.py. Rework vcvars bugfix handling for SxS toolset 14.28. Add method to return msvc toolsets. Add experimental function to return msvc version and msvc toolset version given a version specification (proxy for selection). Add API.py to manage symbols imported in vc.py. Update documentation.
* Fix Util.py docstring for listdir_dirs. Minor update to reading sxs ↵Joseph Brill2022-06-301-32/+32
| | | | toolsets and toolset folders.
* Add 14.0 toolset registry check as done in msvc vsvars140.bat.Joseph Brill2022-06-291-1/+18
|
* Use msvc version prefix instead of version prefix for internal dictionary ↵Joseph Brill2022-06-291-1/+1
| | | | lookup.
* Fix sider issue.Joseph Brill2022-06-281-1/+1
|
* Additional validation for MSVC_SDK_VERSION and MSVC_SPECTRE_LIBS. Adjust ↵Joseph Brill2022-06-281-58/+204
| | | | documentation. Add additional exceptions for SDK version not found, toolset version not found, and spectre libraries not found. Add data structure for platform type.
* Rework SxS toolset version support and vcvars bug fix handling. Update ↵Joseph Brill2022-06-271-18/+63
| | | | MSVC_TOOLSET_VERSION documentation.
* Reorder function declarationsJoseph Brill2022-06-221-23/+23
|
* Move SCONS_CACHE_MSVC_FORCE_DEFAULTS environment variable query to MSCommon ↵Joseph Brill2022-06-211-11/+7
| | | | and set boolean if active.
* Consider MSVC_TOOLSET_VERSION specification intent to use msvc tools. ↵Joseph Brill2022-06-211-4/+5
| | | | Update boolean symbols accepted for uwp and spectre.
* Add internal, undocumented SCONS_CACHE_MSVC_FORCE_DEFAULTS environment ↵Joseph Brill2022-06-211-0/+22
| | | | variable to force default SDK and toolset arguments.
* Suppress sider imported but unused for namespace. Restrict MSVC_UWP_APP ↵Joseph Brill2022-06-211-5/+8
| | | | boolean symbols accepted.
* Add global for cache reset (classmethod to module omission) and remove ↵Joseph Brill2022-06-211-0/+2
| | | | duplicate import
* Cleanup MSCommon/vc imports and move Dispatcher imports and registrationJoseph Brill2022-06-201-1/+2
|
* Refactor recent portions of vc.py into MSVC moduleJoseph Brill2022-06-201-0/+733