GRMustache icon indicating copy to clipboard operation
GRMustache copied to clipboard

Static library not built with bitcode

Open muellermichel opened this issue 9 years ago • 7 comments

I'd like to add the static libary to a project, but it is not compatible anymore because of lacking bitcode. I also didn't find an xCode project to build the static library with that flag enabled. Is there an easy way to solve this?

muellermichel avatar Nov 16 '15 03:11 muellermichel

Hello Michel.

Yes, it is possible to do so, but you first need to tell me which platform you target. Is is watchOS, iOS, OS X, tvOS?

groue avatar Nov 16 '15 07:11 groue

Hi. It's iOS. I temporarily solved it by just adding the sources to the project instead, that works for me too. But thanks for your quick reaction!

muellermichel avatar Nov 16 '15 07:11 muellermichel

OK, so that's cool for now. Yet your request is perfectly legit: let's keep this issue open until it is resolved.

groue avatar Nov 16 '15 07:11 groue

Same problem here. Can you please rebuild the static library with bitcode enabled, so that the LLVM Optimization from Apple works?

MarcDahlem avatar Oct 12 '16 14:10 MarcDahlem

hello @MarcDahlem. Do you know how to do this? A PR would be welcome.

groue avatar Oct 12 '16 14:10 groue

hi @groue thanks for your quick answer.

I don't know your exact build process, but I think you're using xcodebuild in your makefile.

Therefore, here is an StackOverflow Answer, which explains in detail how to do it: http://stackoverflow.com/a/31486233/6920268

Maybe there is also another way, by directly changing the xcodeproj. See: http://stackoverflow.com/questions/31233395/ios-library-to-bitcode http://stackoverflow.com/questions/32868297/compiling-ios-library-with-bitcode-enabled

How to test if it works:

  • create a new iOS Project
  • Include GRMustache and call it somwhere (include as static library)
  • Execute: It should work
    • (At the moment there is an error message, that says that if the project itself has bitcode enabled, all referenced libraries must have it as well)

MarcDahlem avatar Oct 13 '16 17:10 MarcDahlem

Great, @MarcDahlem, you have all the pieces of the puzzle. I think you can apply it to the Makefile that produces the static library.

groue avatar Oct 14 '16 05:10 groue