llvm
11268263 - [Clang][SYCL] Fix -march= corruption for NativeCPU when BoundArch is empty (#22432)

Commit
6 days ago
[Clang][SYCL] Fix -march= corruption for NativeCPU when BoundArch is empty (#22432) BoundArch("") sets Arch=OffloadArch::Unknown (not Unused), so operator bool() returns true even for an empty arch name. This caused TranslateArgs to erase -march=<value> and re-add -march= (empty), producing "unsupported argument '' to option '-march='". Fix: use !BA.empty() (checks ArchName string) instead of if (BA) (checks Arch != Unused). Broken by 448b725bb78b. Fixes test Driver/sycl-native-cpu.cpp CMPLRLLVM-76405 Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> (cherry picked from commit 2c120ab84a5bb6d6000db8d13c8692afdfb4bcec)
Author
Committer
Parents
Loading