aboutsummaryrefslogtreecommitdiff
path: root/MinGW
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2017-11-03 22:10:37 +0000
committerMartin Storsjo <martin@martin.st>2017-11-03 22:10:37 +0000
commitfb4e79cbdf0ed368897809e5ae716a8402bdbda0 (patch)
tree7afcb159dc88b446466d64ff4a74493ffac2eca9 /MinGW
parent7ff1eed0573f13ad7178c1092969ad121fa4c287 (diff)
[MinGW] Output debug info by default, unless the -s parameter is passed
Differential Revision: https://reviews.llvm.org/D39541 git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@317376 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'MinGW')
-rw-r--r--MinGW/Driver.cpp2
-rw-r--r--MinGW/Options.td3
2 files changed, 5 insertions, 0 deletions
diff --git a/MinGW/Driver.cpp b/MinGW/Driver.cpp
index d71a17c9e..ecdf7d065 100644
--- a/MinGW/Driver.cpp
+++ b/MinGW/Driver.cpp
@@ -152,6 +152,8 @@ bool mingw::link(ArrayRef<const char *> ArgsArr, raw_ostream &Diag) {
Add("-verbose");
if (Args.hasArg(OPT_export_all_symbols))
Add("-export-all-symbols");
+ if (!Args.hasArg(OPT_strip_all))
+ Add("-debug:dwarf");
if (auto *A = Args.getLastArg(OPT_m)) {
StringRef S = A->getValue();
diff --git a/MinGW/Options.td b/MinGW/Options.td
index 8c189b69b..595a08357 100644
--- a/MinGW/Options.td
+++ b/MinGW/Options.td
@@ -23,6 +23,8 @@ 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">;
+def strip_all: F<"strip-all">,
+ HelpText<"Omit all symbol information from the output binary">;
def whole_archive: F<"whole-archive">,
HelpText<"Include all object files for following archives">;
def verbose: F<"verbose">, HelpText<"Verbose mode">;
@@ -49,3 +51,4 @@ def version: F<"version">, HelpText<"Display the version number and exit">;
// Alias
def alias_entry_e: JoinedOrSeparate<["-"], "e">, Alias<entry>;
+def alias_strip_s: Flag<["-"], "s">, Alias<strip_all>;