[lld] b696500 - [lld/mac] Stop accepting arbitrary suffixes on --(no-)warn-dylib-install-name

Nico Weber via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 12 12:27:46 PDT 2022


Author: Nico Weber
Date: 2022-08-12T15:27:02-04:00
New Revision: b696500b9ac061a3d778d61a807747de34c7ecc2

URL: https://github.com/llvm/llvm-project/commit/b696500b9ac061a3d778d61a807747de34c7ecc2
DIFF: https://github.com/llvm/llvm-project/commit/b696500b9ac061a3d778d61a807747de34c7ecc2.diff

LOG: [lld/mac] Stop accepting arbitrary suffixes on --(no-)warn-dylib-install-name

The flag accidentally used Joined<> instead of Flag<>.

Previously, `--warn-dylib-install-namefoobarbaz` would be accepted and
had the same effect as `-warn-dylib-install-name`. Now the flag only
works if no suffix is attached to it, as originally intended.

Also fix a typo in the flag's help text.

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

Added: 
    

Modified: 
    lld/MachO/Options.td

Removed: 
    


################################################################################
diff  --git a/lld/MachO/Options.td b/lld/MachO/Options.td
index 92427207f4e6d..2d2c58e3ada01 100644
--- a/lld/MachO/Options.td
+++ b/lld/MachO/Options.td
@@ -77,11 +77,11 @@ def start_lib: Flag<["--"], "start-lib">,
     HelpText<"Start a grouping of objects that should be treated as if they were together in an archive">;
 def end_lib: Flag<["--"], "end-lib">,
     HelpText<"End a grouping of objects that should be treated as if they were together in an archive">;
-def no_warn_dylib_install_name: Joined<["--"], "no-warn-dylib-install-name">,
-    HelpText<"Do not warn on -install-name if -dylib is not passed (default)">,
+def no_warn_dylib_install_name: Flag<["--"], "no-warn-dylib-install-name">,
+    HelpText<"Do not warn on -install_name if -dylib is not passed (default)">,
     Group<grp_lld>;
-def warn_dylib_install_name: Joined<["--"], "warn-dylib-install-name">,
-    HelpText<"Warn on -install-name if -dylib is not passed">,
+def warn_dylib_install_name: Flag<["--"], "warn-dylib-install-name">,
+    HelpText<"Warn on -install_name if -dylib is not passed">,
     Group<grp_lld>;
 def call_graph_profile_sort: Flag<["--"], "call-graph-profile-sort">,
     HelpText<"Reorder sections with call graph profile (default)">,


        


More information about the llvm-commits mailing list