jhuber6 wrote:

> It seems like this patch is not enough for a case, when we have multiple 
> offload-arch (one of which is SPIR-V) and -no-lto is passed - in this case 
> -no-lto will leak to SPIR-V compilation breaking it.
> 
> I have 2 drafts for the fix:
> 
>     1. Insert the !Triple.isSPIRV() in 2 more places to force ignore -no-lto;
> 
>     2. Do something different actually by introducing an overload to -no-lto 
> option, which would also accept a string argument to specify for which 
> architecture apply it (the guards will be still needed, but the solution 
> would look a bit more pleasent).
> 
> 
> While option 1 is easy and have a small blast, I personally lean towards 
> option 2. WDYT?
> 
> @jhuber6 @AlexVlx @mgcarrasco @sarnex

Hm, truthfully this should be handled by something like `-Xarch_device -flto` 
and -foffload-lto should've never existed. 

https://github.com/llvm/llvm-project/pull/202986
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to