[PATCH] D57808: [LLD] [MinGW] Add --insert-timestamp as complement to the --no-insert-timestamp option
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 6 13:05:17 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rLLD353342: [MinGW] Add --insert-timestamp as complement to the --no-insert-timestamp option (authored by mstorsjo, committed by ).
Repository:
rLLD LLVM Linker
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57808/new/
https://reviews.llvm.org/D57808
Files:
MinGW/Driver.cpp
MinGW/Options.td
test/MinGW/driver.test
Index: MinGW/Options.td
===================================================================
--- MinGW/Options.td
+++ MinGW/Options.td
@@ -16,6 +16,8 @@
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">;
Index: MinGW/Driver.cpp
===================================================================
--- MinGW/Driver.cpp
+++ MinGW/Driver.cpp
@@ -187,7 +187,7 @@
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))
Index: test/MinGW/driver.test
===================================================================
--- test/MinGW/driver.test
+++ test/MinGW/driver.test
@@ -153,4 +153,7 @@
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57808.185623.patch
Type: text/x-patch
Size: 1696 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190206/75433046/attachment.bin>
More information about the llvm-commits
mailing list