[PATCH] D126398: [Clang] Introduce `-dlink` option to perform offload device linking
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 25 11:53:33 PDT 2022
tra added inline comments.
================
Comment at: clang/include/clang/Driver/Options.td:825-826
+ HelpText<"Use the new offloading linker to perform the link job.">;
+def device_link : Flag<["-"], "dlink">, Group<Link_Group>,
+ Alias<offload_link>;
def Xlinker : Separate<["-"], "Xlinker">, Flags<[LinkerInput, RenderAsInput]>,
----------------
We typically use option aliases to provide compatibility with the legacy options. AFAICT there are no current uses of `Alias` for the sake of saving a few characters in an option name.
Is `-dlink` really needed? It's not going to be typed manually all that often, and a slightly longer option does not make any difference for cmake or make files.
I assume that partial motivation for `-dlink` is that it's a shortened alias used by NVCC for its functionally similar --device-link option. I do not think it buys us anything. We never intended to be option-compatible with nvcc and clang's CUDA compilation and relevant options have only partial overlap with NVCC's functionality-wise and almost none syntax-wise. Adding one rarely used option for the same of matching NVCC's is not worth it, IMO.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126398/new/
https://reviews.llvm.org/D126398
More information about the cfe-commits
mailing list