The idea here is that we want to test
a) That we write a valid timestamp (i.e. hash) into the PE file
and
b) That this doesn't affect determinism,
but it's difficult because the generated PDB GUID is currently not deterministic, so this non-deterministic value gets written into the PE. There's ideas to fix this, but for now we would still like to be able to test that this is the *only* source of non determinism. To deal with this, this patch introduces a subcommand to llvm-pdbutil which will stamp either an EXE or PDB with a specified GUID and age, then recompute the hash of the executable and update the various timestamp fields.
Two tests are introduced, one which verifies that two identical links without /DEBUG generate the same binary, and another which verifies that two identical links with /DEBUG generate the same binary provided they are stamped with the same GUID and Age.
Needs wrapping, here and elsewhere. I'm assuming clang-format will happen at some point.