[MC] Generate a timestamp for COFF object files
authorDavid Majnemer <david.majnemer@gmail.com>
Tue, 1 Sep 2015 23:46:11 +0000 (23:46 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Tue, 1 Sep 2015 23:46:11 +0000 (23:46 +0000)
commit6ad37ecd02c9ad8a75adc5d2e0139e86d135f676
tree70b56b78fe8c82beec18c10fc4bc639c97c23c49
parentdc2d21654385b6c48920e66fac2d6d93a5fc99d6
[MC] Generate a timestamp for COFF object files

The MS incremental linker seems to inspect the timestamp written into
the object file to determine whether or not it's contents need to be
considered.  Failing to set the timestamp to a date newer than the
executable will result in the object file not participating in
subsequent links.  To ameliorate this, write the current time into the
object file's TimeDateStamp field.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246607 91177308-0d34-0410-b5e6-96231b3b80d8
lib/MC/WinCOFFObjectWriter.cpp
test/MC/COFF/timestamp.s