install: do not strip dll import libraries (#14123)

DLL import libraries exist specifically to have symbols.
Ninja: GlobalNinjaGenerator WriteBuild and WritePhonyBuild non static

To properly track the usage of dependencies that are generated at
compile time as the side effect of other build steps we need
to make the WriteBuild and WritePhonyBuild commands non static
Ninja: Custom Command file depends don't need to exist before building

When converting custom commands for the ninja build system we
need to make sure that any file dependencies that exist in the build
tree are converted to phony targets. This tells ninja that these
files might not exist when starting the build, but could be generated
during the build.

This is done by tracking all dependencies for custom command targets.
After all have been written out we remove all items from the set
that have been seen as a target, custom command output, an alias,
or a file in the source directory. Anything that is left is considered
to be a file that will be generated as a side effect of another
custom command.
Merge topic 'DontStripImportLibs' into next

ae8e654 install: do not strip dll import libraries (#14123)
Merge topic 'ninja_phony_targets' into next

539356f Ninja: Custom Command file depends don't need to exist before building
874e171 Ninja: GlobalNinjaGenerator WriteBuild and WritePhonyBuild non static