[PATCH] D51358: [driver] Do not pass "-flavor old-gnu" option to LLD linker

Eric Christopher via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 28 12:41:32 PDT 2018


LGTM

On Tue, Aug 28, 2018, 7:49 AM Simon Atanasyan via Phabricator <
reviews at reviews.llvm.org> wrote:

> atanasyan created this revision.
> atanasyan added reviewers: echristo, ruiu.
>
> The "-flavor old-gnu" option were introduced to enable old version of LLD
> ELF linker implementation. This option has been removed from the linker
> since LLD 3.9. I do not think that there is a real case when the latest
> version of Clang is used in combination with so obsoleted version of LLD
> linker. Now we can remove support of this option from the driver.
>
>
> Repository:
>   rC Clang
>
> https://reviews.llvm.org/D51358
>
> Files:
>   lib/Driver/ToolChains/Gnu.cpp
>
>
> Index: lib/Driver/ToolChains/Gnu.cpp
> ===================================================================
> --- lib/Driver/ToolChains/Gnu.cpp
> +++ lib/Driver/ToolChains/Gnu.cpp
> @@ -323,14 +323,6 @@
>    // handled somewhere else.
>    Args.ClaimAllArgs(options::OPT_w);
>
> -  const char *Exec = Args.MakeArgString(ToolChain.GetLinkerPath());
> -  if (llvm::sys::path::stem(Exec) == "lld") {
> -    CmdArgs.push_back("-flavor");
> -    CmdArgs.push_back("old-gnu");
> -    CmdArgs.push_back("-target");
> -
> CmdArgs.push_back(Args.MakeArgString(getToolChain().getTripleString()));
> -  }
> -
>    if (!D.SysRoot.empty())
>      CmdArgs.push_back(Args.MakeArgString("--sysroot=" + D.SysRoot));
>
> @@ -539,6 +531,7 @@
>    AddHIPLinkerScript(getToolChain(), C, Output, Inputs, Args, CmdArgs, JA,
>                       *this);
>
> +  const char *Exec = Args.MakeArgString(ToolChain.GetLinkerPath());
>    C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs,
> Inputs));
>  }
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180828/f7300bf9/attachment.html>


More information about the cfe-commits mailing list