From c055e6f5cf875d9058679868eaff0295850984e3 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Fri, 3 Jul 2020 08:51:52 -0600 Subject: Updates to doc for MSVC construction vars [skip appveyor] Some markup and minor wording changes for various MSVC tool variables. Signed-off-by: Mats Wichmann --- SCons/Tool/msvc.xml | 57 +++++++++++++++++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 21 deletions(-) diff --git a/SCons/Tool/msvc.xml b/SCons/Tool/msvc.xml index 776c361..25fa51f 100644 --- a/SCons/Tool/msvc.xml +++ b/SCons/Tool/msvc.xml @@ -371,7 +371,7 @@ Valid values for Windows are 7.1, 7.0, and 6.0. -Versions ending in Exp refer to "Express" or +Versions ending in Exp refer to "Express" or "Express for Desktop" editions. @@ -381,17 +381,32 @@ Versions ending in Exp refer to "Express" or -Use a batch script to set up Microsoft Visual Studio compiler +Use a batch script to set up Microsoft Visual Studio compiler. -&cv-MSVC_USE_SCRIPT; overrides &cv-MSVC_VERSION; and &cv-TARGET_ARCH;. -If set to the name of a Visual Studio .bat file (e.g. vcvars.bat), -SCons will run that bat file and extract the relevant variables from -the result (typically %INCLUDE%, %LIB%, and %PATH%). Setting -MSVC_USE_SCRIPT to None bypasses the Visual Studio autodetection -entirely; use this if you are running SCons in a Visual Studio cmd -window and importing the shell's environment variables. +If set to the name of a Visual Studio .bat file +(e.g. vcvars.bat), +&SCons; will run that batch file instead of the auto-detected one, +and extract the relevant variables from the result (typically +%INCLUDE%, +%LIB%, and +%PATH%) for supplying to the build. +This can be useful to force the use of a compiler version that +&SCons; does not detect. + + + +Setting +&cv-MSVC_USE_SCRIPT; to None bypasses the +Visual Studio autodetection entirely; +use this if you are running SCons in a Visual Studio cmd +window and importing the shell's environment variables - that +is, if you are sure everything is set correctly already and +you don't want &SCons; to change anything. + + +&cv-MSVC_USE_SCRIPT; overrides &cv-link-MSVC_VERSION; and &cv-link-TARGET_ARCH;. @@ -403,15 +418,15 @@ Sets the host architecture for Visual Studio compiler. If not set, default to the detected host architecture: note that this may depend on the python you are using. This variable must be passed as an argument to the Environment() -constructor; setting it later has no effect. +constructor; setting it later has no effect. -Valid values are the same as for &cv-TARGET_ARCH;. +Valid values are the same as for &cv-link-TARGET_ARCH;. -This is currently only used on Windows, but in the future it will be +This is currently only used on Windows, but in the future it may be used on other OSes as well. @@ -421,15 +436,15 @@ used on other OSes as well. Sets the target architecture for Visual Studio compiler (i.e. the arch of the binaries generated by the compiler). If not set, default to -&cv-HOST_ARCH;, or, if that is unset, to the architecture of the +&cv-link-HOST_ARCH;, or, if that is unset, to the architecture of the running machine's OS (note that the python build or architecture has no effect). This variable must be passed as an argument to the Environment() -constructor; setting it later has no effect. +constructor; setting it later has no effect. This is currently only used on Windows, but in the future it will be used on other OSes as well. -If this is set and MSVC_VERSION is not set, this will search for -all installed MSVC's that support the TARGET_ARCH, selecting the +If this is set and &cv-link-MSVC_VERSION; is not set, this will search for +all installed MSVC's that support the &cv-TARGET_ARCH;, selecting the latest version for use. @@ -438,13 +453,13 @@ Valid values for Windows are x86, arm, i386 -(for 32 bits); +(for 32 bit); amd64, arm64, emt64, x86_64 -(for 64 bits); -and ia64 (Itanium). +(for 64 bit); +and ia64 (Itanium) (deprecated). For example, if you want to compile 64-bit binaries, you would set TARGET_ARCH='x86_64' in your SCons environment. @@ -463,7 +478,7 @@ If &cv-MSVC_UWP_APP; is set, the Visual Studio environment will be set up to poi to the Windows Store compatible libraries and Visual Studio runtimes. In doing so, any libraries that are built will be able to be used in a UWP App and published to the Windows Store. -This flag will only have an effect with Visual Studio 2015+. +This flag will only have an effect with Visual Studio 2015 or later. This variable must be passed as an argument to the Environment() constructor; setting it later has no effect. @@ -478,7 +493,7 @@ Valid values are '1' or '0' -Specify the location of vswhere.exe. +Specify the location of vswhere.exe. -- cgit v0.12 From a851007c86d117f38aacd59fe462da5ecc4f1b5a Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Fri, 3 Jul 2020 12:59:53 -0600 Subject: [PR #3730] fix doc syntax errors [skip appveyor] Signed-off-by: Mats Wichmann --- SCons/Tool/msvc.xml | 10 +++++----- doc/man/sconsign.xml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/SCons/Tool/msvc.xml b/SCons/Tool/msvc.xml index 25fa51f..fd83f61 100644 --- a/SCons/Tool/msvc.xml +++ b/SCons/Tool/msvc.xml @@ -385,13 +385,13 @@ Use a batch script to set up Microsoft Visual Studio compiler. -If set to the name of a Visual Studio .bat file -(e.g. vcvars.bat), +If set to the name of a Visual Studio .bat file +(e.g. vcvars.bat), &SCons; will run that batch file instead of the auto-detected one, and extract the relevant variables from the result (typically -%INCLUDE%, -%LIB%, and -%PATH%) for supplying to the build. +%INCLUDE%, +%LIB%, and +%PATH%) for supplying to the build. This can be useful to force the use of a compiler version that &SCons; does not detect. diff --git a/doc/man/sconsign.xml b/doc/man/sconsign.xml index 93842ad..af4ec91 100644 --- a/doc/man/sconsign.xml +++ b/doc/man/sconsign.xml @@ -306,8 +306,8 @@ for all entries or the specified entries. - SEE ALSO + scons, the SCons User Guide at , -- cgit v0.12 From 286384aa1b69ab011814adce8b814eaf8b5e1f98 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Fri, 3 Jul 2020 17:02:04 -0600 Subject: [PR #3730] change wording on TARGET_ARCH [skip appveyor] Some targets unavailable on some MSVC versions. Don't try to say anything about that except "check MS docs". Signed-off-by: Mats Wichmann --- SCons/Tool/msvc.xml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/SCons/Tool/msvc.xml b/SCons/Tool/msvc.xml index fd83f61..2dec9c5 100644 --- a/SCons/Tool/msvc.xml +++ b/SCons/Tool/msvc.xml @@ -449,18 +449,23 @@ latest version for use. -Valid values for Windows are +On Windows, valid target values are x86, arm, i386 -(for 32 bit); +for 32-bit targets and amd64, arm64, -emt64, +em64t, x86_64 -(for 64 bit); -and ia64 (Itanium) (deprecated). +and ia64 (Itanium) +for 64-bit targets. +Note that not all target architectures are +supported for all Visual Studio / MSVC versions +check the relevant Microsoft documentation. + + For example, if you want to compile 64-bit binaries, you would set TARGET_ARCH='x86_64' in your SCons environment. -- cgit v0.12