r211665 - [Driver] Follow-up to r211598, r211663. Do not build a dynamic linker
NAKAMURA Takumi
geek4civic at gmail.com
Tue Jun 24 22:54:39 PDT 2014
Thanks. I was afraid to expand pre-concatenated strings. Bug it was trivial. ;)
2014-06-25 14:00 GMT+09:00 Simon Atanasyan <simon at atanasyan.com>:
> Author: atanasyan
> Date: Wed Jun 25 00:00:59 2014
> New Revision: 211665
>
> URL: http://llvm.org/viewvc/llvm-project?rev=211665&view=rev
> Log:
> [Driver] Follow-up to r211598, r211663. Do not build a dynamic linker
> path using sub-strings concatenation. Return the whole string explicitly.
>
> Modified:
> cfe/trunk/lib/Driver/Tools.cpp
>
> Modified: cfe/trunk/lib/Driver/Tools.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=211665&r1=211664&r2=211665&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Driver/Tools.cpp (original)
> +++ cfe/trunk/lib/Driver/Tools.cpp Wed Jun 25 00:00:59 2014
> @@ -6929,8 +6929,8 @@ static void AddLibgcc(const llvm::Triple
> CmdArgs.push_back("-ldl");
> }
>
> -static Twine getLinuxDynamicLinker(const ArgList &Args,
> - const toolchains::Linux &ToolChain) {
> +static StringRef getLinuxDynamicLinker(const ArgList &Args,
> + const toolchains::Linux &ToolChain) {
> if (ToolChain.getTriple().getEnvironment() == llvm::Triple::Android) {
> if (ToolChain.getTriple().isArch64Bit())
> return "/system/bin/linker64";
> @@ -6964,11 +6964,11 @@ static Twine getLinuxDynamicLinker(const
> return "/lib/ld.so.1";
> } else if (ToolChain.getArch() == llvm::Triple::mips64 ||
> ToolChain.getArch() == llvm::Triple::mips64el) {
> - Twine LinkerFile =
> - mips::isNaN2008(Args) ? "ld-linux-mipsn8.so.1" : "ld.so.1";
> if (mips::hasMipsAbiArg(Args, "n32"))
> - return "/lib32/" + LinkerFile;
> - return "/lib64/" + LinkerFile;
> + return mips::isNaN2008(Args) ? "/lib32/ld-linux-mipsn8.so.1"
> + : "/lib32/ld.so.1";
> + return mips::isNaN2008(Args) ? "/lib64/ld-linux-mipsn8.so.1"
> + : "/lib64/ld.so.1";
> } else if (ToolChain.getArch() == llvm::Triple::ppc)
> return "/lib/ld.so.1";
> else if (ToolChain.getArch() == llvm::Triple::ppc64 ||
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list