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

Fix generating LD_RUNPATH_SEARCH_PATHS without use_frameworks! but consuming a vendored dynamic artifact. #6597

Merged
merged 1 commit into from Mar 28, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -12,6 +12,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`

##### Bug Fixes

* Fix generating `LD_RUNPATH_SEARCH_PATHS` without `use_frameworks!` but consuming a vendored dynamic artifact.
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
[#6596](https://github.com/CocoaPods/CocoaPods/issues/6596)

* Fix building with static lib subprojects (previously only supported framework subprojects).
[Ben Asher](https://github.com/benasher44)
[#5830](https://github.com/CocoaPods/CocoaPods/issues/5830)
Expand Down
6 changes: 5 additions & 1 deletion lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb
Expand Up @@ -80,7 +80,11 @@ def generate
# See https://github.com/CocoaPods/CocoaPods/issues/1216
@xcconfig.attributes.delete('USE_HEADERMAP')

generate_ld_runpath_search_paths if target.requires_frameworks?
# If any of the aggregate target dependencies bring in any vendored dynamic artifacts we should ensure to
# update the runpath search paths.
vendored_dynamic_artifacts = pod_targets.flat_map(&:file_accessors).flat_map(&:vendored_dynamic_artifacts)

generate_ld_runpath_search_paths if target.requires_frameworks? || vendored_dynamic_artifacts.count > 0

@xcconfig
end
Expand Down
5 changes: 5 additions & 0 deletions spec/unit/generator/xcconfig/aggregate_xcconfig_spec.rb
Expand Up @@ -218,6 +218,11 @@ def specs
expected = '$(inherited)'
@xcconfig.to_hash['HEADER_SEARCH_PATHS'].should.include expected
end

it 'includes default runpath search path list when not using frameworks but links a vendored dynamic framework' do
@target.stubs(:requires_frameworks?).returns(false)
@generator.generate.to_hash['LD_RUNPATH_SEARCH_PATHS'].should == "$(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'"
end
end

describe 'with a scoped pod target' do
Expand Down