Placeholder should be used for link executable#1172
Conversation
I think this was done intentionally. CMake configuration was inherited from the Codeplay ComputeCPP implementation, which has an option to use system C++ compiler as a host compiler for the SYCL code. DPC++ has this option as well, but it's not a default one.
@frengels, did you considered using
Considering that ComputeCPP is EOLed, we should consider dropping DPC++ specific variables (i.e. @frengels, what cmake options do use for cross-compiling SYCL-CTS? |
|
Sorry, I hadn't hit send.
I have no issue with it changing from some of the host compiler flags. It's just that this would've been an unforeseen one that is added for cross-compilation with a toolchain file.
No, I wanted it to remain as vanilla as possible, only having to change the toolchain file.
I'm using the following And my toolchain file contains |
b34b2a7 to
5e5fe52
Compare
The placeholder syntax allows cmake to expand this variable and include important information for use with cross-compilation.
5e5fe52 to
3d0c72d
Compare
bader
left a comment
There was a problem hiding this comment.
To be honest, setting SYCL compiler via C++ variables looks like a hack to me, but considering that we already have it in place, I'm okay with the patch.
Conceptually, SYCL-CTS build system separates C++ sources from SYCL sources and uses different compilers for building corresponding source files.
We need to take a closer look at configuring compilers separately.
@frengels, one more note: cross-compilation is not tested by regular CI, so your use case can be broken by future PRs.
When setting the dpcpp executable directly it bypasses any additional flags which cmake would set. For example, this currently prevents cmake from setting
--target=when cross-compiling the SYCL-CTS. SinceCMAKE_CXX_COMPILERis already set toDPCPP_CXX_EXECUTABLEthis will have the same desired effect.