[PATCH][darwin] revert to .weak_definition on darwin<10

Jim Grosbach grosbach at apple.com
Mon Dec 9 16:17:04 PST 2013


On Dec 9, 2013, at 4:11 PM, Iain Sandoe <iain at codesourcery.com> wrote:

> Hi Jim,
> 
> On 10 Dec 2013, at 00:02, Jim Grosbach wrote:
>> 
>> On Dec 9, 2013, at 2:41 PM, Rafael Espíndola <rafael.espindola at gmail.com> wrote:
>> 
>>> On 6 December 2013 14:22, David Fang <fang at csl.cornell.edu> wrote:
>>>> It seems I am not very good at attaching patches.
>>>> How does this look?
>>> 
>>> MCAsmInfo has a hasWeakDefDirective. I would suggest adding a
>>> hasWeakDefCanBeHiddenDirective instead of inlining the check on the
>>> AsmPrinter.
>>> 
>>> I will let Grosbach comment on which targets/versions we should do this for.
>> 
>> <10 seems reasonable to me.
>> 
>> I don’t like using the target version for this, but as the FIXME indicates, there’s not a better answer available right now, so pragmatically this will get things working. It’s also simple enough that when/if we do get a better answer, this doesn’t make it harder to do so.
> 
> Would a patch to pass target-linker-version into the target instantiation be acceptable?
> (this is/was my plan when I next have a few mins).

Probably, yeah.

> We can then key codegen on the correct thing.
> 
> ISTM that when a compiler is "inherently a cross compiler" *and* is under development *and* might be used with a bunch of different exterior tools, that passing the linker and assembler version to the codegen is a sensible step (at least during the development phase).

Having the compiler output be used by a bunch of different exterior tools has never been a goal before. It’s always been required to use a “recent enough” binutils/cctools+ld64. You guys are in a tricky spot, though, working on a platform that realistically can’t get new low level tools (other than what clang itself builds/ships with).

> 
> However, as commented before, this param seems to reach compiler invocation and then get dropped on the floor.
> Iain

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131209/b617ebad/attachment.html>


More information about the llvm-commits mailing list