Microsoft cmd.exe has strange quoting rules. Where other shells treat
single quote as a quote character, cmd.exe seems to pass it through to
the underlying process. This breaks the vers_id compilation with
strange error messages. In practice, SCons does not need the
no-interpolation semantics that single quote provides, so switch to
double quote for compatibility with Windows. This is probably slightly
less efficient on Bash, since it will now scan the value for expansions.
However, the efficiency loss is tiny compared to overhead elsewhere in
the build.
Per the documentation, on Linux, the default is true. On Windows,
setting it to true causes a Python exception because Windows relies on
disabling inheritance as a hack to close all descriptors, but
inheritance needs to be enabled to capture the output of the child
process.
Reported-by: Mako88 <https://github.com/dxx-rebirth/dxx-rebirth/issues/173>
Fixes: bb3f414128 ("Cache scons subprocess calls")
Move the boilerplate up onto the outer namespace line. Decorate each
collision with a comment stating its purpose, so that compiler error
output echoes the type of collision.
This started as a project to make SConstruct take less time on an empty
build. Unforunately, most of the major gains lie elsewhere and require
deeper changes to the build system. These changes do not help much, but
they are better than nothing.
Add option to compute indirect includes even when not necessary, since
indirect includes influence the inclusion count shown in the comments.
Enabling this option makes SCons work harder for the same output binary.
It should only be used by developers who want to see precise file
inclusion counts.
Current gcc requires a non-PIE cc1plus for working PCH support. If the
chosen compiler is PIE, it will succeed in building the PCH, then fail
when trying to use it.