OS X linker warnings

Dan Olson via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Wed Nov 11 09:23:48 PST 2015

Dan Olson <gorox at concast.net> writes:

> On Tuesday, 27 October 2015 at 09:19:08 UTC, David Nadlinger wrote:
>> On 27 Oct 2015, at 11:14, John Colvin via digitalmars-d-ldc wrote:
>>> one for every object file. Is there some way of fixing this?
>> This only started appearing with Xcode 7. Note that 15.0 is the
>> Darwin version, whereas 10.11 is the "public" OS X release
>> number. Not sure what is going on there.
>> If you want to give it a try, I'd start comparing the object files
>> with what Clang produces (e.g. using macho-dump).
>>  — David
> Xcode 7 ld64 does additional checks to make sure all objects meet min
> os version.  The cause may be that ldc produces a triple of
> x86_64-apple-darwin whereas clang produces the triple
> x86_64-apple-macosx.  Usually the latest version is appended
> too. Probably ldc should set OS to macosx like clang.

I confirmed that changing triple OS from Triple::Darwin (the default) to
Triple::MacOSX gets rid of all these ld warnings.

I think we need a PR.  Maybe dup the logic clang uses to pick the triple
on OS X?

More information about the digitalmars-d-ldc mailing list