You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
swb: point SWIFT_LIBRARY_PATH at the SDK's Swift libraries - #465
On Linux, apps linked through clang, like the app target of an Xcode project, fail when they need the Swift compatibility libraries (for example libswiftCompatibility56 when a dependency targets iOS 15), because Swift Build looks for them next to the host toolchain.
This sets SWIFT_LIBRARY_PATH to the SDK's Swift libraries for the destination platform.
How was it tested?
Built a Capacitor app's Xcode project whose plugins target iOS 15
AI tool usage
How much of the code in this PR was AI-assisted? (check one)
0 - No AI was used to write code
1 - I was assisted by AI in writing code. I reviewed the finished result.
2 - I set the AI going and left it to it; nobody has read the result - no review, or AI review only
Summary by CodeRabbit
Bug Fixes
Non-macOS builds now use the platform-specific Swift library location within the Swift resources. This improves library resolution during builds on those platforms. The change is limited to build behavior; no user-facing interface changes are included.
No actionable comments were generated in the recent review.
Walkthrough
On non-macOS platforms, BuildCoordinator sets SWIFT_LIBRARY_PATH[__destination_platform=YES] to a platform-specific directory beneath the Swift resource directory.
Changes: Swift library path configuration
Layer / File(s)
Summary
Set platform-specific library path Sources/XToolSupport/BuildCoordinator.swift
On non-macOS platforms, BuildCoordinator adds the directory beneath swiftResourceDir that uses $(PLATFORM_NAME) to the destination-platform Swift library path.
This change points the Swift library path at the destination SDK's libraries on non-macOS hosts, so apps that need Swift compatibility libraries can link. The override is scoped to the destination platform, and no concrete risk was found. It is ready to merge.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title names the main change: SWIFT_LIBRARY_PATH now points at the SDK's Swift libraries. The raw summary confirms that BuildCoordinator sets SWIFT_LIBRARY_PATH[__destination_platform=YES] to the p…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: SWIFT_LIBRARY_PATH now points at the SDK's Swift libraries. The raw summary confirms that BuildCoordinator sets SWIFT_LIBRARY_PATH[__destination_platform=YES] to the platform-specific directory under the Swift resource directory on non-macOS platforms. The objectives describe the same goal, so the title matches the change and is specific enough for a teammate scanning history.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: ed208fb5-0c34-4c70-873f-70e68391270f
Commits
Reviewing files that changed from the base of the PR and between 73dc5f1 and f5b91a4.
Files selected for processing: 1
Sources/XToolSupport/BuildCoordinator.swift
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
On Linux, apps linked through clang, like the app target of an Xcode project, fail when they need the Swift compatibility libraries (for example
libswiftCompatibility56when a dependency targets iOS 15), because Swift Build looks for them next to the host toolchain.This sets
SWIFT_LIBRARY_PATHto the SDK's Swift libraries for the destination platform.How was it tested?
Built a Capacitor app's Xcode project whose plugins target iOS 15
AI tool usage
How much of the code in this PR was AI-assisted? (check one)
Summary by CodeRabbit