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`
[Ben Asher](https://github.com/benasher44)
[#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)
......
......@@ -110,17 +110,14 @@ module Pod
swift_version = Gem::Version.new(target_swift_version)
should_embed = !target.requires_host_target? && pod_targets.any?(&:uses_swift?)
embed_value = should_embed ? 'YES' : 'NO'
config = {
'ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES' => embed_value,
'EMBEDDED_CONTENT_CONTAINS_SWIFT' => embed_value,
}
if swift_version >= EMBED_STANDARD_LIBRARIES_MINIMUM_VERSION || !should_embed
config.delete('EMBEDDED_CONTENT_CONTAINS_SWIFT')
config = {}
if should_embed
if swift_version >= EMBED_STANDARD_LIBRARIES_MINIMUM_VERSION
config['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'] = 'YES'
else
config['EMBEDDED_CONTENT_CONTAINS_SWIFT'] = 'YES'
end
end
config
end
......
Subproject commit f7c00702a648e986ddb11658b374c36c136ca3a0
Subproject commit 2f1efd0d419e73adaede1b293747a4c0ab37e201
......@@ -277,17 +277,17 @@ module Pod
@generator.generate.to_hash['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'].should == 'YES'
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.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
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)
@generator.stubs(:target_swift_version).returns('2.3')
@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
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