Skip to content

Commit

Permalink
[MinGW] Hook up the --exclude-all-symbols option
Browse files Browse the repository at this point in the history
Differential Revision: https://reviews.llvm.org/D58380

llvm-svn: 354387
  • Loading branch information
mstorsjo committed Feb 19, 2019
1 parent 272d8c1 commit 9705898
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lld/MinGW/Driver.cpp
Expand Up @@ -176,6 +176,8 @@ bool mingw::link(ArrayRef<const char *> ArgsArr, raw_ostream &Diag) {
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))
Expand Down
2 changes: 2 additions & 0 deletions lld/MinGW/Options.td
Expand Up @@ -11,6 +11,8 @@ def Bstatic: F<"Bstatic">, HelpText<"Do not link against shared libraries">;
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">;
Expand Down
3 changes: 3 additions & 0 deletions lld/test/MinGW/driver.test
Expand Up @@ -74,6 +74,9 @@ WHOLE-ARCHIVE: foo.o -wholearchive:bar.a baz.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

Expand Down

0 comments on commit 9705898

Please sign in to comment.