[llvm-dev] [lld] Flavour option purpose

N via llvm-dev llvm-dev at lists.llvm.org
Thu Oct 26 14:20:25 PDT 2017


> I think using ld.lld or lld-link is preferred way over "lld -flavor gnu" or "lld -flavor link".

-flavor seems to be still actively used in Clang… By the the way, there seems to be no special
command name for Darwin targets, so ld.lld (incorrectly) invokes the ELF linker there
(see https://bugs.llvm.org/show_bug.cgi?id=34792#c1)

Regardless, I would be interested in hearing the answer to the rest of the questions.

> On 26 Oct 2017, at 23:10, Rui Ueyama <ruiu at google.com> wrote:
> 
> The -flavor option exists mostly for historical reasons. I think using ld.lld or lld-link is preferred way over "lld -flavor gnu" or "lld -flavor link".
> 
> On Thu, Oct 26, 2017 at 2:06 PM, N via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> Hi all,
> 
> According to lld/docs/Driver.rst, Flavor command line option determines the style of lld command-line interface when invoked.
> 
> However, it looks like this option also determines the set of supported targets we are linking for. For example, lld -flavor gnu
> cannot link mach-o binaries, and could not link PE binaries either (well, not until rL312926).
> 
> Is this really intended by the design of lld? It looks the flavours are merely legacy compatibility shims, but then why is there no
> universal lld driver that is able to link binary for any platform using a unified CLI?
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
> 



More information about the llvm-dev mailing list