8000 Link `swiftSwiftOnoneSupport` for test xcconfigs by dnkoutso · Pull Request #6769 · CocoaPods/CocoaPods · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Link swiftSwiftOnoneSupport for test xcconfigs #6769

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

Merged
merged 1 commit into from
Jun 1, 2017

Conversation

dnkoutso
Copy link
Contributor

No description provided.

@dnkoutso dnkoutso added this to the Test Specs milestone May 31, 2017
@segiddins
Copy link
Member
segiddins commented May 31, 2017

With CocoaPods/Xcodeproj#489, I think this might be closer to what we want

diff --git a/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb b/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb
index 4ce23fe4..880ab376 100644
--- a/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb
+++ b/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb
@@ -303,12 +303,20 @@ module Pod
 
               target.test_native_targets.each do |test_target|
                 test_target.build_configurations.each do |test_target_bc|
+                  test_target_swift_debug_hack(test_target, test_target_bc)
                   test_target_bc.base_configuration_reference = xcconfig_file_ref
                 end
               end
             end
           end
 
+          def test_target_swift_debug_hack(test_target, test_target_bc)
+            return unless test_target_bc.debug?
+            return unless [target, *target.recursive_dependent_targets].any?(&:uses_swift?)
+            ldflags = test_target_bc.build_settings['OTHER_LDFLAGS'] ||= ''
+            ldflags << ' -lswiftSwiftOnoneSupport'
+          end
+
           # Creates a build phase which links the versioned header folders
           # of the OS X into the framework bundle's root root directory.
           # This is only necessary because the way how headers are copied

@dnkoutso dnkoutso force-pushed the libswiftswift_hack branch from 658ca25 to 6b0f8a5 Compare May 31, 2017 20:49
@segiddins
Copy link
Member
diff --git a/Gemfile.lock b/Gemfile.lock
index 871a168e..278ad193 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -31,7 +31,7 @@ GIT
 
 GIT
   remote: https://github.com/CocoaPods/Xcodeproj.git
-  revision: 7355a4eac5d3634725e0925cfbfa46fbcd88b933
+  revision: 76932aa3dce97408361b0cd485deff9a77e3bcb4
   branch: master
   specs:
     xcodeproj (1.4.4)
@@ -291,4 +291,4 @@ DEPENDENCIES
   xcodeproj!
 
 BUNDLED WITH
-   1.14.6
+   1.15.0
diff --git a/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb b/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb
index 4ce23fe4..880ab376 100644
--- a/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb
+++ b/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb
@@ -303,12 +303,20 @@ module Pod
 
               target.test_native_targets.each do |test_target|
                 test_target.build_configurations.each do |test_target_bc|
+                  test_target_swift_debug_hack(test_target, test_target_bc)
                   test_target_bc.base_configuration_reference = xcconfig_file_ref
                 end
               end
             end
           end
 
+          def test_target_swift_debug_hack(test_target, test_target_bc)
+            return unless test_target_bc.debug?
+            return unless [target, *target.recursive_dependent_targets].any?(&:uses_swift?)
+            ldflags = test_target_bc.build_settings['OTHER_LDFLAGS'] ||= ''
+            ldflags << ' -lswiftSwiftOnoneSupport'
+          end
+
           # Creates a build phase which links the versioned header folders
           # of the OS X into the framework bundle's root root directory.
           # This is only necessary because the way how headers are copied

@dnkoutso dnkoutso force-pushed the libswiftswift_hack branch 2 times, most recently from e455782 to 0d50aa8 Compare June 1, 2017 00:29
@dnkoutso dnkoutso force-pushed the libswiftswift_hack branch from 0d50aa8 to a4460fb Compare June 1, 2017 00:33
@segiddins
87E9
Copy link
Member

👍

@dnkoutso dnkoutso merged commit 0c20946 into CocoaPods:master Jun 1, 2017
@segiddins segiddins deleted the libswiftswift_hack branch April 20, 2018 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0