[clang] [Clang][SYCL] Introduce clang-sycl-link-wrapper to link SYCL offloading device code (Part 1 of many) (PR #112245)
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 15 15:07:04 PDT 2024
jhuber6 wrote:
> Clang can use `lld`, `llvm-ar`, and `dsymutil` (among others), so being part of Clang certainly isn't necessary for the clang driver to invoke it.
Yes, but generally we've just stashed stuff in `clang` if we didn't plan to expose them as general utilities, since it's not like this tool is of any worth to people without `clang` enabled in their projects list.
> I'd be real interested to know if this should be part of `llvm-link` or `lld`. As a general rule we try not to accept streams of patches with big `TODO` markings to clean it all up after it lands.
I doubt it, SYCL's target is SPIR-V which isn't a traditional linked output. We could *possibly* use LTO and (once the SPIR-V backend is complete) use `-Wl,--lto-emit-llvm` to just get it to spit out the result of that and give up, but that's a little hacky. This is only using `llvm-link` to link bitcode files, which can just be done through the `Linker` API, nothing that should be inside of the linker API itself. As for TODO's, the idea is that you hopefully get the basic functionality so people can use it and then start adding more features, instead of having one gigantic patch that no one wants to review.
https://github.com/llvm/llvm-project/pull/112245
More information about the cfe-commits
mailing list