Commit 98a8ade7 authored by Ben Asher's avatar Ben Asher Committed by GitHub

Merge pull request #6069 from benasher44/basher_embedded_swift_yes_only

Don't explicitly set ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES to NO
parents 8fe5578f 94e0f3ff
...@@ -20,6 +20,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre` ...@@ -20,6 +20,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[Ben Asher](https://github.com/benasher44) [Ben Asher](https://github.com/benasher44)
[#6067](https://github.com/CocoaPods/CocoaPods/issues/6067) [#6067](https://github.com/CocoaPods/CocoaPods/issues/6067)
* Don't explicitly set `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` to NO
[Ben Asher](https://github.com/benasher44)
[#6064](https://github.com/CocoaPods/CocoaPods/issues/6064)
## 1.1.1 (2016-10-20) ## 1.1.1 (2016-10-20)
......
...@@ -110,17 +110,14 @@ module Pod ...@@ -110,17 +110,14 @@ module Pod
swift_version = Gem::Version.new(target_swift_version) swift_version = Gem::Version.new(target_swift_version)
should_embed = !target.requires_host_target? && pod_targets.any?(&:uses_swift?) should_embed = !target.requires_host_target? && pod_targets.any?(&:uses_swift?)
embed_value = should_embed ? 'YES' : 'NO' config = {}
if should_embed
config = { if swift_version >= EMBED_STANDARD_LIBRARIES_MINIMUM_VERSION
'ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES' => embed_value, config['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'] = 'YES'
'EMBEDDED_CONTENT_CONTAINS_SWIFT' => embed_value, else
} config['EMBEDDED_CONTENT_CONTAINS_SWIFT'] = 'YES'
end
if swift_version >= EMBED_STANDARD_LIBRARIES_MINIMUM_VERSION || !should_embed
config.delete('EMBEDDED_CONTENT_CONTAINS_SWIFT')
end end
config config
end end
......
Subproject commit f7c00702a648e986ddb11658b374c36c136ca3a0 Subproject commit 2f1efd0d419e73adaede1b293747a4c0ab37e201
...@@ -277,17 +277,17 @@ module Pod ...@@ -277,17 +277,17 @@ module Pod
@generator.generate.to_hash['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'].should == 'YES' @generator.generate.to_hash['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'].should == 'YES'
end end
it 'sets ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES to NO when there is no swift' do it 'does not set ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES when there is no swift' do
@generator.send(:pod_targets).first.stubs(:uses_swift?).returns(false) @generator.send(:pod_targets).first.stubs(:uses_swift?).returns(false)
@generator.stubs(:target_swift_version).returns(nil) @generator.stubs(:target_swift_version).returns(nil)
@generator.generate.to_hash['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'].should == 'NO' @generator.generate.to_hash['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'].nil?.should == true
end end
it 'sets ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES to NO when there is swift, but the target is an extension' do it 'does not set ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES when there is swift, but the target is an extension' do
@target.stubs(:requires_host_target?).returns(true) @target.stubs(:requires_host_target?).returns(true)
@generator.stubs(:target_swift_version).returns('2.3') @generator.stubs(:target_swift_version).returns('2.3')
@generator.send(:pod_targets).first.stubs(:uses_swift?).returns(true) @generator.send(:pod_targets).first.stubs(:uses_swift?).returns(true)
@generator.generate.to_hash['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'].should == 'NO' @generator.generate.to_hash['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'].nil?.should == true
end end
it 'does not set EMBEDDED_CONTENT_CONTAINS_SWIFT when there is swift 2.3 or higher' do it 'does not set EMBEDDED_CONTENT_CONTAINS_SWIFT when there is swift 2.3 or higher' do
......
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