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

Xcode 7 Bitcode support #24

Open
chrisballinger opened this issue Jul 15, 2015 · 4 comments
Open

Xcode 7 Bitcode support #24

chrisballinger opened this issue Jul 15, 2015 · 4 comments

Comments

@chrisballinger
Copy link
Collaborator

We need to add a flag -fembed-bitcode when building with Xcode 7.

@Tuzr
Copy link

Tuzr commented Jun 16, 2016

@chrisballinger Excuse me, may I know where did you add the flag? In the Xcode ?
I had got the error in below
ld: '.../Tor/lib/libtor.a(main.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Do you have this problem? Thanks !

@rainwolf
Copy link
Contributor

rainwolf commented Jun 16, 2016

Or build without bitcode? I use the following snippet in my Podfile

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['ENABLE_BITCODE'] = 'NO'
    end
  end
end

@Tuzr
Copy link

Tuzr commented Jun 16, 2016

@rainwolf Thanks!
Finally, I modify the script (build-libssl.sh, build-libevent.sh, build-tor.sh) to compile with bitcode enable, and it works !
I add this parameter at CFLAGS and CPPFLAGS
"-isystem ${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer/SDKs/${PLATFORM}${SDKVERSION}.sdk/usr/include -fembed-bitcode"

And if the arch is i386 / x86_64(Simulator), it doesn't contain Bitcode.
So it doesn't need add the parameter that just mentioned.

@cdotindia
Copy link

@Tuzr Can you share the script files with the changes? Since I'm using Cocoapods to install this library in iOS project how will I manage to add these script files while installing CPAProxy from this github repo.

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

4 participants