This refactors the thin_archive tool to use emitters and scanners
to note that when linking to a thin archive, you must also depend on
the children of that thin archive. Failing to do so is an error,
because a changed .o does not necessarily lead to a different .a,
which would subvert the SCons dependency mechanism.
This also includes a refactoring of the ABILINK tool to use a similar
mechanism, to achieve the opposite effect. For ABILINK, we want to
depend not on the actual .so, but on the hash of its abidw result. We
use emitters, actions, and scanners to produce an associated .abidw
file for each .so we build, and then update the scanner to depend on
the .abidw of our libraries, not the library itself. This allows us to
elide needless relinks.
* The integration_tests alias now depends on the individual tests directly
rather than the whole directory.
* Both list files now just depend on the list of tests rather than the tests
themselves.
* The string printed during execution is now evaluated at the right time so
we don't need to print it separately.
* Fix installing tests to the build/unitests/ directory on windows.
From the python docs: "In general, the key and reverse conversion processes
are much faster than specifying an equivalent cmp function. This is because
cmp is called multiple times for each list element while key and reverse touch
each element only once."
When the compilation_db scons emitter saved compilation database
entried it always used the "global" environment which might not match
the compilation command line actually used to build the target.
That meant that using eg.:
env.Library("foo", ["foo.cpp"], CXXFLAGS=["-Dfoo"])
Would not write the extra "-Dfoo" flag actually used to build the foo
library to the compile_commands.json file.
Instead save the environment used to generate the target and use that
when writing the compile_command.json entry.
By default on SCons, the Library and StaticLibrary builders are
the same object, so adding the target_factory to StaticLibrary is
sufficient. If they aren't the same, then even more important
to only modify SaticLibrary, since Library may have been re-purposed
to mean something else. In our case it does mean something different
when using --link-model=dynamic, so this oversight inadvertently changed
the signature calculations for dynamic libaries.
Also includes a drive-by fix to add LoadableModule to the builders
affected by the abilink.py tool, since a LoadableModule is also
a shared library on the platforms where abidw is in play.