Precompiled header support with -fsycl
- Dominant language
- LLVM
- Stars
- 1.5k
- Forks
- 854
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 137
Description
**Is your feature request related to a problem? Please describe**
The problem is compile times, especially in larger projects -- even for relatively small incremental changes.
In general C++ development, one frequently used option to mitigate this are precompiled headers. However:
```
clang++: error: Precompiled header generation is not supported with '-fsycl'
```
**Describe the solution you would like**
I'd like precompiled headers to work for DPC++ SYCL code.
I assume the issue here is related to multi-pass compilation and requiring distinct PCHs for different target triplets, but it should be possible to make this work (e.g. one PCH per triplet?).
**Describe alternatives you have considered**
The only alternative I can think of that could achieve roughly the same outcome are C++20 modules. However, that's a lot harder to do in legacy projects, and I'd be surprised if it works with `-fsycl`.
**Additional context**
Compilation times are one of the barriers to SYCL and DPCPP productivity and adoption, especially in large-scale projects.
Contributor guide
Assessment
This issue has not been assessed yet.