[PATCH] D85309: [Driver] Support GNU ld on Solaris

Rainer Orth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 31 11:34:59 PDT 2023


ro added inline comments.


================
Comment at: clang/test/Driver/hip-link-bundle-archive.hip:59
 // RUN: %clang -### --offload-arch=gfx906 --offload-arch=gfx1030 \
-// RUN:   --target=x86_64-pc-windows-msvc \
+// RUN:   --target=x86_64-pc-windows-msvc -fuse-ld= \
 // RUN:   -nogpuinc -nogpulib %s -fgpu-rdc -L%t -lhipBundled2 \
----------------
MaskRay wrote:
> Any idea why `-fuse-ld=` is now needed?
I've tried to explain it in the change description, but just noticed the filename is wrong:

When LLVM is built with `-DCLANG_DEFAULT_LINKER=gld` on Solaris, `MSVC.cpp` `visualstudio::Linker::ConstructJob` sets `Linker` to `gld`.  Ultimately, `GetProgramPath(Linker)` is called, resulting in a search for `gld`, which exists in `/usr/bin/gld` on Solaris.  With `-fuse-ld=`, this doesn't happen and the expected `link` is returned.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85309/new/

https://reviews.llvm.org/D85309



More information about the cfe-commits mailing list