[lld] 5dd9f44 - [LLD] Improve --strip-all help text
Ben Dunbobbin via llvm-commits
llvm-commits at lists.llvm.org
Thu May 6 04:34:16 PDT 2021
Author: Ben Dunbobbin
Date: 2021-05-06T12:34:06+01:00
New Revision: 5dd9f44c17ec0d8b6b88bb015560b3c566622fdc
URL: https://github.com/llvm/llvm-project/commit/5dd9f44c17ec0d8b6b88bb015560b3c566622fdc
DIFF: https://github.com/llvm/llvm-project/commit/5dd9f44c17ec0d8b6b88bb015560b3c566622fdc.diff
LOG: [LLD] Improve --strip-all help text
This is a slight improvement to the help text, as I was slightly
surprised when strip-all did more than remove the symbol table.
Currently, we match gold's help text for strip-all and strip-debug.
I think that the GNU documentation for these options is not particularly
clear. However, I have opted to make only a minor change here and keep
the help text similar to gold's as these are mature options that are
well understood.
ld.bfd (https://sourceware.org/binutils/docs/ld/Options.html) has a
similar implication although it defines strip-debug as a subset of
strip-all. However, felt that noting that strip-all implies strip-debug
is better; because, with the ld.bfd approach you have to read both the
--strip-debug and the --strip-all help text to understand the behaviour
of --strip-all (and the --strip-all help text doesn't indicate that he
--strip-debug help text is related).
Differential Revision: https://reviews.llvm.org/D101890
Added:
Modified:
lld/ELF/Options.td
lld/docs/ld.lld.1
Removed:
################################################################################
diff --git a/lld/ELF/Options.td b/lld/ELF/Options.td
index 55bde53cddcbb..8315ab2ff0af6 100644
--- a/lld/ELF/Options.td
+++ b/lld/ELF/Options.td
@@ -381,7 +381,7 @@ def start_group: F<"start-group">,
def start_lib: F<"start-lib">,
HelpText<"Start a grouping of objects that should be treated as if they were together in an archive">;
-def strip_all: F<"strip-all">, HelpText<"Strip all symbols">;
+def strip_all: F<"strip-all">, HelpText<"Strip all symbols. Implies --strip-debug">;
def strip_debug: F<"strip-debug">, HelpText<"Strip debugging information">;
diff --git a/lld/docs/ld.lld.1 b/lld/docs/ld.lld.1
index 37c42a0eb51ff..c230b19ea2712 100644
--- a/lld/docs/ld.lld.1
+++ b/lld/docs/ld.lld.1
@@ -503,6 +503,8 @@ Start a grouping of objects that should be treated as if they were together
in an archive.
.It Fl -strip-all , Fl s
Strip all symbols.
+Implies
+.Fl -strip-debug .
.It Fl -strip-debug , Fl S
Strip debugging information.
.It Fl -symbol-ordering-file Ns = Ns Ar file
More information about the llvm-commits
mailing list