Skip to content

Commit 4130840

Browse files
committed
Update MSCommon/README.rst formatting.
1 parent bafae30 commit 4130840

File tree

1 file changed

+99
-126
lines changed

1 file changed

+99
-126
lines changed

SCons/Tool/MSCommon/README.rst

Lines changed: 99 additions & 126 deletions
Original file line numberDiff line numberDiff line change
@@ -33,55 +33,37 @@ MSVC Detection Priority
3333
For msvc version specifications without an 'Exp' suffix, an express
3434
installation is used only when no other installation is detected.
3535

36-
======= ======= ========================================================
37-
Product VCVer Priority
38-
======= ======= ========================================================
39-
VS2022 14.3 Enterprise, Professional, Community, BuildTools
40-
------- ------- --------------------------------------------------------
41-
VS2019 14.2 Enterprise, Professional, Community, BuildTools
42-
------- ------- --------------------------------------------------------
43-
VS2017 14.1 Enterprise, Professional, Community, BuildTools, Express
44-
------- ------- --------------------------------------------------------
45-
VS2017 14.1Exp Express
46-
------- ------- --------------------------------------------------------
47-
VS2015 14.0 [Develop, BuildTools, CmdLine], Express
48-
------- ------- --------------------------------------------------------
49-
VS2015 14.0Exp Express
50-
------- ------- --------------------------------------------------------
51-
VS2013 12.0 Develop, Express
52-
------- ------- --------------------------------------------------------
53-
VS2013 12.0Exp Express
54-
------- ------- --------------------------------------------------------
55-
VS2012 11.0 Develop, Express
56-
------- ------- --------------------------------------------------------
57-
VS2012 11.0Exp Express
58-
------- ------- --------------------------------------------------------
59-
VS2010 10.0 Develop, Express
60-
------- ------- --------------------------------------------------------
61-
VS2010 10.0Exp Express
62-
------- ------- --------------------------------------------------------
63-
VS2008 9.0 Develop, VCForPython, Express
64-
------- ------- --------------------------------------------------------
65-
VS2008 9.0Exp Express
66-
------- ------- --------------------------------------------------------
67-
VS2005 8.0 Develop, Express
68-
------- ------- --------------------------------------------------------
69-
VS2005 8.0Exp Express
70-
------- ------- --------------------------------------------------------
71-
VS2003 7.1 Develop
72-
------- ------- --------------------------------------------------------
73-
VS2002 7.0 Develop
74-
------- ------- --------------------------------------------------------
75-
VS6.0 6.0 Develop
76-
======= ======= ========================================================
36+
======= ======= ========================================================
37+
Product VCVer Priority
38+
======= ======= ========================================================
39+
VS2022 14.3 Enterprise, Professional, Community, BuildTools
40+
VS2019 14.2 Enterprise, Professional, Community, BuildTools
41+
VS2017 14.1 Enterprise, Professional, Community, BuildTools, Express
42+
VS2017 14.1Exp Express
43+
VS2015 14.0 [Develop, BuildTools, CmdLine], Express
44+
VS2015 14.0Exp Express
45+
VS2013 12.0 Develop, Express
46+
VS2013 12.0Exp Express
47+
VS2012 11.0 Develop, Express
48+
VS2012 11.0Exp Express
49+
VS2010 10.0 Develop, Express
50+
VS2010 10.0Exp Express
51+
VS2008 9.0 Develop, VCForPython, Express
52+
VS2008 9.0Exp Express
53+
VS2005 8.0 Develop, Express
54+
VS2005 8.0Exp Express
55+
VS2003 7.1 Develop
56+
VS2002 7.0 Develop
57+
VS6.0 6.0 Develop
58+
======= ======= ========================================================
7759

7860
Legend:
7961

8062
Develop
81-
devenv.com (or msdev.com) is detected.
63+
devenv.com or msdev.com is detected.
8264

8365
Express
84-
WDExpress.exe (or VCExpress.exe) is detected.
66+
WDExpress.exe or VCExpress.exe is detected.
8567

8668
BuildTools [VS2015]
8769
The vcvarsall batch file dispatches to the buildtools batch file.
@@ -104,7 +86,9 @@ and/or linker build failures.
10486

10587
The VS2015 BuildTools ``vcvarsall.bat`` batch file dispatches to the stand-alone buildtools
10688
batch file under certain circumstances. A fragment from the vcvarsall batch file is:
89+
10790
::
91+
10892
if exist "%~dp0..\common7\IDE\devenv.exe" goto setup_VS
10993
if exist "%~dp0..\common7\IDE\wdexpress.exe" goto setup_VS
11094
if exist "%~dp0..\..\Microsoft Visual C++ Build Tools\vcbuildtools.bat" goto setup_buildsku
@@ -135,15 +119,19 @@ As installed, VS2015 Express does not support the ``store`` argument for the ``a
135119
architecture. The generated ``store`` library paths include directories that do not exist.
136120

137121
The store library paths appear in two places in the ``vcvarsx86_amd64`` batch file:
122+
138123
::
124+
139125
:setstorelib
140126
@if exist "%VCINSTALLDIR%LIB\amd64\store" set LIB=%VCINSTALLDIR%LIB\amd64\store;%LIB%
141127
...
142128
:setstorelibpath
143129
@if exist "%VCINSTALLDIR%LIB\amd64\store" set LIBPATH=%VCINSTALLDIR%LIB\amd64\store;%LIBPATH%
144130

145131
The correct store library paths would be:
132+
146133
::
134+
147135
:setstorelib
148136
@if exist "%VCINSTALLDIR%LIB\store\amd64" set LIB=%VCINSTALLDIR%LIB\store\amd64;%LIB%
149137
...
@@ -157,15 +145,19 @@ As installed, VS2015 Express does not support the ``store`` argument for the ``a
157145
architecture. The generated ``store`` library paths include directories that do not exist.
158146

159147
The store library paths appear in two places in the ``vcvarsx86_arm`` batch file:
148+
160149
::
150+
161151
:setstorelib
162152
@if exist "%VCINSTALLDIR%LIB\ARM\store" set LIB=%VCINSTALLDIR%LIB\ARM\store;%LIB%
163153
...
164154
:setstorelibpath
165155
@if exist "%VCINSTALLDIR%LIB\ARM\store" set LIBPATH=%VCINSTALLDIR%LIB\ARM\store;%LIBPATH%
166156

167157
The correct store library paths would be file:
158+
168159
::
160+
169161
:setstorelib
170162
@if exist "%VCINSTALLDIR%LIB\store\ARM" set LIB=%VCINSTALLDIR%LIB\store\ARM;%LIB%
171163
...
@@ -208,6 +200,7 @@ returns the msvc version and the msvc toolset version for the corresponding vers
208200
This is a proxy for using the toolset version for selection until that functionality can be added.
209201

210202
Example usage:
203+
211204
::
212205

213206
for version in [
@@ -240,6 +233,7 @@ Example usage:
240233
print('{}Query: {} version={}, prefer_newest={}'.format(newline, msg, version, prefer_newest))
241234

242235
Example output fragment
236+
243237
::
244238

245239
Build: _build003 {'MSVC_VERSION': '14.3', 'MSVC_TOOLSET_VERSION': '14.29.30133'}
@@ -267,6 +261,7 @@ added to the batch file argument list. This is intended to make the cache more
267261
updates that may change the default toolset version and/or the default SDK version.
268262

269263
Example usage:
264+
270265
::
271266

272267
@echo Enabling scons cache ...
@@ -289,13 +284,15 @@ Enabling warnings to be produced for detected msvc batch file errors may provide
289284
for build failures. Refer to the documentation for details.
290285

291286
Change the default policy:
287+
292288
::
293289

294290
from SCons.Tool.MSCommon import msvc_set_scripterror_policy
295291

296292
msvc_set_scripterror_policy('Warning')
297293

298294
Specify the policy per-environment:
295+
299296
::
300297

301298
env = Environment(MSVC_VERSION='14.3', MSVC_SPECTRE_LIBS=True, MSVC_SCRIPTERROR_POLICY='Warning')
@@ -321,6 +318,7 @@ On occasion, the raw vswhere output may prove useful especially if there are sus
321318
detection of installed msvc instances.
322319

323320
Windows command-line sample invocations:
321+
324322
::
325323

326324
@rem 64-Bit Windows
@@ -338,35 +336,29 @@ Batch File Arguments
338336

339337
Supported MSVC batch file arguments by product:
340338

341-
======= ======= ====== ======= =======
342-
Product UWP SDK Toolset Spectre
343-
======= ======= ====== ======= =======
344-
VS2022 X X X X
345-
------- ------- ------ ------- -------
346-
VS2019 X X X X
347-
------- ------- ------ ------- -------
348-
VS2017 X X X X
349-
------- ------- ------ ------- -------
350-
VS2015 X [1]_ X [2]_
351-
======= ======= ====== ======= =======
339+
======== ======= ======= ======== =======
340+
Product UWP SDK Toolset Spectre
341+
======== ======= ======= ======== =======
342+
VS2022 X X X X
343+
VS2019 X X X X
344+
VS2017 X X X X
345+
VS2015 X [1]_ X [2]_
346+
======== ======= ======= ======== =======
352347

353348
.. [1] The BuildTools edition does not support the ``store`` argument. The Express edition
354349
supports the ``store`` argument for the ``x86`` target only.
355350
.. [2] The ``sdk version`` argument is not supported in the BuildTools and Express editions.
356351
357352
Supported MSVC batch file arguments in SCons:
358353

359-
======== ====================================== ===================================================
360-
Argument Construction Variable Script Argument Equivalent
361-
======== ====================================== ===================================================
362-
UWP ``MSVC_UWP_APP=True`` ``MSVC_SCRIPT_ARGS='store'``
363-
-------- -------------------------------------- ---------------------------------------------------
364-
SDK ``MSVC_SDK_VERSION='10.0.20348.0'`` ``MSVC_SCRIPT_ARGS='10.0.20348.0'``
365-
-------- -------------------------------------- ---------------------------------------------------
366-
Toolset ``MSVC_TOOLSET_VERSION='14.31.31103'`` ``MSVC_SCRIPT_ARGS='-vcvars_ver=14.31.31103'``
367-
-------- -------------------------------------- ---------------------------------------------------
368-
Spectre ``MSVC_SPECTRE_LIBS=True`` ``MSVC_SCRIPT_ARGS='-vcvars_spectre_libs=spectre'``
369-
======== ====================================== ===================================================
354+
======== ====================================== ===================================================
355+
Argument Construction Variable Script Argument Equivalent
356+
======== ====================================== ===================================================
357+
UWP ``MSVC_UWP_APP=True`` ``MSVC_SCRIPT_ARGS='store'``
358+
SDK ``MSVC_SDK_VERSION='10.0.20348.0'`` ``MSVC_SCRIPT_ARGS='10.0.20348.0'``
359+
Toolset ``MSVC_TOOLSET_VERSION='14.31.31103'`` ``MSVC_SCRIPT_ARGS='-vcvars_ver=14.31.31103'``
360+
Spectre ``MSVC_SPECTRE_LIBS=True`` ``MSVC_SCRIPT_ARGS='-vcvars_spectre_libs=spectre'``
361+
======== ====================================== ===================================================
370362

371363
**MSVC_SCRIPT_ARGS contents are not validated. Utilizing script arguments that have construction
372364
variable equivalents is discouraged and may lead to difficult to diagnose build errors.**
@@ -398,6 +390,7 @@ that the msvc batch files would return. When using ``MSVC_SCRIPT_ARGS``, the
398390
toolset specification should be omitted entirely.
399391

400392
Local installation and summary test results:
393+
401394
::
402395

403396
VS2022\VC\Auxiliary\Build\Microsoft.VCToolsVersion.v143.default.txt
@@ -407,6 +400,7 @@ Local installation and summary test results:
407400
14.32.31326
408401

409402
Toolset version summary:
403+
410404
::
411405

412406
14.31.31103 Environment()
@@ -422,6 +416,7 @@ Toolset version summary:
422416
14.32.31326 Environment(MSVC_SCRIPT_ARGS=['-vcvars_ver=14.32'])
423417

424418
VS2022\\Common7\\Tools\\vsdevcmd\\ext\\vcvars.bat usage fragment:
419+
425420
::
426421

427422
@echo -vcvars_ver=version : Version of VC++ Toolset to select
@@ -443,6 +438,7 @@ VS2022\\Common7\\Tools\\vsdevcmd\\ext\\vcvars.bat usage fragment:
443438
@echo SxS toolset to [VSInstallDir]\VC\MSVC\Tools\ directory.
444439

445440
VS2022 batch file fragment to determine the default toolset version:
441+
446442
::
447443

448444
@REM Add MSVC
@@ -469,13 +465,12 @@ Visual Studio Version Notes
469465
SDK Versions
470466
------------
471467

472-
==== =================
473-
SDK Format
474-
==== =================
475-
10.0 10.0.XXXXX.Y [*]_
476-
---- -----------------
477-
8.1 8.1
478-
==== =================
468+
==== =================
469+
SDK Format
470+
==== =================
471+
10.0 10.0.XXXXX.Y [*]_
472+
8.1 8.1
473+
==== =================
479474

480475
.. [*] The Windows 10 SDK version number is 10.0.20348.0 and earlier.
481476
@@ -484,64 +479,42 @@ SDK Format
484479
BuildTools Versions
485480
-------------------
486481

487-
========== ===== ===== ========
488-
BuildTools VCVER CLVER MSVCRT
489-
========== ===== ===== ========
490-
v143 14.3 19.3 140/ucrt
491-
---------- ----- ----- --------
492-
v142 14.2 19.2 140/ucrt
493-
---------- ----- ----- --------
494-
v141 14.1 19.1 140/ucrt
495-
---------- ----- ----- --------
496-
v140 14.0 19.0 140/ucrt
497-
---------- ----- ----- --------
498-
v120 12.0 18.0 120
499-
---------- ----- ----- --------
500-
v110 11.0 17.0 110
501-
---------- ----- ----- --------
502-
v100 10.0 16.0 100
503-
---------- ----- ----- --------
504-
v90 9.0 15.0 90
505-
---------- ----- ----- --------
506-
v80 8.0 14.0 80
507-
---------- ----- ----- --------
508-
v71 7.1 13.1 71
509-
---------- ----- ----- --------
510-
v70 7.0 13.0 70
511-
---------- ----- ----- --------
512-
v60 6.0 12.0 60
513-
========== ===== ===== ========
482+
========== ===== ===== ========
483+
BuildTools VCVER CLVER MSVCRT
484+
========== ===== ===== ========
485+
v143 14.3 19.3 140/ucrt
486+
v142 14.2 19.2 140/ucrt
487+
v141 14.1 19.1 140/ucrt
488+
v140 14.0 19.0 140/ucrt
489+
v120 12.0 18.0 120
490+
v110 11.0 17.0 110
491+
v100 10.0 16.0 100
492+
v90 9.0 15.0 90
493+
v80 8.0 14.0 80
494+
v71 7.1 13.1 71
495+
v70 7.0 13.0 70
496+
v60 6.0 12.0 60
497+
========== ===== ===== ========
514498

515499
Product Versions
516500
----------------
517501

518-
======== ===== ========= ======================
519-
Product VSVER SDK BuildTools
520-
======== ===== ========= ======================
521-
2022 17.0 10.0, 8.1 v143, v142, v141, v140
522-
-------- ----- --------- ----------------------
523-
2019 16.0 10.0, 8.1 v142, v141, v140
524-
-------- ----- --------- ----------------------
525-
2017 15.0 10.0, 8.1 v141, v140
526-
-------- ----- --------- ----------------------
527-
2015 14.0 10.0, 8.1 v140
528-
-------- ----- --------- ----------------------
529-
2013 12.0 v120
530-
-------- ----- --------- ----------------------
531-
2012 11.0 v110
532-
-------- ----- --------- ----------------------
533-
2010 10.0 v100
534-
-------- ----- --------- ----------------------
535-
2008 9.0 v90
536-
-------- ----- --------- ----------------------
537-
2005 8.0 v80
538-
-------- ----- --------- ----------------------
539-
2003.NET 7.1 v71
540-
-------- ----- --------- ----------------------
541-
2002.NET 7.0 v70
542-
-------- ----- --------- ----------------------
543-
6.0 6.0 v60
544-
======== ===== ========= ======================
502+
========= ====== ========== ======================
503+
Product VSVER SDK BuildTools
504+
========= ====== ========== ======================
505+
2022 17.0 10.0, 8.1 v143, v142, v141, v140
506+
2019 16.0 10.0, 8.1 v142, v141, v140
507+
2017 15.0 10.0, 8.1 v141, v140
508+
2015 14.0 10.0, 8.1 v140
509+
2013 12.0 v120
510+
2012 11.0 v110
511+
2010 10.0 v100
512+
2008 9.0 v90
513+
2005 8.0 v80
514+
2003.NET 7.1 v71
515+
2002.NET 7.0 v70
516+
6.0 6.0 v60
517+
========= ====== ========== ======================
545518

546519

547520
SCons Implementation Notes

0 commit comments

Comments
 (0)