Repository navigation
CLI-270 - Build on Linux with the non-Apple branch - #121
Draft
andriydruk wants to merge 5 commits into
Draft
andriydruk wants to merge 5 commits into
andriydruk wants to merge 5 commits into
Conversation
… CLI-270 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Linux takes the Android source and resource lists and the Android branches in C++ and Swift, except where Android differs for platform reasons: - GCD is on, as on Android, so no `MCMainThread*` implementation is compiled and `performMethodOnMainThread` is left out. The callback queue is `dispatch_get_main_queue()`, as on Apple: the Android main queue override exists because Android never drains that queue. - ICU comes from the system through swift-unicode, with `UCHAR_TYPE=uint16_t` as on Apple, so the public headers do not pull the system ICU into the Swift module next to `_FoundationICU`. - libxml2 comes through swift-libxml, `libresolv` is linked for the MX record lookup, and `uuidString` reads the kernel UUID as on Android, without libuuid. The libdispatch headers are not on the C include path of a Linux toolchain, so `/usr/lib/swift` is added the way swift-corelibs-foundation does it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Glibc imports `SOCK_STREAM` as an enum, and swift-corelibs-foundation on Linux traps in the `NSTimeZone.default` setter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
@BugBot review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 9182d18. Configure here.
Like Android with _FoundationICU, Linux links the system ICU (libicu-dev) itself and keeps the swift-unicode product Apple-only. swift-unicode goes back to its released 68.2.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Linux takes the Android source and resource lists, so no Objective-C++ and no bundled
providers.json; spark-core registers providers itself on Linux, as the Android addon does.libicu-dev) directly, like Android links_FoundationICU; the swift-unicode product stays Apple-only at68.2.0. readdle/swift-libxml on Linux.-fsigned-charfor Android and Linux.UCHAR_TYPEfor Apple and Linux.resolvlinked on Linux.-I/usr/lib/swifton Linux for<dispatch/dispatch.h>, the same fixed path swift-corelibs-foundation uses. Android-only settings (ANDROID,log,_FoundationICU,-soname) are untouched.MC_HAS_GCDon Linux, with Android's_Block_copydeclarations, so noMCMainThread*file is needed. The ICU charset converter is enabled on Linux (libetpan has no iconv there).uuidStringreads/proc/sys/kernel/random/uuidas on Android.getMainQueue()staysdispatch_get_main_queue(): the CLI drains the main queue, as on macOS.os(Android) || os(Windows)sites also take Linux.[self-hosted, Linux, sparkbackend-dev]runningbuild-scripts/test-linux.sh.Note: changes under
src/alter the Windows prebuilt digest, so the "Windows prebuilt" check stays red untilPublish-Mailcore2Prebuilt.ps1runs on the Windows build machine.Test plan
canImport(Darwin)-only).Part of CLI-267 (Linux support for Sparkly). The dependency pins on this branch point at other
feature/CLI-267-…branches; they move to released versions before merge.🤖 Generated with Claude Code