jhuber6 added a comment.

In D126398#3537942 <https://reviews.llvm.org/D126398#3537942>, @tra wrote:

> Naming, as usual, is hard. I would prefer a more explicit `--offload-link` 
> which would be in line with other --offload* options we have by now. 
> `-dl` is cryptic for uninitiated and is uncomfortably close to commonly used 
> `-ldl`. If it gets mistyped as `-ld`, it would lead to a legitimate but 
> unrelated error about missing `libd`. Or it might silently succeed linking 
> with `libd` without actually doing any device linking.

Yeah, I can see your point, `--offload-link` definitely works but it would be 
nice to have something less verbose. Maybe could just use `-dlink` or something.

>> I was considering if this could be merged into the -fuse-ld option,
>> but becuse the device linker wraps over the users linker it would
>> conflict with that. In the future it's possible to merge this into lld
>> completely or gold via a plugin. Let me know what you think for this.

I should also add, even if we built-in support for this into LLD or Gold, we'll 
probably still need a flag like this to tell Gold to use the plugin, or LLD to 
do the extra processing.

Unrelated, but in the future I'm also considering making the linker wrapper add 
the necessary libraries for whatever offloading kinds it found. E.g. if the 
link job finds embedded `OpenMP` code it will add `-lomp -lomptarget` if not 
already present.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126398/new/

https://reviews.llvm.org/D126398

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to