[all-commits] [llvm/llvm-project] 7af967: [Clang][OpenCL] Fix Missing `-fdeclare-opencl-buil...
Shilei Tian via All-commits
all-commits at lists.llvm.org
Wed Mar 12 12:33:50 PDT 2025
Branch: refs/heads/users/shiltian/opencl-builtins-save-temps
Home: https://github.com/llvm/llvm-project
Commit: 7af967a100829c5ae1c08a6bc59316e56fa78b30
https://github.com/llvm/llvm-project/commit/7af967a100829c5ae1c08a6bc59316e56fa78b30
Author: Shilei Tian <i at tianshilei.me>
Date: 2025-03-12 (Wed, 12 Mar 2025)
Changed paths:
M clang/lib/Driver/Types.cpp
A clang/test/Driver/opencl-aot-compilation.cl
Log Message:
-----------
[Clang][OpenCL] Fix Missing `-fdeclare-opencl-builtins` When Using `--save-temps`
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.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list