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

Iain Sandoe iain at codesourcery.com
Mon Dec 9 16:11:51 PST 2013

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).

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).

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

More information about the llvm-commits mailing list