Intel® oneAPI Base Toolkit
Support for the core tools and libraries within the base toolkit that are used to build and deploy high-performance data-centric applications.

Clang development files.

Dmitry_Savin
New Contributor I
2,778 Views

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.

0 Kudos
10 Replies
Kaleem_A_Intel
Employee
2,778 Views

Hi Savin,

Thanks for reaching out to us.

We are working on it and will get back to you.

 

Kaleem

0 Kudos
Jie_L_Intel
Employee
2,778 Views

Savin,

    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.

0 Kudos
Dmitry_Savin
New Contributor I
2,778 Views

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?

- Dmitry

0 Kudos
Jie_L_Intel
Employee
2,778 Views
Dmitry, As you said, the DPC++ compiler in Intel oneAPI Base Toolkit is mainly for SYCL code. So it may not fit with all existing C++ projects like your QtCreator.
0 Kudos
Dmitry_Savin
New Contributor I
2,778 Views
Hi Auber/Jie, I tried to compile clang separately from LLVM and found out that the LLVM installation provided by the basekit is inconsistent: LLVMExports.cmake references llvm-tblgen not provided by the installation. In the attachment you can find a one-script reproduction for the DevCloud and the generated output. PS QtCreator is not my project, it is a C++ IDE that can be used for SYCL development with the modified Clang Code Model plugin. Many people find it more convenient than Eclipse, a plugin for which is provided by the basekit. - Dmitry
0 Kudos
Jie_L_Intel
Employee
2,778 Views

hi Dimitry,

    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.  

0 Kudos
Dmitry_Savin
New Contributor I
2,778 Views

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. 

0 Kudos
STyur
New Contributor I
2,778 Views

Hi, Dmitry

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.

0 Kudos
Dmitry_Savin
New Contributor I
2,778 Views

Hi, Sergey,

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.

 

- Dmitry

0 Kudos
Jie_L_Intel
Employee
2,778 Views

Confirmed from developer team that they have no plan to include additional header files for now.

0 Kudos
Reply