[clang] b8bea93 - Revert "Support -fuse-ld=lld for riscv"

via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 18 11:56:42 PST 2020


Author: serge-sans-paille
Date: 2020-02-18T20:56:02+01:00
New Revision: b8bea9346af4f2644c9a1bd29710c5e3efbbd7d3

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

LOG: Revert "Support -fuse-ld=lld for riscv"

This reverts commit dd230142d8a00f5f30c3930a2407000e845dcfbf.

Failures:

http://lab.llvm.org:8011/builders/llvm-clang-win-x-armv7l/builds/4749
http://lab.llvm.org:8011/builders/llvm-clang-win-x-aarch64/builds/4752

Added: 
    

Modified: 
    clang/lib/Driver/ToolChains/RISCVToolchain.cpp
    clang/test/Driver/riscv32-toolchain.c

Removed: 
    


################################################################################
diff  --git a/clang/lib/Driver/ToolChains/RISCVToolchain.cpp b/clang/lib/Driver/ToolChains/RISCVToolchain.cpp
index 21106d003859..24c2b37c4b77 100644
--- a/clang/lib/Driver/ToolChains/RISCVToolchain.cpp
+++ b/clang/lib/Driver/ToolChains/RISCVToolchain.cpp
@@ -142,7 +142,7 @@ void RISCV::Linker::ConstructJob(Compilation &C, const JobAction &JA,
     CmdArgs.push_back("elf32lriscv");
   }
 
-  std::string Linker = getToolChain().GetLinkerPath();
+  std::string Linker = getToolChain().GetProgramPath(getShortName());
 
   bool WantCRTs =
       !Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles);

diff  --git a/clang/test/Driver/riscv32-toolchain.c b/clang/test/Driver/riscv32-toolchain.c
index c5f82d309af5..2ff3a585bda3 100644
--- a/clang/test/Driver/riscv32-toolchain.c
+++ b/clang/test/Driver/riscv32-toolchain.c
@@ -3,10 +3,6 @@
 // RUN: %clang %s -### -no-canonical-prefixes -target riscv32 2>&1 | FileCheck -check-prefix=CC1 %s
 // CC1: clang{{.*}} "-cc1" "-triple" "riscv32"
 
-// Test interaction with -fuse-ld=lld, if ld.lld is available.
-// RUN: %clang %s -### -no-canonical-prefixes -target riscv32 -fuse-ld=lld 2>&1 | FileCheck -check-prefix=LLD %s
-// LLD: {{(error: invalid linker name in argument '-fuse-ld=lld')|(ld.lld)}}
-
 // In the below tests, --rtlib=platform is used so that the driver ignores
 // the configure-time CLANG_DEFAULT_RTLIB option when choosing the runtime lib
 


        


More information about the cfe-commits mailing list