[clang] [Clang/test] Add required targets to gpu-libc.c (PR #166900)

Madhur Amilkanthwar via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 7 05:56:18 PST 2025


madhur13490 wrote:

> The tests don't depend on the respective backends as far as I'm aware so why is this necessary?

My understanding is that when you compile a test for a target for which LLVM is not enabled (through LLVM_TARGETS_TO_BUILD), the test would fail. 

for example,
```
clang++ --target=x86_64-unknown-linux-gnu a.cpp
error: unable to create target: 'No available targets are compatible
      with triple "x86_64-unknown-linux-gnu"'
1 error generated.
```

Here, clang was built with LLVM_TARGETS_TO_BUILD="AArch64". Adding the REQUIRES line would skip the test.
Is my understanding correct?



https://github.com/llvm/llvm-project/pull/166900


More information about the cfe-commits mailing list