[clang] [Clang][Solaris] Support --ld-path in Solaris driver (PR #163000)
Daniel Levin via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 21 04:52:52 PST 2025
daniel-levin wrote:
Ah, indeed, the "regression" indeed enforces the presence of the bug!
Consider the [code](https://github.com/llvm/llvm-project/blob/622f72f4bef8b177e1e4f318465260fbdb7711ef/clang/test/Driver/solaris-ld-sanitizer.c#L50) of the failing test:
```
/// Check i386-pc-solaris2.11, 64bit
// RUN: %clang -m64 -fsanitize=undefined --target=i386-pc-solaris2.11 %s -### -fuse-ld= \
// RUN: --sysroot=%S/Inputs/solaris_x86_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-LD-X64-UBSAN %s
// RUN: %clang -m64 -fsanitize=undefined --target=i386-pc-solaris2.11 %s -### -fuse-ld=gld \
// RUN: --sysroot=%S/Inputs/solaris_x86_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-GLD-X64-UBSAN %s
// CHECK-LD-X64-UBSAN: "-z" "relax=transtls"
// CHECK-GLD-X64-UBSAN-NOT: "-z" "relax=transtls"
```
It checks that `-z relax=transtls` is passed to the linker. This flag should only be passed to Solaris ld. If you build with CLANG_DEFAULT_LINKER as `bfd` or `gld`, this test cannot possibly be correct.
https://github.com/llvm/llvm-project/pull/163000
More information about the cfe-commits
mailing list