Skip to content

fix: patch aws-lc-sys with iOS cross-compilation fix#314

Draft
lukejmann wants to merge 1 commit intobump-aws-lc-brokenfrom
fix/aws-lc-ios
Draft

fix: patch aws-lc-sys with iOS cross-compilation fix#314
lukejmann wants to merge 1 commit intobump-aws-lc-brokenfrom
fix/aws-lc-ios

Conversation

@lukejmann
Copy link
Copy Markdown
Contributor

@lukejmann lukejmann commented Mar 19, 2026

Summary

Proves that the upstream fixes in lukejmann/aws-lc@fix/ios-cross-compilation resolve the iOS build failure.
Base branch (bump-aws-lc-broken) is commit d71e976 — the bare aws-lc-sys 0.38.0 bump with no workarounds. This is the commit that fails CI on the Swift build job.
This PR patches target.h and urandom.c at build time (via cargo fetch + sed in build_swift.sh) to apply the same two fixes from the upstream PR. No [patch.crates-io], no fork dependency — just a direct source patch against the crates.io package.

Before / After

CI Run Result
Before (base, no fix) 23310002470 urandom.c fails: ioctl undeclared, RNDGETENTCNT undeclared
target.h only (fix 1 alone) 23324550452 Still fails — TARGET_OS_IPHONE not available on Xcode 16.2
Both fixes (target.h + urandom.c guard) 23324841015 Pass — all 13 checks green

Upstream PR

aws/aws-lc#3111

aws-lc-sys 0.38.0 fails to compile urandom.c for aarch64-apple-ios on
Xcode 16.2 because target.h doesn't include <TargetConditionals.h>,
so OPENSSL_IOS is never defined and the build falls through to the
Linux urandom path.

Patches target.h in the cargo registry before building iOS targets.
This directly proves the upstream root cause fix works:
aws/aws-lc#3111

Made-with: Cursor
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.

1 participant