@@ -33,55 +33,37 @@ MSVC Detection Priority
33
33
For msvc version specifications without an 'Exp' suffix, an express
34
34
installation is used only when no other installation is detected.
35
35
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
+ ======= ======= ========================================================
77
59
78
60
Legend:
79
61
80
62
Develop
81
- devenv.com ( or msdev.com) is detected.
63
+ devenv.com or msdev.com is detected.
82
64
83
65
Express
84
- WDExpress.exe ( or VCExpress.exe) is detected.
66
+ WDExpress.exe or VCExpress.exe is detected.
85
67
86
68
BuildTools [VS2015]
87
69
The vcvarsall batch file dispatches to the buildtools batch file.
@@ -104,7 +86,9 @@ and/or linker build failures.
104
86
105
87
The VS2015 BuildTools ``vcvarsall.bat `` batch file dispatches to the stand-alone buildtools
106
88
batch file under certain circumstances. A fragment from the vcvarsall batch file is:
89
+
107
90
::
91
+
108
92
if exist "%~dp0..\common7\IDE\devenv.exe" goto setup_VS
109
93
if exist "%~dp0..\common7\IDE\wdexpress.exe" goto setup_VS
110
94
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
135
119
architecture. The generated ``store `` library paths include directories that do not exist.
136
120
137
121
The store library paths appear in two places in the ``vcvarsx86_amd64 `` batch file:
122
+
138
123
::
124
+
139
125
:setstorelib
140
126
@if exist "%VCINSTALLDIR%LIB\amd64\store" set LIB=%VCINSTALLDIR%LIB\amd64\store;%LIB%
141
127
...
142
128
:setstorelibpath
143
129
@if exist "%VCINSTALLDIR%LIB\amd64\store" set LIBPATH=%VCINSTALLDIR%LIB\amd64\store;%LIBPATH%
144
130
145
131
The correct store library paths would be:
132
+
146
133
::
134
+
147
135
:setstorelib
148
136
@if exist "%VCINSTALLDIR%LIB\store\amd64" set LIB=%VCINSTALLDIR%LIB\store\amd64;%LIB%
149
137
...
@@ -157,15 +145,19 @@ As installed, VS2015 Express does not support the ``store`` argument for the ``a
157
145
architecture. The generated ``store `` library paths include directories that do not exist.
158
146
159
147
The store library paths appear in two places in the ``vcvarsx86_arm `` batch file:
148
+
160
149
::
150
+
161
151
:setstorelib
162
152
@if exist "%VCINSTALLDIR%LIB\ARM\store" set LIB=%VCINSTALLDIR%LIB\ARM\store;%LIB%
163
153
...
164
154
:setstorelibpath
165
155
@if exist "%VCINSTALLDIR%LIB\ARM\store" set LIBPATH=%VCINSTALLDIR%LIB\ARM\store;%LIBPATH%
166
156
167
157
The correct store library paths would be file:
158
+
168
159
::
160
+
169
161
:setstorelib
170
162
@if exist "%VCINSTALLDIR%LIB\store\ARM" set LIB=%VCINSTALLDIR%LIB\store\ARM;%LIB%
171
163
...
@@ -208,6 +200,7 @@ returns the msvc version and the msvc toolset version for the corresponding vers
208
200
This is a proxy for using the toolset version for selection until that functionality can be added.
209
201
210
202
Example usage:
203
+
211
204
::
212
205
213
206
for version in [
@@ -240,6 +233,7 @@ Example usage:
240
233
print('{}Query: {} version={}, prefer_newest={}'.format(newline, msg, version, prefer_newest))
241
234
242
235
Example output fragment
236
+
243
237
::
244
238
245
239
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
267
261
updates that may change the default toolset version and/or the default SDK version.
268
262
269
263
Example usage:
264
+
270
265
::
271
266
272
267
@echo Enabling scons cache ...
@@ -289,13 +284,15 @@ Enabling warnings to be produced for detected msvc batch file errors may provide
289
284
for build failures. Refer to the documentation for details.
290
285
291
286
Change the default policy:
287
+
292
288
::
293
289
294
290
from SCons.Tool.MSCommon import msvc_set_scripterror_policy
295
291
296
292
msvc_set_scripterror_policy('Warning')
297
293
298
294
Specify the policy per-environment:
295
+
299
296
::
300
297
301
298
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
321
318
detection of installed msvc instances.
322
319
323
320
Windows command-line sample invocations:
321
+
324
322
::
325
323
326
324
@rem 64-Bit Windows
@@ -338,35 +336,29 @@ Batch File Arguments
338
336
339
337
Supported MSVC batch file arguments by product:
340
338
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
+ ======== ======= ======= ======== =======
352
347
353
348
.. [1 ] The BuildTools edition does not support the ``store `` argument. The Express edition
354
349
supports the ``store `` argument for the ``x86 `` target only.
355
350
.. [2 ] The ``sdk version `` argument is not supported in the BuildTools and Express editions.
356
351
357
352
Supported MSVC batch file arguments in SCons:
358
353
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
+ ======== ====================================== ===================================================
370
362
371
363
**MSVC_SCRIPT_ARGS contents are not validated. Utilizing script arguments that have construction
372
364
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
398
390
toolset specification should be omitted entirely.
399
391
400
392
Local installation and summary test results:
393
+
401
394
::
402
395
403
396
VS2022\VC\Auxiliary\Build\Microsoft.VCToolsVersion.v143.default.txt
@@ -407,6 +400,7 @@ Local installation and summary test results:
407
400
14.32.31326
408
401
409
402
Toolset version summary:
403
+
410
404
::
411
405
412
406
14.31.31103 Environment()
@@ -422,6 +416,7 @@ Toolset version summary:
422
416
14.32.31326 Environment(MSVC_SCRIPT_ARGS=['-vcvars_ver=14.32'])
423
417
424
418
VS2022\\ Common7\\ Tools\\ vsdevcmd\\ ext\\ vcvars.bat usage fragment:
419
+
425
420
::
426
421
427
422
@echo -vcvars_ver=version : Version of VC++ Toolset to select
@@ -443,6 +438,7 @@ VS2022\\Common7\\Tools\\vsdevcmd\\ext\\vcvars.bat usage fragment:
443
438
@echo SxS toolset to [VSInstallDir]\VC\MSVC\Tools\ directory.
444
439
445
440
VS2022 batch file fragment to determine the default toolset version:
441
+
446
442
::
447
443
448
444
@REM Add MSVC
@@ -469,13 +465,12 @@ Visual Studio Version Notes
469
465
SDK Versions
470
466
------------
471
467
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
+ ==== =================
479
474
480
475
.. [* ] The Windows 10 SDK version number is 10.0.20348.0 and earlier.
481
476
@@ -484,64 +479,42 @@ SDK Format
484
479
BuildTools Versions
485
480
-------------------
486
481
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
+ ========== ===== ===== ========
514
498
515
499
Product Versions
516
500
----------------
517
501
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
+ ========= ====== ========== ======================
545
518
546
519
547
520
SCons Implementation Notes
0 commit comments