[lld] r353145 - [MinGW] Hook up the --no-insert-timestamp option

Martin Storsjo via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 5 00:16:06 PST 2019


Author: mstorsjo
Date: Tue Feb  5 00:16:06 2019
New Revision: 353145

URL: http://llvm.org/viewvc/llvm-project?rev=353145&view=rev
Log:
[MinGW] Hook up the --no-insert-timestamp option

This fixes PR40582.

Patch by Georg Koppen!

Differential Revision: https://reviews.llvm.org/D57679

Modified:
    lld/trunk/MinGW/Driver.cpp
    lld/trunk/MinGW/Options.td
    lld/trunk/test/MinGW/driver.test

Modified: lld/trunk/MinGW/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/MinGW/Driver.cpp?rev=353145&r1=353144&r2=353145&view=diff
==============================================================================
--- lld/trunk/MinGW/Driver.cpp (original)
+++ lld/trunk/MinGW/Driver.cpp Tue Feb  5 00:16:06 2019
@@ -187,6 +187,9 @@ bool mingw::link(ArrayRef<const char *>
       Args.getLastArgValue(OPT_m) != "arm64pe" && !Args.hasArg(OPT_dynamicbase))
     Add("-dynamicbase:no");
 
+  if (Args.hasArg(OPT_no_insert_timestamp))
+    Add("-timestamp:0");
+
   if (Args.hasFlag(OPT_gc_sections, OPT_no_gc_sections, false))
     Add("-opt:ref");
   else

Modified: lld/trunk/MinGW/Options.td
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/MinGW/Options.td?rev=353145&r1=353144&r2=353145&view=diff
==============================================================================
--- lld/trunk/MinGW/Options.td (original)
+++ lld/trunk/MinGW/Options.td Tue Feb  5 00:16:06 2019
@@ -22,6 +22,8 @@ def l: JoinedOrSeparate<["-"], "l">, Met
 def m: JoinedOrSeparate<["-"], "m">, HelpText<"Set target emulation">;
 def map: S<"Map">, HelpText<"Output a linker map">;
 def map_eq: J<"Map=">, Alias<map>;
+def no_insert_timestamp: F<"no-insert-timestamp">,
+    HelpText<"Don't include PE header timestamp">;
 def no_whole_archive: F<"no-whole-archive">,
     HelpText<"No longer include all object files for following archives">;
 def large_address_aware: Flag<["--"], "large-address-aware">,

Modified: lld/trunk/test/MinGW/driver.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/MinGW/driver.test?rev=353145&r1=353144&r2=353145&view=diff
==============================================================================
--- lld/trunk/test/MinGW/driver.test (original)
+++ lld/trunk/test/MinGW/driver.test Tue Feb  5 00:16:06 2019
@@ -151,3 +151,6 @@ REQUIRE-DEFINED: -include:_foo -include:
 
 RUN: ld.lld -### -m i386pep foo.o -Llibpath | FileCheck -check-prefix LIBPATH %s
 LIBPATH: -libpath:libpath
+
+RUN: ld.lld -### -m i386pep foo.o --no-insert-timestamp | FileCheck -check-prefix NOTIMESTAMP %s
+NOTIMESTAMP: -timestamp:0




More information about the llvm-commits mailing list