%scons; %builders-mod; %functions-mod; %tools-mod; %variables-mod; ]> A function that will be called to escape shell special characters in command lines. The function should take one argument: the command line string to escape; and should return the escaped command line. The prefix used for (static) library file names. A default value is set for each platform (posix, win32, os2, etc.), but the value is overridden by individual tools (ar, mslib, sgiar, sunar, tlib, etc.) to reflect the names of the libraries they create. A list of all legal prefixes for library file names. When searching for library dependencies, SCons will look for files with these prefixes, the base library name, and suffixes from the &cv-link-LIBSUFFIXES; list. The suffix used for (static) library file names. A default value is set for each platform (posix, win32, os2, etc.), but the value is overridden by individual tools (ar, mslib, sgiar, sunar, tlib, etc.) to reflect the names of the libraries they create. A list of all legal suffixes for library file names. When searching for library dependencies, SCons will look for files with prefixes from the &cv-link-LIBPREFIXES; list, the base library name, and these suffixes. The prefix used for (static) object file names. The suffix used for (static) object file names. The name of the platform used to create this &consenv;. &SCons; sets this when initializing the platform, which by default is auto-detected (see the platform argument to &f-link-Environment;). env = Environment(tools=[]) if env['PLATFORM'] == 'cygwin': Tool('mingw')(env) else: Tool('msvc')(env) The name of the host operating system for the platform used to create this &consenv;. The platform code sets this when initializing (see &cv-link-PLATFORM; and the platform argument to &f-link-Environment;). Should be considered immutable. &cv-HOST_OS; is not currently used by &SCons;, but the option is reserved to do so in future The name of the operating system that objects created using this &consenv; should target. Can be set when creating a &consenv; by passing as a keyword argument in the &f-link-Environment; call;. &cv-TARGET_OS; is not currently used by &SCons; but the option is reserved to do so in future The name of the host hardware architecture used to create this &consenv;. The platform code sets this when initializing (see &cv-link-PLATFORM; and the platform argument to &f-link-Environment;). Note the detected name of the architecture may not be identical to that returned by the &Python; platform.machine method. On the win32 platform, if the Microsoft Visual C++ compiler is available, &t-link-msvc; tool setup is done using &cv-HOST_ARCH; and &cv-link-TARGET_ARCH;. Changing the values at any later time will not cause the tool to be reinitialized. Valid host arch values are x86 and arm for 32-bit hosts and amd64 and x86_64 for 64-bit hosts. Should be considered immutable. &cv-HOST_ARCH; is not currently used by other platforms, but the option is reserved to do so in future The name of the hardware architecture that objects created using this &consenv; should target. Can be set when creating a &consenv; by passing as a keyword argument in the &f-link-Environment; call. On the win32 platform, if the Microsoft Visual C++ compiler is available, &t-link-msvc; tool setup is done using &cv-link-HOST_ARCH; and &cv-TARGET_ARCH;. If a value is not specified, will be set to the same value as &cv-link-HOST_ARCH;. Changing the value after the environment is initialized will not cause the tool to be reinitialized. Compiled objects will be in the target architecture if the compilation system supports generating for that target. The latest compiler which can fulfill the requirement will be selected, unless a different version is directed by the value of the &cv-link-MSVC_VERSION; &consvar;. On the win32/msvc combination, valid target arch values are x86, arm, i386 for 32-bit targets and amd64, arm64, x86_64 and ia64 (Itanium) for 64-bit targets. For example, if you want to compile 64-bit binaries, you would set TARGET_ARCH='x86_64' when creating the &consenv;. Note that not all target architectures are supported for all Visual Studio / MSVC versions. Check the relevant Microsoft documentation. &cv-TARGET_ARCH; is not currently used by other compilation tools, but the option is reserved to do so in future The prefix used for executable file names. The suffix used for executable file names. A string naming the shell program that will be passed to the &cv-SPAWN; function. See the &cv-SPAWN; construction variable for more information. The prefix used for shared library file names. The suffix used for shared library file names. The prefix used for shared object file names. The suffix used for shared object file names. A callable object used to handle overly long command line strings, since operations which call out to a shell will fail if the line is longer than the shell can accept. This tends to particularly impact linking. The tempfile object stores the command line in a temporary file in the appropriate format, and returns an alternate command line so the invoked tool will make use of the contents of the temporary file. If you need to replace the default tempfile object, the callable should take into account the settings of &cv-link-MAXLINELENGTH;, &cv-link-TEMPFILEPREFIX;, &cv-link-TEMPFILESUFFIX;, &cv-link-TEMPFILEARGJOIN;, &cv-link-TEMPFILEDIR; and &cv-link-TEMPFILEARGESCFUNC;. The prefix for the name of the temporary file used to store command lines exceeding &cv-link-MAXLINELENGTH;. The default prefix is '@', which works for the Microsoft and GNU toolchains on Windows. Set this appropriately for other toolchains, for example '-@' for the diab compiler or '-via' for ARM toolchain. The suffix for the name of the temporary file used to store command lines exceeding &cv-link-MAXLINELENGTH;. The suffix should include the dot ('.') if one is wanted as it will not be added automatically. The default is .lnk. The string to use to join the arguments passed to &cv-link-TEMPFILE; when the command line exceeds the limit set by &cv-link-MAXLINELENGTH;. The default value is a space. However for MSVC, MSLINK the default is a line separator as defined by os.linesep. Note this value is used literally and not expanded by the subst logic. The directory to create the long-lines temporary file in. The default argument escape function is SCons.Subst.quote_spaces. If you need to apply extra operations on a command argument (to fix Windows slashes, normalize paths, etc.) before writing to the temporary file, you can set the &cv-TEMPFILEARGESCFUNC; variable to a custom function. Such a function takes a single string argument and returns a new string with any modifications applied. Example: import sys import re from SCons.Subst import quote_spaces WINPATHSEP_RE = re.compile(r"\\([^\"'\\]|$)") def tempfile_arg_esc_func(arg): arg = quote_spaces(arg) if sys.platform != "win32": return arg # GCC requires double Windows slashes, let's use UNIX separator return WINPATHSEP_RE.sub(r"/\1", arg) env["TEMPFILEARGESCFUNC"] = tempfile_arg_esc_func