Closed jondegenhardt closed 7 years ago
--dFlags="-flto=full;-ar"
-ar=
. The way you wrote it, the next arg would be used as archiver. It needs to be explicitly set to an empty arg to enforce the LLVM archiver.
Oh but you're disabling the internal archiver via RT_ARCHIVE_WITH_LDC=OFF
. You need to settle for one archiver. ;) - See issue #2350 for more context.
That worked, thanks! Specifically:
$ ldc-build-runtime --reset --dFlags="-flto=full;-ar=" BUILD_SHARED_LIBS=OFF
$ ldc2 -flto=full -L-L./ldc-build-runtime.tmp/lib helloworld.d
I'll try with my full programs rather than the simple helloworld.d
. If that succeeds I'll close the issue.
Alright, so the internal archiver really seems to be working with Xcode 9.0.1 again, only Xcode 9.0.0 showing that bug. @JohanEngelen: should we get rid of the workaround so that LTO (and cross-archiving to OSX) works out of the box again? Does Xcode update itself by default?
My other programs look good. Thanks much the help. As to Xcode updates - The app store prompts you to update. You aren't required to update, but it does make it annoying not to.
Thanks Jon for testing; looking forward to your updated benchmark numbers. :)
So I guess we can safely bury the workaround.
@JohanEngelen, @klickverbot: Okay to get rid of the workaround and mention the 9.0.1 requirement it in the release notes instead?
Yes, let's remove the workaround. (we can mention that one shouldn't use xcode 9.0.0 in the release notes, but not really necessary i think)
Getting link failures when trying to use
ldc-build-runtime
to build phobos/druntime with LTO on OS X. Setup:Test program:
ldc-build-runtime
command:Compilation:
The
ldc-build-command
succeeds, but the compilation fails. The compilation failure: