[PATCH] D12029: [lld] LinkDriver, lld-link: introduce shim.

Martell Malone via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 14 04:39:08 PDT 2015


martell added a comment.

In http://reviews.llvm.org/D12029#224385, @ruiu wrote:

> Defining a universal driver and making COFF linker to be a shim to that is
>  not going to work. Such translation is needlessly complex. Unix and Windows
>  semantics are significantly different if you take a closer look. A lot of
>  information is going to be lost in a straightforward translation. So both
>  shim and the universal driver are going to be smart and complex.


Okay that is fine if you think turning it into a shim at the end is needlessly complex.
We probably shouldn't go down the route of parsing and converting args then.

> Please take a look at COFF/Driver.cpp. The diver drives many moving parts

>  such as the writer, symbol table etc. You don't want to mix that code with

>  other drivers which are also complicated in different ways.

> 

> They are pretty different, so let's not mix them. Keep each driver to focus

>  on only one thing.


We should at least extract COFF/Driver to Lib/LinkDriver so that we can have 2 drivers for COFF.
A GNU driver along with the link driver that are separate.

My thoughts are that

1. The GNU COFF Driver should be in COFF/Driver just like it is in ELF/Driver.
2. The Link Driver should be separate and structured much like llvm-lib. -> Lib/LinkDriver

Your thoughts?


http://reviews.llvm.org/D12029





More information about the llvm-commits mailing list