[clang] [AMDGPU][clang] Fix clang driver check for multiple sanitizer arguments (PR #166851)
Robert Imschweiler via cfe-commits
cfe-commits at lists.llvm.org
Sun Nov 9 07:44:22 PST 2025
ro-i wrote:
> Is this supposed to be a warning or an error. Personally I think the user should be able to do stuff like `-Xarch_host -fsanitize=a,b,c -Xarch_device -fsanitize=address` since we only support one. Seems a little unintuitive to just ignore things requested by the user just because we can't handle them.
@jhuber6 not sure if I'm interpreting this right: you're saying that we should not filter the sanitizer options at all and instead require the user to only request supported sanitizers?
An alternative / additional approach to filtering sanitizers would be to specifically gate the unsupported ones. E.g. insert something like this in `ModuleSanitizerCoverage::instrumentModule()` (`llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp`):
```c++
// Skip instrumentation for AMDGCN target
if (TargetTriple.getArch() == Triple::amdgcn) {
C->diagnose(DiagnosticInfoGeneric(
"SanitizerCoverage is not supported for AMDGCN target", DS_Warning));
return false;
}
```
https://github.com/llvm/llvm-project/pull/166851
More information about the cfe-commits
mailing list