<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/100780>100780</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
"libomptarget :: x86_64-pc-linux-gnu :: offloading/bug51781.c" fails without -DCLANG_DEFAULT_LINKER=lld
</td>
</tr>
<tr>
<th>Labels</th>
<td>
openmp:libomptarget
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
jdenny-ornl
</td>
</tr>
</table>
<pre>
I am building LLVM main at 50835f0a364e850e097c40f81364909c72bb2156. The following tests fail for me:
```
Failed Tests (2):
libomptarget :: x86_64-pc-linux-gnu :: offloading/bug51781.c
libomptarget :: x86_64-pc-linux-gnu-LTO :: offloading/bug51781.c
```
The diagnostic is:
```
/usr/bin/ld: unrecognised emulation mode: llvm=-openmp-opt-disable-spmdization
Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 elf_iamcu elf_l1om elf_k1om i386pep i386pe
clang: error: linker command failed with exit code 1 (use -v to see invocation)
/tmp/llvm/llvm/llvm-mono-git/builds/explorer/llvm.org-main/bin/clang-linker-wrapper: error: 'clang' failed
clang: error: linker command failed with exit code 1 (use -v to see invocation)
```
However, if I configure with `-DCLANG_DEFAULT_LINKER=lld`, those tests pass. Additional system info:
```
$ ls -l /usr/bin/ld
lrwxrwxrwx 1 root root 19 Jan 23 2024 /usr/bin/ld -> x86_64-linux-gnu-ld
$ ls -l /usr/bin/x86_64-linux-gnu-ld
lrwxrwxrwx 1 root root 23 Jan 23 2024 /usr/bin/x86_64-linux-gnu-ld -> x86_64-linux-gnu-ld.bfd
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy8VU1v4zYQ_TX0ZSCDIvV50MGN4zatuwXatNeAEkcydylSIKl89NcXlOxsNptsW6AoIFAjm3zz3mjeSHivBoPYkPw7ku83Yg4n65qPEo15SqwzetNa-dTcgBihnZWWygxwPP7xM4xCG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