diff options
author | Martin Storsjo <martin@martin.st> | 2019-08-14 09:35:44 +0000 |
---|---|---|
committer | Martin Storsjo <martin@martin.st> | 2019-08-14 09:35:44 +0000 |
commit | 0e5530abfc70ab1994fa2b120e9bc6fd1461cb33 (patch) | |
tree | 353492de63c70c78c04bead5aa209a127d9e7c5c /lld/MinGW | |
parent | ce26ad7a9db0cde092bd423108d5aaef257e3875 (diff) | |
download | llvm-project-0e5530abfc70ab1994fa2b120e9bc6fd1461cb33.tar.gz |
[MinGW] Correct handling different forms of a few options
Support the equals form of the long --entry=<symbol> option,
add a test for the -e<symbol> form.
Add tests for single dash forms of -exclude-all-symbols and
-export-all-symbols.
Support single-dash forms of -out-implib and -output-def, support
the equals form of --output-def=<file>. (We previously had a test
to explicitly disallow -out-implib, but it turns out that GNU ld
actually does support it just fine, despite also matching the
-o<file> option.)
Disallow the double-dashed --u form, add a test for -u<symbol>.
Differential Revision: https://reviews.llvm.org/D66066
llvm-svn: 368816
Diffstat (limited to 'lld/MinGW')
-rw-r--r-- | lld/MinGW/Options.td | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lld/MinGW/Options.td b/lld/MinGW/Options.td index ab3b0bd63360..aa57cb32673a 100644 --- a/lld/MinGW/Options.td +++ b/lld/MinGW/Options.td @@ -21,8 +21,7 @@ def L: JoinedOrSeparate<["-"], "L">, MetaVarName<"<dir>">, def Bdynamic: F<"Bdynamic">, HelpText<"Link against shared libraries">; 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">; +defm entry: Eq<"entry", "Name of entry point symbol">, MetaVarName<"<entry>">; def exclude_all_symbols: F<"exclude-all-symbols">, HelpText<"Don't automatically export any symbols">; def export_all_symbols: F<"export-all-symbols">, @@ -55,8 +54,8 @@ def large_address_aware: Flag<["--"], "large-address-aware">, def no_gc_sections: F<"no-gc-sections">, HelpText<"Don't remove unused sections">; def o: JoinedOrSeparate<["-"], "o">, MetaVarName<"<path>">, HelpText<"Path to file to write output">; -defm out_implib: EqLong<"out-implib", "Import library name">; -def output_def: S<"output-def">, HelpText<"Output def file">; +defm out_implib: Eq<"out-implib", "Import library name">; +defm output_def: Eq<"output-def", "Output def file">; def shared: F<"shared">, HelpText<"Build a shared object">; defm subs: Eq<"subsystem", "Specify subsystem">; def stack: S<"stack">; @@ -87,7 +86,7 @@ def Xlink : J<"Xlink=">, MetaVarName<"<arg>">, def alias_entry_e: JoinedOrSeparate<["-"], "e">, Alias<entry>; def alias_strip_s: Flag<["-"], "s">, Alias<strip_all>; def alias_strip_S: Flag<["-"], "S">, Alias<strip_debug>; -def alias_undefined_u: S<"u">, Alias<undefined>; +def alias_undefined_u: JoinedOrSeparate<["-"], "u">, Alias<undefined>; // Ignored options def: Joined<["-"], "O">; |