Skip to content

Add icx (oneAPI DPC++) linking support on Windows - #16069

Open
vlad-perevezentsev wants to merge 9 commits into
mesonbuild:masterfrom
vlad-perevezentsev:icx-windows-sycl-linking
Open

Add icx (oneAPI DPC++) linking support on Windows#16069
vlad-perevezentsev wants to merge 9 commits into
mesonbuild:masterfrom
vlad-perevezentsev:icx-windows-sycl-linking

Conversation

@vlad-perevezentsev

Copy link
Copy Markdown

This PR closes #12470

On Windows with icx (Intel oneAPI DPC++) Meson uses link.exe for linking but link.exe cannot do the SYCL offload step that -fsycl needs.It just ignores the flag (LNK4044 so the program links but the SYCL kernel is missing at runtime.

This PR lets icx drive the link step itself like clang and nvcc do so -fsycl works. Since icx uses a clang-cl-like frontend that silently drops unknown MSVC linker flags, those flags are forwarded to the real linker with -Xlinker (close to how CudaCompiler forwards flags to nvcc) while objects and -fsycl stay on the icx side. icx is also treated as MSVC-style for import-lib / .pdb naming, for /LIBPATH: handling, and for choosing the resource compiler (rc instead of windres).

I tested it with icx 2026.1.1 on Windows:
A SYCL executable and a SYCL shared library build and run correctly;
run_project_tests.py shows no new failures compared to master.

This is my first PR to Meson. Please let me know if anything should be done differently and I will gladly fix it

@dcbaker dcbaker added this to the 1.13 milestone Aug 4, 2026
@dcbaker dcbaker self-assigned this Aug 4, 2026
@dcbaker

dcbaker commented Aug 4, 2026

Copy link
Copy Markdown
Member

I don't have time ATM, but once the 1.13 cycle starts I'll review this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't build sycl project with intel's icx on windows.

2 participants