Commit 6ff97d0
authored
[Clang] Fix __cpuidex conflict with other offloading targets (#157741)
It seems that for whatever reason we must:
1) Declare aux builtins when the compiling for an offload device
and
2) Define the aux builtin target macros when compiling for an offload
device.
In `cpuid.h` we try to define `__cpuidex` if it is not defined. Given
the above, the function will both be defined as a builtin in the
compiler and we can't rely on the `X86` macros to be undefined in the
case the aux-triple is `X86`.
Previously a workaround was added for NVPTX in
#152556, extend it for the
other offloading targets.
Signed-off-by: Sarnie, Nick <[email protected]>1 parent a301e1a commit 6ff97d0
2 files changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
348 | 348 | | |
349 | 349 | | |
350 | 350 | | |
351 | | - | |
| 351 | + | |
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
| |||
0 commit comments