Commit a8645c6f authored by Eloy Durán's avatar Eloy Durán

Fixes usage of pods in static libraries with Xcode 6.

Fixes #2666.
parent e18e00c9
......@@ -32,6 +32,14 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
[Kurry Tran](https://github.com/kurry)
[#2683](https://github.com/CocoaPods/CocoaPods/issues/2683)
* Fixes an issue when using pods in static library targets and building with
Xcode 6 which requires `OTHER_LIBTOOLFLAGS` instead of `OTHER_LDFLAGS`, thus
basically reverting to the previous Xcode behaviour, for now at least.
[Kyle Fuller](https://github.com/kylef)
[Eloy Durán](https://github.com/alloy)
[#2666](https://github.com/CocoaPods/CocoaPods/issues/2666)
## 0.34.2
##### Enhancements
......@@ -2619,7 +2627,7 @@ podspec, then update these method calls.
generated Pods project file.
* [#142](https://github.com/CocoaPods/CocoaPods/issues/): Add `-fobjc-arc` to
`OTHER_LD_FLAGS` if _any_ pods require ARC.
`OTHER_LDFLAGS` if _any_ pods require ARC.
* [#148](https://github.com/CocoaPods/CocoaPods/issues/148): External encoding
set to UTF-8 on Ruby 1.9 to fix crash caused by non-ascii characters in pod
......
......@@ -50,6 +50,7 @@ module Pod
header_search_path_flags = target.sandbox.public_headers.search_paths
@xcconfig = Xcodeproj::Config.new(
'OTHER_LDFLAGS' => XCConfigHelper.default_ld_flags(target),
'OTHER_LIBTOOLFLAGS' => '$(OTHER_LDFLAGS)',
'HEADER_SEARCH_PATHS' => XCConfigHelper.quote(target.sandbox.public_headers.search_paths),
'PODS_ROOT' => target.relative_pods_root,
'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) COCOAPODS=1',
......
......@@ -45,7 +45,7 @@ module Pod
configuration = @target.add_build_configuration(bc_name, type)
end
settings = {}
settings = { 'OTHER_LDFLAGS' => '', 'OTHER_LIBTOOLFLAGS' => '' }
if library.archs
settings['ARCHS'] = library.archs
end
......
......@@ -85,6 +85,10 @@ module Pod
@xcconfig.to_hash['OTHER_LDFLAGS'].should.not.include '-l"Pods-BananaLib"'
end
it 'should configure OTHER_LIBTOOLFLAGS flags to include OTHER_LDFLAGS' do
@xcconfig.to_hash['OTHER_LIBTOOLFLAGS'].should == '$(OTHER_LDFLAGS)'
end
#-----------------------------------------------------------------------#
before do
......
......@@ -29,7 +29,7 @@ module Pod
@installer = Installer::TargetInstaller.new(config.sandbox, @pod_target)
end
it 'Adds the architectures to the custom build configurations of the user target' do
it 'adds the architectures to the custom build configurations of the user target' do
@pod_target.archs = '$(ARCHS_STANDARD_64_BIT)'
@installer.send(:add_target)
@installer.send(:target).resolved_build_setting('ARCHS').should == {
......@@ -40,5 +40,11 @@ module Pod
}
end
it 'always clears the OTHER_LDFLAGS and OTHER_LIBTOOLFLAGS, because these lib targets do not ever need any' do
@installer.send(:add_target)
@installer.send(:target).resolved_build_setting('OTHER_LDFLAGS').values.uniq.should == ['']
@installer.send(:target).resolved_build_setting('OTHER_LIBTOOLFLAGS').values.uniq.should == ['']
end
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment