Commit graph

11 commits

Author SHA1 Message Date
KhooLy
97628a1fe2 Force SDKROOT per Rust target when building inside an Xcode script phase
The Xcode "Build Fluxa Rust Core" run-script phase runs this script
with SDKROOT already exported for whichever platform Xcode is currently
building (e.g. iphonesimulator for the FluxaIos scheme). That ambient
value leaks into cc's default sysroot for every target this script
loops over, including unrelated ones, so linking the aarch64-apple-tvos
build picked up an iphonesimulator libiconv and failed with "building
for tvOS, but linking in dylib built for iOS-simulator". Override
SDKROOT per target using the same SDK path already resolved for
bindgen, so each cargo build gets a sysroot matching its own target.
2026-07-20 17:06:10 +03:00
KhooLy
71e5d90b90 Set an iOS/tvOS deployment target when building fluxa_core per-target
build_rust_core never set IPHONEOS_DEPLOYMENT_TARGET/TVOS_DEPLOYMENT_TARGET,
so rustc fell back to its ancient default (iOS 10.0) when linking for
aarch64-apple-ios etc. That's too old for the rquickjs-sys objects, which
need ___chkstk_darwin support only available at a modern deployment
target, so linking fluxa_core failed with an undefined symbol.
build_streaming_engine already sets IPHONEOS_DEPLOYMENT_TARGET (default
18.5) for exactly this reason — mirror it here for both iOS and tvOS.
2026-07-20 16:36:37 +03:00
KhooLy
c0da06c05d Fix follow-up bug from the bindgen_env unbound-variable patch
The \${arr[@]:-} default-value form avoids bash 3.2's unbound-variable
error on an empty array, but on macOS's stock bash it still expands to
a single empty-string word, so `env "" cargo build ...` tried to exec
an empty command name and failed with exit 127. Build the cargo
invocation as an array and only wrap it with `env` when bindgen_env
actually has entries, avoiding any [@] expansion of an empty array.
2026-07-20 16:18:20 +03:00
KhooLy
33a88a8b86 Fix unbound-variable crash in the host Rust core build on macOS CI
macOS's stock /bin/bash is 3.2, which raises "unbound variable" under
set -u when expanding an empty array via \${arr[@]} even with the [@]
syntax. build_rust_core hits this on the host-only build call (no
--target flag), where bindgen_env stays empty. Use the \${arr[@]:-}
default-value form, the standard bash 3.2-safe workaround.
2026-07-20 15:49:51 +03:00
KhooLy
cfd7a4b32b Enable rquickjs bindgen against the correct Apple SDK per target
rquickjs-sys has no prebuilt FFI bindings for iOS/tvOS targets, so
bindgen needs the matching SDK sysroot (iphoneos/iphonesimulator/
appletvos/appletvsimulator) and clang target triple per cross-compiled
target, or it silently uses the host's own headers and fails. Unverified
here — no Xcode/macOS available in this environment; needs confirming
on a real Mac before relying on it.
2026-07-20 03:24:44 +03:00
KhooLy
e747ca3d0e Fix Apple streaming engine CI packaging 2026-07-14 18:41:00 +03:00
KhooLy
20476761a9 Migrate shared UI and Apple playback to KMP 2026-07-14 18:14:18 +03:00
KhooLy
72aa45b8c7 Support macOS Bash in Rust build script 2026-07-13 14:16:15 +03:00
KhooLy
091eaeff87 Bootstrap Apple Rust core before Xcode 2026-07-13 14:10:01 +03:00
KhooLy
c9b3dd0c6e Fix tvOS Rust CI target 2026-07-13 14:03:11 +03:00
KhooLy
60094c4e21 Build Apple Rust core in CI 2026-07-13 13:58:40 +03:00