[lld] r227784 - [ELF] Determine default search directories from Context.

Shankar Easwaran shankare at codeaurora.org
Tue Feb 3 18:22:47 PST 2015


On 2/3/2015 7:33 PM, Michael Spencer wrote:
> On Sun, Feb 1, 2015 at 10:31 PM, Shankar Easwaran
> <shankare at codeaurora.org> wrote:
>> On 2/2/2015 12:24 AM, Rui Ueyama wrote:
>>> On Sun, Feb 1, 2015 at 10:18 PM, Shankar Easwaran
>>> <shankare at codeaurora.org>
>>> wrote:
>>>
>>>> The reason was more that the Context should own what is the default
>>>> search
>>>> directory. The ELFLinkingContext is using the baseTriple here not the
>>>> real
>>>> triple.
>>>>
>>> Could you please elaborate why you think it should?
>>>
>>> My point was that this patch scattered the logic that used to be in one
>>> function and also added a new virtual public function that we used to not
>>> need. It doesn't seem like a good tradeoff.
>> Are you thinking that the default search path for all the ELF
>> targets(aarch64, armv7, etc) be housed in the Driver ?  I would disagree.
> They should. It's the drivers job to interact with the environment to
> figure out how to drive the linker. This is also how it works in
> clang.
I am looking at Toolchains.cpp inside clang, I think they do it since 
there is not a context thats used to drive the process.

If this is what we want to follow in lld, I will revert the patch.

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