Skip to content

fix(ed25519): set a minimum OS when compiling the C sources for Apple - #1623

Merged
bmc08gt merged 1 commit into
code/cashfrom
fix/ed25519-min-os
Sep 30, 2026
Merged

bmc08gt merged 1 commit into
code/cashfrom
fix/ed25519-min-os

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator

compileEd25519C_* compiled the ed25519 C sources with xcrun -sdk <sdk> clang -arch <arch> -O2 -c and no minimum-version flag, so clang stamped each object with the SDK version as its minimum.

In SharedCore 0.10.0 that leaves the nine ed25519 objects (add_scalar, fe, ge, keypair, sc, sha3, sha512, sign, verify) at minos 18.5, and 15.0 on macOS, while the Kotlin/Native objects sit at 14.0 and 11.0. The iOS app and both notification extensions target 18.0, so every link emits one ld: warning: object file (…) was built for newer 'iOS' version (18.5) than being linked (18.0) per linked object. That's 21 warnings in a cold iOS build, 7 per target.

This passes the same minimums Kotlin/Native already uses: -mios-version-min=14.0, -mios-simulator-version-min=14.0 and -mmacosx-version-min=11.0. After the change, vtool -show-build reports 14.0 / 11.0 for every ed25519 object, and no object in a locally assembled SharedCore.xcframework (:kmp:shared-core:assembleSharedCoreReleaseXCFramework) is above 15.0.

The iOS warnings go away once a flipcash-shared-core-spm release built from this lands and iOS moves off 0.10.0.

compileEd25519C_* ran `xcrun -sdk <sdk> clang -arch <arch> -O2 -c` with no
-m*-version-min flag, so clang stamped each object with the SDK version as
its minimum. In SharedCore 0.10.0 the nine ed25519 objects carry minos 18.5
(macOS 15.0) while the Kotlin/Native objects carry 14.0 (macOS 11.0). The iOS
app and both notification extensions target 18.0, so each link emits one
"built for newer 'iOS' version (18.5) than being linked (18.0)" warning per
object: 21 in a cold iOS build.

Pass the same minimums Kotlin/Native uses: iOS and simulator 14.0, macOS 11.0.
@bmc08gt bmc08gt self-assigned this Sep 30, 2026
@github-actions github-actions Bot added area: crypto Solana, keys, encryption, signing type: fix Bug fix labels Sep 30, 2026
@bmc08gt
bmc08gt merged commit 9868dc1 into code/cash Sep 30, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: crypto Solana, keys, encryption, signing type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant