OneAPI intel-basekit from the apt repository provides a clang++ compiler, but not the lib/clang/10.0.0/include/clang-c/ directory containing the headers needed to build, for example, the QtCreator Clang Code Model plugin. Is there a development package that contains them? I failed to find one with dpkg -S, but these headers are installed when compiling the sycl branch of llvm from source.
- General Support
The clang in Intel oneAPI DPC++ compiler is not as general as the one built from llvm source branch. It mainly targets for DPC++ code and some interactions with OpenCL. And DPC++ compiler conforms to industry standard C++ like C++11, so if your code samples are C++11 code, they should be compiled by it provided that some third party libraries required (like the Qt you mentioned) by your code are available. You could also construct some dynamic libraries with DPC++ and calling them with the binaries that are built with your own host compilers. This usage could keep your current build infrastructure as much as possible and put some key algorithms that could benefit from running on accelerators into DPC++ build.
The QtCreator plugin mentioned in the original post requires the clang development files. To correctly parse SYCL code, the clang used must be a part of an LLVM installation that supports SYCL. Thus for a workaround I compile the Intel SYCL LLVM branch and use it to build the QtCreator. Is there a solution that does not require compiling LLVM and clang and reuse the binaries provided by the OneAPI basekit?
So what you want is to have a GUI plugin of QtCreator as an alternative of current Eclipse plugin, right? i am not very familiar with this IDE component in Intel oneAPI Base Toolkit. i will discuss this with the IDE team first for your request.
I would like to use QtCreator instead of Eclipse as the IDE. To do so I had to compile LLVM, clang and QtCreator from source. I am not aware if the latter can be shipped with the toolkit due to the legal reasons, however, the former are partially included.
The issue I raise in my previous comment is more serious as it affects any cmake-based project that uses LLVM.
Try looking at the intel version llvm - https://github.com/intel/llvm.git SYCL branch. It is based on llvm-10 and has special sycl support. But, as I discovered, OneAPI uses special versions of clang and other tools. Try to combine.
This is exactly what I did: build the LLVM, clang and QtCreator. I asked about the version in another thread, but they are not disclosed. For me the 2019-10 tag works.