@@ -5979,9 +5979,38 @@ If the specified version is unavailable and/or unknown to &SCons;,
5979
5979
a warning is issued showing the versions actually discovered,
5980
5980
and the build will eventually fail indicating a missing compiler binary.
5981
5981
If &cv-MSVC_VERSION; is not set, &SCons; will (by default) select the
5982
- latest version of &MSVC; installed on your system.
5982
+ latest version of &MSVC; installed on your system
5983
+ (excluding any preview versions).
5983
5984
</para>
5984
5985
5986
+ <note>
5987
+ <para>
5988
+ In order to take effect, &cv-MSVC_VERSION; must be set before
5989
+ the initial &MSVC; compiler discovery takes place.
5990
+ Discovery happens, at the latest, during the first call to the
5991
+ &f-link-Environment; function, unless a <parameter>tools</parameter>
5992
+ list is specified which excludes the entire &MSVC; toolchain -
5993
+ that is, omits <literal>"defaults"</literal>
5994
+ and any specific tool module that refers to parts of the toolchain
5995
+ (&t-link-msvc;, &t-link-mslink;, &t-link-masm;, &t-link-midl;
5996
+ and &t-link-msvs;). In this case, detection is deferred until
5997
+ any one of those tool modules is invoked manually.
5998
+ The following two examples illustrate this:
5999
+ </para>
6000
+
6001
+ <programlisting>
6002
+ # MSVC_VERSION set as Environment is created
6003
+ env = Environment(MSVC_VERSION='14.2')
6004
+
6005
+ # Initialization deferred with empty tools, triggered manually
6006
+ env = Environment(tools=[])
6007
+ env['MSVC_VERSION'] = '14.2
6008
+ env.Tool('msvc')
6009
+ env.Tool('mslink')
6010
+ env.Tool('msvs')
6011
+ </programlisting>
6012
+ </note>
6013
+
5985
6014
<para>
5986
6015
The valid values for &cv-MSVC_VERSION; represent major versions
5987
6016
of the compiler, except that versions ending in <literal>Exp</literal>
@@ -5990,23 +6019,6 @@ Values that do not look like a valid compiler version
5990
6019
<emphasis>string</emphasis> are not supported.
5991
6020
</para>
5992
6021
5993
- <para>
5994
- To have the desired effect, &cv-MSVC_VERSION; must be set before an msvc &f-link-Tool;
5995
- (e.g., &t-link-msvc;) or an msvc-dependent &f-link-Tool; (e.g., &t-link-midl;) is loaded
5996
- into the &consenv;.
5997
- </para>
5998
-
5999
- <para>
6000
- If the default tools list or an explicit tools list is used that includes an
6001
- msvc &f-link-Tool; (e.g., &t-link-msvc;) or an msvc-dependent &f-link-Tool; (e.g., &t-link-midl;);
6002
- the &cv-MSVC_VERSION; is resolved when the &consenv; is created.
6003
- In this case, passing &cv-MSVC_VERSION; as an argument in the &f-link-Environment; call
6004
- is the effective solution.
6005
- Otherwise, &cv-MSVC_VERSION; must be set before the first msvc &f-link-Tool; or
6006
- msvc-dependent &f-link-Tool; is loaded into the environment.
6007
- See the manpage section "Construction Environments" for an example.
6008
- </para>
6009
-
6010
6022
<para>
6011
6023
The following table shows the correspondence
6012
6024
of &cv-MSVC_VERSION; values to various version indicators
@@ -9895,18 +9907,15 @@ Specify the location of <command>vswhere.exe</command>.
9895
9907
Microsoft Visual Studio and Build Tools since the 2017 edition,
9896
9908
but is also available as a standalone installation.
9897
9909
It allows queries to obtain detailed information about
9898
- installations of 2017 and later editions;
9899
- with the <option>-legacy</option> argument,
9900
- it can return limited information for
9901
- installations of the 2010 through 2015 editions.
9902
- &SCons; makes use of this information to help determine
9903
- the state of compiler support.
9910
+ installations of 2017 and later editions.
9911
+ &SCons; makes use of this information to determine
9912
+ the state of compiler support for those editions.
9904
9913
</para>
9905
9914
<para>
9906
- You can set the &cv-VSWHERE; variable to the path to a specific
9915
+ Satting the &cv-VSWHERE; variable to the path to a specific
9907
9916
<command>vswhere.exe</command> binary,
9908
- and &SCons; will use that.
9909
- If undefined (the default), &SCons; will search for one,
9917
+ causes &SCons; to use that binary .
9918
+ If not set (the default), &SCons; will search for one,
9910
9919
looking in the following locations in order,
9911
9920
using the first found, and updating &cv-VSWHERE; with the location.
9912
9921
</para>
@@ -9927,10 +9936,12 @@ Specify the location of <command>vswhere.exe</command>.
9927
9936
the initial &MSVC; compiler discovery takes place.
9928
9937
Discovery happens, at the latest, during the first call to the
9929
9938
&f-link-Environment; function, unless a <parameter>tools</parameter>
9930
- list is specified which excludes the entire MSVC toolchain
9931
- (that is, does not include <literal>"defaults"</literal>
9932
- or any of the specific tools),
9933
- in which case it happens when one of the tools is invoked manually.
9939
+ list is specified which excludes the entire &MSVC; toolchain -
9940
+ that is, omits <literal>"defaults"</literal>
9941
+ and any specific tool module that refers to parts of the toolchain
9942
+ (&t-link-msvc;, &t-link-mslink;, &t-link-masm;, &t-link-midl;
9943
+ and &t-link-msvs;). In this case, detection is deferred until
9944
+ any one of those tool modules is invoked manually.
9934
9945
The following two examples illustrate this:
9935
9946
</para>
9936
9947
@@ -9945,12 +9956,6 @@ env.Tool('msvc')
9945
9956
env.Tool('mslink')
9946
9957
env.Tool('msvs')
9947
9958
</programlisting>
9948
-
9949
- <para>
9950
- The tool modules that trigger detection are
9951
- &t-link-msvc;, &t-link-mslink;, &t-link-masm;, &t-link-midl;
9952
- and &t-link-msvs;.
9953
- </para>
9954
9959
</note>
9955
9960
9956
9961
</listitem>
0 commit comments