[lld] r217112 - If lld binary is named 'ld' on darwin, use darwin driver mode

Shankar Easwaran shankare at codeaurora.org
Sun Sep 7 21:36:04 PDT 2014


On 9/5/2014 8:41 PM, Nick Kledzik wrote:
> It would only be a problem if you built the lld binary on MacOSX, renamed it to "x86_86-netbsd-ld” than ran it and expected it to behave as a gnu linker.
>
> If you think that is a valid configuration, I can move the #if __APPLE_ check out of strToFlavor(), and instead inside UniversalDriver::link() do a check if argv[0] is exactly “ld” inside  #if __APPLE_ .
We could parse the target triple in the Universal driver, and check the 
triple if its triple.isOSDarwin() ??

Also, check GnuLdDriver::getDefaultTarget.


Shankar Easwaran

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation




More information about the llvm-commits mailing list