Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static library not built with bitcode #102

Open
muellermichel opened this issue Nov 16, 2015 · 7 comments
Open

Static library not built with bitcode #102

muellermichel opened this issue Nov 16, 2015 · 7 comments

Comments

@muellermichel
Copy link

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?

@groue
Copy link
Owner

groue commented Nov 16, 2015

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?

@muellermichel
Copy link
Author

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!

@groue
Copy link
Owner

groue commented Nov 16, 2015

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

@MarcDahlem
Copy link

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

@groue
Copy link
Owner

groue commented Oct 12, 2016

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

@MarcDahlem
Copy link

MarcDahlem commented Oct 13, 2016

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)

@groue
Copy link
Owner

groue commented Oct 14, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants