summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/WinCOFFObjectWriter.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2016-01-06 19:05:19 +0000
committerNico Weber <nicolasweber@gmx.de>2016-01-06 19:05:19 +0000
commit891419adc276e70861a59c0f13084b743dd90e76 (patch)
tree27dd6f399f10512098b55625f2108306f40718d7 /llvm/lib/MC/WinCOFFObjectWriter.cpp
parentab69e9f497404abc21f8a7d47918002a8b777531 (diff)
downloadbcm5719-llvm-891419adc276e70861a59c0f13084b743dd90e76.tar.gz
bcm5719-llvm-891419adc276e70861a59c0f13084b743dd90e76.zip
Make WinCOFFObjectWriter.cpp's timestamp writing not use ENABLE_TIMESTAMPS
LLVM_ENABLE_TIMESTAMPS controls if timestamps are embedded into llvm's binaries. Turning it off is useful for deterministic builds. r246905 made it so that the define suddenly also controls if the binaries that the llvm binaries _create_ embed timestamps or not – but this shouldn't be a configure-time option. r256203/r256204 added a driver option to toggle this on and off, so this patch now passes this driver option in LLVM_ENABLE_TIMESTAMPS builds so that if LLVM_ENABLE_TIMESTAMPS is set, the build of LLVM is deterministic – but the built clang can still write timestamps into other executables when requested. This also allows removing some of the test machinery added in r292012 to work around this problem. See PR24740 for background. http://reviews.llvm.org/D15783 llvm-svn: 256958
Diffstat (limited to 'llvm/lib/MC/WinCOFFObjectWriter.cpp')
-rw-r--r--llvm/lib/MC/WinCOFFObjectWriter.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/llvm/lib/MC/WinCOFFObjectWriter.cpp b/llvm/lib/MC/WinCOFFObjectWriter.cpp
index a3820906b76..a76cbdbd544 100644
--- a/llvm/lib/MC/WinCOFFObjectWriter.cpp
+++ b/llvm/lib/MC/WinCOFFObjectWriter.cpp
@@ -969,9 +969,6 @@ void WinCOFFObjectWriter::writeObject(MCAssembler &Asm,
Header.PointerToSymbolTable = offset;
- // FIXME: Remove the #else branch and make the #if branch unconditional once
- // LLVM's self host configuration is aware of /Brepro.
-#if (ENABLE_TIMESTAMPS == 1)
// MS LINK expects to be able to use this timestamp to implement their
// /INCREMENTAL feature.
if (Asm.isIncrementalLinkerCompatible()) {
@@ -980,12 +977,9 @@ void WinCOFFObjectWriter::writeObject(MCAssembler &Asm,
Now = UINT32_MAX;
Header.TimeDateStamp = Now;
} else {
+ // Have deterministic output if /INCREMENTAL isn't needed. Also matches GNU.
Header.TimeDateStamp = 0;
}
-#else
- // We want a deterministic output. It looks like GNU as also writes 0 in here.
- Header.TimeDateStamp = 0;
-#endif
// Write it all to disk...
WriteFileHeader(Header);
OpenPOWER on IntegriCloud