• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How to use link-time optimization?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: To update or not to update
  • Next by Date: RE: To update or not to update
  • Previous by thread: Target settings show different values than project settings
  • Next by thread: Xcode constantly eating Ram
  • Index(es):
    • Date
    • Thread