-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Optional xcframework support for Linux #7239
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
Changes from 2 commits
427bc40
4c83efc
9034d5f
5f16e18
a8750a1
33f6cee
e063924
56d3ddd
28a78b1
a303a0f
cd9bcd3
774a84f
233feab
bf4ceac
688b872
f92fdb0
fce61bc
325bbab
f88a984
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -123,7 +123,7 @@ extension Triple.OS { | |
| /// Returns a representation of the receiver that can be compared with platform strings declared in an XCFramework. | ||
| fileprivate var asXCFrameworkPlatformString: String? { | ||
| switch self { | ||
| case .darwin, .linux, .wasi, .win32, .openbsd, .freebsd, .noneOS: | ||
| case .darwin, .wasi, .win32, .openbsd, .freebsd, .noneOS: | ||
| return nil // XCFrameworks do not support any of these platforms today. | ||
| case .macosx: | ||
| return "macos" | ||
|
|
@@ -133,6 +133,8 @@ extension Triple.OS { | |
| return "tvos" | ||
| case .watchos: | ||
| return "watchos" | ||
| case .linux: | ||
| return ProcessInfo.processInfo.environment["_SWIFTPM_EXPERIMENTAL_LINUX_XCFRAMEWORK"] == "1" ? "linux" : nil | ||
|
||
| default: | ||
| return nil // XCFrameworks do not support any of these platforms today. | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would need to return nil for Android triples. We should move the extension from
Triple.OStoTripleand check both the os and environment fields; ensuring the environment field is gnu or musl, or at least not android/androideabi.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @jakepetroules ,
Moved and added an android check