You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Clang][OpenCL] Fix Missing -fdeclare-opencl-builtins When Using --save-temps (llvm#131017)
When compiling an OpenCL program directly with `clang` using
`--save-temps`, an
error may occur if the program contains OpenCL builtins:
```
test.cl:3:21: error: use of undeclared identifier 'get_global_id'
3 | unsigned int id = get_global_id(0);
| ^
```
This happens because the driver does not add `-fdeclare-opencl-builtins`
when
the input type is `TY_PP_CL`. This PR fixes the issue.
0 commit comments