• 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
Re: How do I tell if a library contains bitcode?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I tell if a library contains bitcode?


  • Subject: Re: How do I tell if a library contains bitcode?
  • From: Jens Alfke <email@hidden>
  • Date: Sat, 03 Oct 2015 18:13:54 -0700


On Oct 2, 2015, at 11:40 AM, Jens Alfke <email@hidden> wrote:

How does one tell whether a static library contains bitcode?

Jon Hjelle suggested:

A while back I came across this answer in the forums: https://forums.developer.apple.com/thread/3971#11560

Quick summary for the list:

Use `otool -l | grep __LLVM` to search for the “__LLVM” segment (there’s a “bitcode” section that will also exist, but it’s not a sufficient condition to check for the presence of embedded bitcode).

This works. Unfortunately what I found is that the original static libraries built by Xcode contain bitcode, but when I use `lipo` to combine the device and simulator libraries into one, the resulting library is missing the bitcode.

Basically my build script just does
lipo -create -output fatLibrary.a Release-iphoneos/library.a Release-iphonesimulator/library.a
This is necessary to create a library that can be used to build an app for both simulator and device. (If we distribute two library files, it requires a bunch of ugly customization of the developer’s project’s build settings. This is a very longstanding flaw in Xcode that I and others have complained about several times.)

Unfortunately the lipo tool has very few options, so there doesn’t seem to be a way to turn off whatever behavior is causing the __LLVM segment to be lost in the copying process.

—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

  • Follow-Ups:
    • Re: How do I tell if a library contains bitcode?
      • From: Jon Hjelle <email@hidden>
References: 
 >How do I tell if a library contains bitcode? (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Swift Command Line Programs that Need Swift Frameworks
  • Next by Date: Re: Size of my app's window on different screens?
  • Previous by thread: How do I tell if a library contains bitcode?
  • Next by thread: Re: How do I tell if a library contains bitcode?
  • Index(es):
    • Date
    • Thread