[PATCH] lld: handling of -flavor / -core command line switches

Oleg Ranevskyy llvm.mail.list at gmail.com
Thu Sep 18 03:39:47 PDT 2014


>>! In D5384#14, @kledzik wrote:
> 1. Don't most build system invoke the compiler to invoke the linker? How are you overriding the linker?  Can you redirect to a script that invokes lld with -flavor and $@

Thank you for your attention to this.
I am overriding the linker by symlinking it to the folder where my AArch64 binutils linker is placed (I am crosscompiling).
Yes, clang++ invokes the linker in my case. I tried to pass -flavor using -Xlinker and -Wl options. -flavor never comes first in the linker's command line.

I think it's possible to write a script as you are suggesting, but I personally don't like this idea much. Lld is claimed to be compatible with existing linker options. In fact, I am not able to merely substitute my linker with lld and add -favor for it without the need to write a script to move the options around.

http://reviews.llvm.org/D5384






More information about the llvm-commits mailing list