[PATCH] D38761: [LLD] [MinGW] Hook up the --export-all-symbols and -output-def options
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 11 22:37:36 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL315563: [MinGW] Hook up the --export-all-symbols and --output-def options (authored by mstorsjo).
Changed prior to commit:
https://reviews.llvm.org/D38761?vs=118470&id=118741#toc
Repository:
rL LLVM
https://reviews.llvm.org/D38761
Files:
lld/trunk/MinGW/Driver.cpp
lld/trunk/MinGW/Options.td
lld/trunk/test/MinGW/driver.test
Index: lld/trunk/MinGW/Options.td
===================================================================
--- lld/trunk/MinGW/Options.td
+++ lld/trunk/MinGW/Options.td
@@ -8,6 +8,8 @@
HelpText<"Add a directory to the library search path">;
def entry: S<"entry">, MetaVarName<"<entry>">,
HelpText<"Name of entry point symbol">;
+def export_all_symbols: F<"export-all-symbols">,
+ HelpText<"Export all symbols even if a def file or dllexport attributes are used">;
def l: JoinedOrSeparate<["-"], "l">, MetaVarName<"<libName>">,
HelpText<"Root name of library to use">;
def m: JoinedOrSeparate<["-"], "m">, HelpText<"Set target emulation">;
@@ -17,6 +19,7 @@
def o: JoinedOrSeparate<["-"], "o">, MetaVarName<"<path>">,
HelpText<"Path to file to write output">;
def out_implib: Separate<["--"], "out-implib">, HelpText<"Import library name">;
+def output_def: S<"output-def">, HelpText<"Output def file">;
def shared: F<"shared">, HelpText<"Build a shared object">;
def subs: S<"subsystem">, HelpText<"Specify subsystem">;
def stack: S<"stack">;
Index: lld/trunk/MinGW/Driver.cpp
===================================================================
--- lld/trunk/MinGW/Driver.cpp
+++ lld/trunk/MinGW/Driver.cpp
@@ -136,6 +136,8 @@
Add("-implib:" + StringRef(A->getValue()));
if (auto *A = Args.getLastArg(OPT_stack))
Add("-stack:" + StringRef(A->getValue()));
+ if (auto *A = Args.getLastArg(OPT_output_def))
+ Add("-output-def:" + StringRef(A->getValue()));
if (auto *A = Args.getLastArg(OPT_o))
Add("-out:" + StringRef(A->getValue()));
@@ -148,6 +150,8 @@
Add("-dll");
if (Args.hasArg(OPT_verbose))
Add("-verbose");
+ if (Args.hasArg(OPT_export_all_symbols))
+ Add("-export-all-symbols");
if (auto *A = Args.getLastArg(OPT_m)) {
StringRef S = A->getValue();
Index: lld/trunk/test/MinGW/driver.test
===================================================================
--- lld/trunk/test/MinGW/driver.test
+++ lld/trunk/test/MinGW/driver.test
@@ -72,3 +72,9 @@
RUN: ld.lld -### -m i386pep foo.o | FileCheck -check-prefix MINGW-FLAG %s
MINGW-FLAG: -lldmingw
+
+RUN: ld.lld -### -m i386pep foo.o --export-all-symbols | FileCheck -check-prefix EXPORT-ALL %s
+EXPORT-ALL: -export-all-symbols
+
+RUN: ld.lld -### -m i386pep foo.o --output-def out.def | FileCheck -check-prefix OUTPUT-DEF %s
+OUTPUT-DEF: -output-def:out.def
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38761.118741.patch
Type: text/x-patch
Size: 2390 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171012/d86ac511/attachment.bin>
More information about the llvm-commits
mailing list