[lld] r354387 - [MinGW] Hook up the --exclude-all-symbols option

Martin Storsjo via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 19 13:57:50 PST 2019


Author: mstorsjo
Date: Tue Feb 19 13:57:49 2019
New Revision: 354387

URL: http://llvm.org/viewvc/llvm-project?rev=354387&view=rev
Log:
[MinGW] Hook up the --exclude-all-symbols option

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

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=354387&r1=354386&r2=354387&view=diff
==============================================================================
--- lld/trunk/MinGW/Driver.cpp (original)
+++ lld/trunk/MinGW/Driver.cpp Tue Feb 19 13:57:49 2019
@@ -176,6 +176,8 @@ bool mingw::link(ArrayRef<const char *>
     Add("-dll");
   if (Args.hasArg(OPT_verbose))
     Add("-verbose");
+  if (Args.hasArg(OPT_exclude_all_symbols))
+    Add("-exclude-all-symbols");
   if (Args.hasArg(OPT_export_all_symbols))
     Add("-export-all-symbols");
   if (Args.hasArg(OPT_large_address_aware))

Modified: lld/trunk/MinGW/Options.td
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/MinGW/Options.td?rev=354387&r1=354386&r2=354387&view=diff
==============================================================================
--- lld/trunk/MinGW/Options.td (original)
+++ lld/trunk/MinGW/Options.td Tue Feb 19 13:57:49 2019
@@ -11,6 +11,8 @@ def Bstatic: F<"Bstatic">, HelpText<"Do
 def dynamicbase: F<"dynamicbase">, HelpText<"Enable ASLR">;
 def entry: S<"entry">, MetaVarName<"<entry>">,
   HelpText<"Name of entry point symbol">;
+def exclude_all_symbols: F<"exclude-all-symbols">,
+    HelpText<"Don't automatically export any symbols">;
 def export_all_symbols: F<"export-all-symbols">,
     HelpText<"Export all symbols even if a def file or dllexport attributes are used">;
 def gc_sections: F<"gc-sections">, HelpText<"Remove unused sections">;

Modified: lld/trunk/test/MinGW/driver.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/MinGW/driver.test?rev=354387&r1=354386&r2=354387&view=diff
==============================================================================
--- lld/trunk/test/MinGW/driver.test (original)
+++ lld/trunk/test/MinGW/driver.test Tue Feb 19 13:57:49 2019
@@ -74,6 +74,9 @@ WHOLE-ARCHIVE: foo.o -wholearchive:bar.a
 RUN: ld.lld -### -m i386pep foo.o | FileCheck -check-prefix MINGW-FLAG %s
 MINGW-FLAG: -lldmingw
 
+RUN: ld.lld -### -m i386pep foo.o --exclude-all-symbols | FileCheck -check-prefix EXCLUDE-ALL %s
+EXCLUDE-ALL: -exclude-all-symbols
+
 RUN: ld.lld -### -m i386pep foo.o --export-all-symbols | FileCheck -check-prefix EXPORT-ALL %s
 EXPORT-ALL: -export-all-symbols
 




More information about the llvm-commits mailing list