[cfe-dev] How to change the linker of clang

Nikola Smiljanic popizdeh at gmail.com
Thu Jun 11 19:30:54 PDT 2015


That's what I used to do but each Ubuntu update would revert the symlink.
That's when I found about -fuse-ld=gold, I'd expect it to work with other
linkers as well.

On Fri, Jun 12, 2015 at 11:52 AM, Nathan Wilson <nwilson20 at gmail.com> wrote:

>
>
> On Thu, Jun 11, 2015 at 8:31 PM, Eric Lu <eirc.lew at gmail.com> wrote:
>
>> 1) Build clang with GCC-4.9.2, when compling other application s with
>> clang/clang++, the default linker is ld, can I replace it with other linker
>> tool´╝î if we can, how to do it?
>>
>> I.E. can we use collect2 instead?
>>
> You could symlink ld to point to collect2.
>
> For example I use gold and point to:
> ls -la /usr/local/bin/ld:
> /usr/local/bin/ld -> /usr/bin/gold
>
>
>> 2) how to specify the  path, if we do not use the default vertion GCC?
>>
>
> You can specify which version of GCC when you run cmake by adding the
> flags:
> -DCMAKE_C_COMPILER=<path> -DCMAKE_CXX_COMPILER=<path>
>
>
>>
>> Best Regards!
>> Eric Lew
>>
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>>
>>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150612/9f733638/attachment.html>


More information about the cfe-dev mailing list