[clang] [Driver][SYCL][Windows] Add SYCL windows runtime library linking support for SYCL JIT compilations (PR #194744)
Srividya Sundaram via cfe-commits
cfe-commits at lists.llvm.org
Wed May 6 15:51:52 PDT 2026
================
@@ -4911,6 +4911,35 @@ static void ProcessVSRuntimeLibrary(const ToolChain &TC, const ArgList &Args,
CmdArgs.push_back("--dependent-lib=oldnames");
}
+ // SYCL: Add SYCL runtime library dependency
+ // SYCL runtime is a required dependency similar to CRT, so we use
+ // --dependent-lib to embed it in the object file metadata
+ if (Args.hasFlag(options::OPT_fsycl, options::OPT_fno_sycl, false) &&
----------------
srividya-sundaram wrote:
The logic is in `ProcessVSRuntimeLibrary()` because this is part of Windows host runtime handling, not SYCL device compilation.
Reasons for keeping it here:
- This runs during host compilation for windows and adds `--dependent-lib` for the `Windows/MSVC` target. The SYCL toolchain handles device compilation.
- `ProcessVSRuntimeLibrary()` is already where Windows runtime libraries are handled (CRT etc.), so keeping the SYCL runtime dependency here follows the existing pattern.
- The SYCL runtime library on Windows is handled as a host runtime dependency, similar to other runtime libraries(CRT) managed in ProcessVSRuntimeLibrary()
- We don't want to have Windows-specific host library logic in the SYCL device toolchain.
https://github.com/llvm/llvm-project/pull/194744
More information about the cfe-commits
mailing list