Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion clang/lib/Driver/Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2189,7 +2189,8 @@ bool Driver::HandleImmediateArgs(const Compilation &C) {

// Null program name cannot have a path.
if (! ProgName.empty())
llvm::outs() << GetProgramPath(ProgName, TC);
llvm::outs() << (ProgName == "ld" ? TC.GetLinkerPath()
: GetProgramPath(ProgName, TC));

llvm::outs() << "\n";
return false;
Expand Down
4 changes: 4 additions & 0 deletions clang/test/Driver/print-prog-name-ld.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Test that -print-prog-name=ld correctly obeys -fuse-ld=...

// RUN: %clang -print-prog-name=ld -fuse-ld=lld 2>&1 | FileCheck %s
// CHECK:{{.*ld(64)?\.lld}}