[lld] r353342 - [MinGW] Add --insert-timestamp as complement to the --no-insert-timestamp option
Martin Storsjo via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 6 13:05:29 PST 2019
Author: mstorsjo
Date: Wed Feb 6 13:05:29 2019
New Revision: 353342
URL: http://llvm.org/viewvc/llvm-project?rev=353342&view=rev
Log:
[MinGW] Add --insert-timestamp as complement to the --no-insert-timestamp option
Differential Revision: https://reviews.llvm.org/D57808
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=353342&r1=353341&r2=353342&view=diff
==============================================================================
--- lld/trunk/MinGW/Driver.cpp (original)
+++ lld/trunk/MinGW/Driver.cpp Wed Feb 6 13:05:29 2019
@@ -187,7 +187,7 @@ 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))
+ if (Args.hasFlag(OPT_no_insert_timestamp, OPT_insert_timestamp, false))
Add("-timestamp:0");
if (Args.hasFlag(OPT_gc_sections, OPT_no_gc_sections, false))
Modified: lld/trunk/MinGW/Options.td
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/MinGW/Options.td?rev=353342&r1=353341&r2=353342&view=diff
==============================================================================
--- lld/trunk/MinGW/Options.td (original)
+++ lld/trunk/MinGW/Options.td Wed Feb 6 13:05:29 2019
@@ -16,6 +16,8 @@ def export_all_symbols: F<"export-all-sy
def gc_sections: F<"gc-sections">, HelpText<"Remove unused sections">;
def icf: J<"icf=">, HelpText<"Identical code folding">;
def image_base: S<"image-base">, HelpText<"Base address of the program">;
+def insert_timestamp: F<"insert-timestamp">,
+ HelpText<"Include PE header timestamp">;
def kill_at: F<"kill-at">, HelpText<"Remove @n from exported symbols">;
def l: JoinedOrSeparate<["-"], "l">, MetaVarName<"<libName>">,
HelpText<"Root name of library to use">;
Modified: lld/trunk/test/MinGW/driver.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/MinGW/driver.test?rev=353342&r1=353341&r2=353342&view=diff
==============================================================================
--- lld/trunk/test/MinGW/driver.test (original)
+++ lld/trunk/test/MinGW/driver.test Wed Feb 6 13:05:29 2019
@@ -153,4 +153,7 @@ RUN: ld.lld -### -m i386pep foo.o -Llibp
LIBPATH: -libpath:libpath
RUN: ld.lld -### -m i386pep foo.o --no-insert-timestamp | FileCheck -check-prefix NOTIMESTAMP %s
+RUN: ld.lld -### -m i386pep foo.o --insert-timestamp --no-insert-timestamp | FileCheck -check-prefix NOTIMESTAMP %s
NOTIMESTAMP: -timestamp:0
+RUN: ld.lld -### -m i386pep foo.o --no-insert-timestamp --insert-timestamp | FileCheck -check-prefix TIMESTAMP %s
+TIMESTAMP-NOT: -timestamp:0
More information about the llvm-commits
mailing list