[cfe-dev] Linker selection

Luba Tang lubatang at gmail.com
Fri Dec 14 06:45:33 PST 2012


2012/12/14 Erik Cederstrand <erik at cederstrand.dk>:
> Den 14/12/2012 kl. 14.24 skrev Chandler Carruth <chandlerc at google.com>:
>>
>> I don't think Clang should have to cope with compatibility for every linker -- coping with compatibility for every platform is hard enough.
>
> I agree - GNU ld flags are the de-facto standard and other linkers need to be compliant.

I also agree this. GNU ld flags are the de-factor standard. Not only
MCLinker, but also Google gold follow GNU ld.
There is a set of flags of GNU ld that linkers must support to emit
correct binary. MCLinker has spent a lot of energy to figure out this
set and has supported all of them.
And I think linkers can have a little bit preference for the rest of
flags, and ignore the flags he does not support.

So far, MCLinker will return an error if he gets an unsupported flag.
But I think in the future releases, MCLinker will not only ignore the
unsupported flags, but also has some new flags for optimizations.

>
> I believe we're only talking about being able to tell the compiler to use a specific binary as the linker.
>
> Erik
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev



More information about the cfe-dev mailing list