jhuber6 wrote:

> > I don't think `lld` makes sense, but you can definitely use the LTO 
> > interface inside of this tool to create a similar effect.
> 
> Why not? `lld` is a toolchain linker (which you said this is supposed to 
> emulate), and it is an interface to the LTO interface... so it seems to me 
> like `lld` is the right place to do this.

I guess the closest analogue would be the WASM target?  It seems like overkill 
since the `ld.lld` source code doesn't really share much code and  this target 
pretty much only consumes LLVM-IR. I guess @MaskRay can vote on what makes 
sense here, since AFAIK (I'm not a SYCL or SPIR-V guy) this is mostly just 
wrapping some toolchain specific magic around LTO linking. You could totally do 
it even with the ELF target if you just pass `-Wl,--lto-emit-llvm`, I think the 
SPIR-V target might work soonish so maybe that's a reasonable option.

https://github.com/llvm/llvm-project/pull/112245
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to