How to use link-time optimization?
How to use link-time optimization?
- Subject: How to use link-time optimization?
- From: Jens Alfke <email@hidden>
- Date: Thu, 29 Sep 2011 15:03:21 -0700
I tried turning on the “link-time optimization” (LLVM_LTO) build setting, but I get errors from the linker. This is in an iOS project that builds a couple of static libraries and then links them into an app. The command that fails is:
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/libtool -static -arch_only i386 -syslibroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk -L/Volumes/HardDisk/Couchbase/iOS-Couchbase-repo/CouchbaseMobile/build/Couchbase/Build/Products/Debug-iphonesimulator -filelist /Volumes/HardDisk/Couchbase/iOS-Couchbase-repo/CouchbaseMobile/build/Couchbase/Build/Intermediates/iMonkey.build/Debug-iphonesimulator/iMonkey.build/Objects-normal/i386/iMonkey.LinkFileList -c -framework Foundation -o /Volumes/HardDisk/Couchbase/iOS-Couchbase-repo/CouchbaseMobile/build/Couchbase/Build/Products/Debug-iphonesimulator/libiMonkey.a
And the errors I get (one per source file) look like:
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/libtool: file: /Volumes/HardDisk/Couchbase/iOS-Couchbase-repo/CouchbaseMobile/build/Couchbase/Build/Intermediates/iMonkey.build/Debug-iphonesimulator/iMonkey.build/Objects-normal/i386/jsapi.o is not an object file (not allowed in a library)
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/libtool: file: /Volumes/HardDisk/Couchbase/iOS-Couchbase-repo/CouchbaseMobile/build/Couchbase/Build/Intermediates/iMonkey.build/Debug-iphonesimulator/iMonkey.build/Objects-normal/i386/jsarena.o is not an object file (not allowed in a library)
What am I doing wrong?
—Jens
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden