From 0d9380c1443bcfc96b5c78b50b73d376031c1a9c Mon Sep 17 00:00:00 2001 From: Marcus Wu Date: Wed, 26 Jul 2023 12:30:47 +0800 Subject: [PATCH 1/5] Fix build failed in Xcode 15 beta 5 --- lib/cocoapods/generator/embed_frameworks_script.rb | 2 +- lib/cocoapods/target/build_settings.rb | 4 ++-- .../target/build_settings/aggregate_target_settings_spec.rb | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/cocoapods/generator/embed_frameworks_script.rb b/lib/cocoapods/generator/embed_frameworks_script.rb index e4956eebde..3fae8630fe 100644 --- a/lib/cocoapods/generator/embed_frameworks_script.rb +++ b/lib/cocoapods/generator/embed_frameworks_script.rb @@ -63,7 +63,7 @@ def script mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" -SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" +SWIFT_STDLIB_PATH="${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" BCSYMBOLMAP_DIR="BCSymbolMaps" diff --git a/lib/cocoapods/target/build_settings.rb b/lib/cocoapods/target/build_settings.rb index 0513479d40..cacd4d8191 100644 --- a/lib/cocoapods/target/build_settings.rb +++ b/lib/cocoapods/target/build_settings.rb @@ -359,7 +359,7 @@ def _ld_runpath_search_paths(requires_host_target: false, test_bundle: false, us else "'@loader_path/Frameworks'" end - paths << '${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}' if uses_swift + paths << '${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}' if uses_swift else paths << "'@executable_path/Frameworks'" paths << "'@loader_path/Frameworks'" @@ -866,7 +866,7 @@ def linker_names_from_libraries(libraries) search_paths = vendored_static_library_search_paths + vendored_dynamic_library_search_paths if target.uses_swift? || other_swift_flags_without_swift? search_paths << '/usr/lib/swift' - search_paths << '${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}' + search_paths << '${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}' search_paths << '$(PLATFORM_DIR)/Developer/Library/Frameworks' if test_xcconfig? end return search_paths if target.build_as_framework? || !target.should_build? diff --git a/spec/unit/target/build_settings/aggregate_target_settings_spec.rb b/spec/unit/target/build_settings/aggregate_target_settings_spec.rb index b8ceb45a90..32fabc5b64 100644 --- a/spec/unit/target/build_settings/aggregate_target_settings_spec.rb +++ b/spec/unit/target/build_settings/aggregate_target_settings_spec.rb @@ -432,7 +432,7 @@ def pod_target(spec, target_definition) mock_user_target = mock('usertarget') mock_user_target.stubs(:symbol_type).returns(:unit_test_bundle) @target.stubs(:user_targets).returns([mock_user_target]) - @generator.generate.to_hash['LD_RUNPATH_SEARCH_PATHS'].should == %q[$(inherited) /usr/lib/swift "$(PLATFORM_DIR)/Developer/Library/Frameworks" '@executable_path/../Frameworks' '@loader_path/../Frameworks' "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"] + @generator.generate.to_hash['LD_RUNPATH_SEARCH_PATHS'].should == %q[$(inherited) /usr/lib/swift "$(PLATFORM_DIR)/Developer/Library/Frameworks" '@executable_path/../Frameworks' '@loader_path/../Frameworks' "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"] end it 'includes correct default runpath search path list for OSX application user target' do @@ -440,7 +440,7 @@ def pod_target(spec, target_definition) mock_user_target = mock('usertarget') mock_user_target.stubs(:symbol_type).returns(:application) @target.stubs(:user_targets).returns([mock_user_target]) - @generator.generate.to_hash['LD_RUNPATH_SEARCH_PATHS'].should == %q[$(inherited) /usr/lib/swift '@executable_path/../Frameworks' '@loader_path/Frameworks' "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"] + @generator.generate.to_hash['LD_RUNPATH_SEARCH_PATHS'].should == %q[$(inherited) /usr/lib/swift '@executable_path/../Frameworks' '@loader_path/Frameworks' "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"] end it 'uses the target definition swift version' do From 8ba7a6af98f7872966ea6f70ddc36c3c6dbcee06 Mon Sep 17 00:00:00 2001 From: Marcus Wu Date: Wed, 26 Jul 2023 12:48:07 +0800 Subject: [PATCH 2/5] Add CHANGELOG --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 648ade011f..f68b649cf2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,9 @@ To install release candidates run `[sudo] gem install cocoapods --pre` * Use safe_load during custom YAML config loading. [Dimitris Koutsogiorgas](https://github.com/dnkoutso) [#11974](https://github.com/CocoaPods/CocoaPods/pull/11974) - +* Xcode 15 fix: Replace `DT_TOOLCHAIN_DIR` with `TOOLCHAIN_DIR` when generating sciprt. + [Marcus Wu](https://github.com/marcuswu0814) + [#12009](https://github.com/CocoaPods/CocoaPods/pull/12009) ## 1.12.1 (2023-04-18) From 2f84658b10263bad1fe15ae899ad97ff6e2fe978 Mon Sep 17 00:00:00 2001 From: Marcus Wu Date: Thu, 27 Jul 2023 15:24:25 +0800 Subject: [PATCH 3/5] Fix typo --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f68b649cf2..c76942275f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,7 @@ To install release candidates run `[sudo] gem install cocoapods --pre` * Use safe_load during custom YAML config loading. [Dimitris Koutsogiorgas](https://github.com/dnkoutso) [#11974](https://github.com/CocoaPods/CocoaPods/pull/11974) -* Xcode 15 fix: Replace `DT_TOOLCHAIN_DIR` with `TOOLCHAIN_DIR` when generating sciprt. +* Xcode 15 fix: Replace `DT_TOOLCHAIN_DIR` with `TOOLCHAIN_DIR` when generating script. [Marcus Wu](https://github.com/marcuswu0814) [#12009](https://github.com/CocoaPods/CocoaPods/pull/12009) From 84d489577628c87bf9089772e330efc6c80e2e1c Mon Sep 17 00:00:00 2001 From: Marcus Wu Date: Thu, 27 Jul 2023 22:21:24 +0800 Subject: [PATCH 4/5] Update submodule --- spec/cocoapods-integration-specs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/cocoapods-integration-specs b/spec/cocoapods-integration-specs index 5788f5a44f..773aa85e03 160000 --- a/spec/cocoapods-integration-specs +++ b/spec/cocoapods-integration-specs @@ -1 +1 @@ -Subproject commit 5788f5a44ff6d742766e86bbdb19b29979bc5311 +Subproject commit 773aa85e032ccf21d13e963c89bcdb85e36e59dd From 032ce36d82b2c4553b3dcc2151e66bd6126ab297 Mon Sep 17 00:00:00 2001 From: Marcus Wu Date: Sun, 30 Jul 2023 00:57:59 +0800 Subject: [PATCH 5/5] Update spec/cocoapods-integration-specs --- spec/cocoapods-integration-specs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/cocoapods-integration-specs b/spec/cocoapods-integration-specs index 773aa85e03..4cc6b24865 160000 --- a/spec/cocoapods-integration-specs +++ b/spec/cocoapods-integration-specs @@ -1 +1 @@ -Subproject commit 773aa85e032ccf21d13e963c89bcdb85e36e59dd +Subproject commit 4cc6b24865cd68383c15e046659e764ab576acb0