================
@@ -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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to