thakis created this revision. thakis added a reviewer: hans. Herald added subscribers: jansvoboda11, dang. thakis requested review of this revision.
>From `man ld`: -why_load Log why each object file in a static library is loaded. That is, what symbol was needed. Also called -whyload for compatibility. So `-why_load` is the spelling preferred by the linker and `-whyload` and old compatibility setting. clang should accept the preferred form, and map both forms to the preferred form. https://reviews.llvm.org/D98156 Files: clang/include/clang/Driver/Options.td clang/lib/Driver/ToolChains/Darwin.cpp Index: clang/lib/Driver/ToolChains/Darwin.cpp =================================================================== --- clang/lib/Driver/ToolChains/Darwin.cpp +++ clang/lib/Driver/ToolChains/Darwin.cpp @@ -417,7 +417,7 @@ Args.AddAllArgs(CmdArgs, options::OPT_sectalign); Args.AddAllArgs(CmdArgs, options::OPT_sectobjectsymbols); Args.AddAllArgs(CmdArgs, options::OPT_segcreate); - Args.AddLastArg(CmdArgs, options::OPT_whyload); + Args.AddLastArg(CmdArgs, options::OPT_why_load); Args.AddLastArg(CmdArgs, options::OPT_whatsloaded); Args.AddAllArgs(CmdArgs, options::OPT_dylinker__install__name); Args.AddLastArg(CmdArgs, options::OPT_dylinker); Index: clang/include/clang/Driver/Options.td =================================================================== --- clang/include/clang/Driver/Options.td +++ clang/include/clang/Driver/Options.td @@ -3700,7 +3700,8 @@ def weak__library : Separate<["-"], "weak_library">, Flags<[LinkerInput]>; def weak__reference__mismatches : Separate<["-"], "weak_reference_mismatches">; def whatsloaded : Flag<["-"], "whatsloaded">; -def whyload : Flag<["-"], "whyload">; +def why_load : Flag<["-"], "why_load">; +def whyload : Flag<["-"], "whyload">, Alias<why_load>; def w : Flag<["-"], "w">, HelpText<"Suppress all warnings">, Flags<[CC1Option]>, MarshallingInfoFlag<DiagnosticOpts<"IgnoreWarnings">>; def x : JoinedOrSeparate<["-"], "x">, Flags<[NoXarchOption,CC1Option]>,
Index: clang/lib/Driver/ToolChains/Darwin.cpp =================================================================== --- clang/lib/Driver/ToolChains/Darwin.cpp +++ clang/lib/Driver/ToolChains/Darwin.cpp @@ -417,7 +417,7 @@ Args.AddAllArgs(CmdArgs, options::OPT_sectalign); Args.AddAllArgs(CmdArgs, options::OPT_sectobjectsymbols); Args.AddAllArgs(CmdArgs, options::OPT_segcreate); - Args.AddLastArg(CmdArgs, options::OPT_whyload); + Args.AddLastArg(CmdArgs, options::OPT_why_load); Args.AddLastArg(CmdArgs, options::OPT_whatsloaded); Args.AddAllArgs(CmdArgs, options::OPT_dylinker__install__name); Args.AddLastArg(CmdArgs, options::OPT_dylinker); Index: clang/include/clang/Driver/Options.td =================================================================== --- clang/include/clang/Driver/Options.td +++ clang/include/clang/Driver/Options.td @@ -3700,7 +3700,8 @@ def weak__library : Separate<["-"], "weak_library">, Flags<[LinkerInput]>; def weak__reference__mismatches : Separate<["-"], "weak_reference_mismatches">; def whatsloaded : Flag<["-"], "whatsloaded">; -def whyload : Flag<["-"], "whyload">; +def why_load : Flag<["-"], "why_load">; +def whyload : Flag<["-"], "whyload">, Alias<why_load>; def w : Flag<["-"], "w">, HelpText<"Suppress all warnings">, Flags<[CC1Option]>, MarshallingInfoFlag<DiagnosticOpts<"IgnoreWarnings">>; def x : JoinedOrSeparate<["-"], "x">, Flags<[NoXarchOption,CC1Option]>,
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits