0

I understand that ENABLE_BITCODE will build the executable with LLVM bitcode so that the App Store can compile it to arm64 or armv7 before delivering to devices. Naturally many developers will depend on open and third party licensed source code which don't directly use xcodebuild but may want to take advantage of this feature.

Libraries like libjpeg-turbo are built using the standard configure + make, which uses clang directly. I assume that the xcodebuild ENABLE_BITCODE option must end up instructing clang to only build LLVM during the Archive for App Store process.

So in a nutshell, what is the effect of using this flag on the underlying build and can I emulate it? My assumption is that the app bundle sent to apple shall ONLY be composed of LLVM bitcode (e.g. no target architecture binary is shipped with the bundle).

I've watched the WWDC videos on app thinning. I can't believe information like this wouldn't be included.

EDIT: Another problem is the fact that many third party dependencies have a lot of hardcoded assembly. Does the ENABLE_BITCODE flag have any impact of converting the platform specific assembly to LLVM bitcode?

user102008
  • 30,736
  • 10
  • 83
  • 104
Joey Carson
  • 2,973
  • 7
  • 36
  • 60
  • clang's `-emit-llvm` flag makes it emit LLVM bitcode rather than object code. The `-flto` flag also does it as a side effect (because it needs it for performing link-time optimization). – The Paramagnetic Croissant Jul 20 '15 at 20:11
  • Yes, I came across this flag and have been wondering if it's what I'm looking for. I guess the question gets more complicated by the fact of whether or not this works during development time as well. Meaning if I build my libraries this way, will the development toolchain still compile it to target architecture. – Joey Carson Jul 20 '15 at 20:29

0 Answers0