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

Disable bitcode in iOS framework target #506

Merged
merged 1 commit into from
Aug 11, 2015

Conversation

phatblat
Copy link
Member

This change explicitly sets the ENABLE_BITCODE build setting to NO to allow the build to work in Xcode 7. I've only had these failures when building ObjectiveGit for a containing app using Carthage on the command line; for some reason the build in the GUI still works. Regardless, the Xcode 7 release notes have been warning that when bitcode is enabled for a target (default is YES in the iOS 9 SDK), it will eventually be an error if anything that target links to does not also contain bitcode.

Ld /Volumes/DerivedData/ObjectiveGitFramework-giaqbyabyyzemdcaoijtrovcrygz/Build/Intermediates/ObjectiveGitFramework.build/Release-iphoneos/ObjectiveGit-iOS.build/Objects-normal/arm64/ObjectiveGit normal arm64
    cd /Users/phatblat/dev/libgit2/GitApp/Carthage/Checkouts/objective-git
    export IPHONEOS_DEPLOYMENT_TARGET=8.0
    export PATH="/Applications/Xcode7-beta5.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode7-beta5.app/Contents/Developer/usr/bin:/usr/local/var/rbenv/shims:/usr/local/opt/rbenv/bin:/Users/phatblat/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/phatblat/Library/Python/2.7/bin"
    /Applications/Xcode7-beta5.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -dynamiclib -isysroot /Applications/Xcode7-beta5.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk -L/Volumes/DerivedData/ObjectiveGitFramework-giaqbyabyyzemdcaoijtrovcrygz/Build/Products/Release-iphoneos -LExternal/ios-openssl/lib -LExternal/libssh2-ios/lib -LExternal/libgit2-ios -F/Volumes/DerivedData/ObjectiveGitFramework-giaqbyabyyzemdcaoijtrovcrygz/Build/Products/Release-iphoneos -filelist /Volumes/DerivedData/ObjectiveGitFramework-giaqbyabyyzemdcaoijtrovcrygz/Build/Intermediates/ObjectiveGitFramework.build/Release-iphoneos/ObjectiveGit-iOS.build/Objects-normal/arm64/ObjectiveGit.LinkFileList -install_name @rpath/ObjectiveGit.framework/ObjectiveGit -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -miphoneos-version-min=8.0 -fembed-bitcode-marker -lgit2-ios -all_load -fobjc-arc -fobjc-link-runtime -liconv -lz -lssl -lcrypto -lssh2-ios -single_module -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /Volumes/DerivedData/ObjectiveGitFramework-giaqbyabyyzemdcaoijtrovcrygz/Build/Intermediates/ObjectiveGitFramework.build/Release-iphoneos/ObjectiveGit-iOS.build/Objects-normal/arm64/ObjectiveGit_dependency_info.dat -o /Volumes/DerivedData/ObjectiveGitFramework-giaqbyabyyzemdcaoijtrovcrygz/Build/Intermediates/ObjectiveGitFramework.build/Release-iphoneos/ObjectiveGit-iOS.build/Objects-normal/arm64/ObjectiveGit
ld: 'External/libgit2-ios/libgit2-ios.a(annotated_commit.c.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 arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** BUILD FAILED **

👌 Xcode 6 doesn't know about the new ENABLE_BITCODE setting. It shows up in the User-Defined settings, but has no effect.

@joshaber joshaber self-assigned this Aug 11, 2015
@joshaber
Copy link
Member

👍

joshaber added a commit that referenced this pull request Aug 11, 2015
Disable bitcode in iOS framework target
@joshaber joshaber merged commit bde1713 into libgit2:master Aug 11, 2015
@phatblat phatblat deleted the ben/xcode7/no-bitcode branch August 11, 2015 15:03
@phatblat
Copy link
Member Author

For posterity, my Debug builds in the Xcode GUI were only building for the current architecture (ONLY_ACTIVE_ARCH = YES) and I was targeting the iOS Simulator. Carthage builds for all architectures and the device architectures are where the bitcode setting really matters.

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

Successfully merging this pull request may close these issues.

2 participants