Skip to content

build: preserve source options and add the macOS Cargo core graph - #1669

Merged
zackees merged 5 commits into
masterfrom
infra/1332-macos-core
Oct 21, 2026
Merged

zackees merged 5 commits into
masterfrom
infra/1332-macos-core

Conversation

@zackees

@zackees zackees commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Scope

Dependent #1332 implementation: canonical macOS C-reference and production Rust/C core graphs, per-source ARC/non-ARC settings, optional PCH, and validation through the existing macOS lane. The full application conversion remains open.

Refs #1332. No frontend/plugin/graphics/release-packaging completion is claimed; CMake remains authoritative pending the complete acceptance criteria.

Changes

  • Use the existing libobs/build/source-sets.json for macOS sources. Explicit OBS dependency bundle input avoids host pkg-config selection during cross compilation.
  • Apply per-source overrides after target/language flags and before PCH. Keep differently configured sources in ordered batches. Carry flags and PCH assignments through individual-source expansion; reject orphan/ambiguous settings.
  • Build the two cores with shared unported objects, preserved framework install name, macOS 13 deployment target, Rust internal-symbol hiding and HEVC export selection.
  • Support Clang PCH on macOS and stage a development framework lookup layout containing the newly linked core. Release metadata/signing/application packaging remains separate.
  • Bundled obs-sys accepts and tracks OBS_SYS_NATIVE_DEPENDENCIES through the same graph.
  • Extend the existing macOS Tier 2 script: compare Cargo exports with the actual CMake reference; check bundled compilation; prove dyld loaded each Cargo-built core; run unchanged CMake-built CTest executables against each core. No existing C tests are edited.

RED → GREEN

  • RED baf114e: actual mixed ARC/manual compilation fails with source flags missing and ARC disabled.
  • RED b285174: real ARM64 macOS build fails because the native graph is unimplemented.
  • GREEN cfb8a1e: implementation plus checks below.

Local evidence and limits

  • 14 native-build contracts pass, including actual mixed ARC/non-ARC compilation/loading, unity/PCH combinations, changed flags, and invalid annotation rejection.
  • Apple SDK 14.5 and the existing universal OBS dependency bundle: ARM64 core pair builds in all four unity/PCH modes, each with 1,877 identical exports. Intel core pair also has 1,877 matching exports. ARM64 HEVC-disabled pair has 1,873 matching exports.
  • Development framework bytes match their newly linked dylib; install name is @rpath/libobs.framework/Versions/A/libobs.
  • Real bundled obs-sys ARM64 cross-build passes using the explicit dependency bundle and freshly built release Rust archive.
  • soldr cargo fmt --all, targeted Clippy with libobs-integration and -D warnings, git diff --check, and shell syntax check pass.
  • Single read-only clud-review reviewer: clean; independently reran focused mixed ARC/non-ARC contract.

These are cross-build/export checks on Linux, not macOS runtime passes or controlled speed benchmarks. Actual CMake-export comparison and unchanged CTest runtime checks run in the macOS lane and remain required.

No public headers, existing C tests, submodule pointers, or workflow files are changed. Existing Application harness is reused.

Final SIMD alignment

Final follow-up dcbb4e450 adds the reference macOS SIMDe/OpenMP compilation settings, confirmed against cmake/macos/compilerconfig.cmake. The actual ARM64 core pair passes again with 1,877 matching exports. The same reviewer checked this small follow-up and found no issues. Final-head CI governs landing.

Objective-C rebuild probe correction

The actual macOS Rust lane exposed a fixture issue: rebuilding an Objective-C dylib and loading the same path in one process returns the retained original image. Apple's MachOAnalyzer::neverUnload() explicitly retains Objective-C dylibs (loader policy).

Follow-up 7c03fac8a runs each fixture's loaded-symbol assertion in a fresh process using the same existing test executable and exact owning test selector. All expected values, header/flag rebuilds, and unity/PCH modes remain intact; a 1 passed guard rejects a zero-test child invocation. No production code or existing C tests change. All 14 native-build contracts, targeted Clippy, formatting, and the same reviewer's follow-up review pass locally. Final-head macOS CI remains required.

Actual macOS and Windows runtime evidence

Run 39690343380, head dcbb4e450, completed both Tier 2 platform jobs successfully. macOS: 1,877 matching exports, canonical Cargo macOS core integration test and bundled obs-sys check passed; all 199 unchanged CTests passed against each Cargo-built core (reference and hybrid), in addition to the existing CMake pair. Windows: all 174 native tests passed against each existing reference/hybrid core. This run's macOS Rust fixture failure is addressed by 7c03fac8a; the final-head run must confirm that correction before merge.

Final-head CI

All required checks passed on 7c03fac8a in run 39692497038, including macOS/Windows Rust tests, cross-platform lint and both Tier 2 runtime jobs. The PR entered the normal merge queue; merge-result checks remain the final landing gate.

@zackees
zackees marked this pull request as ready for review October 21, 2026 22:56
@zackees
zackees enabled auto-merge October 21, 2026 22:56
@zackees
zackees added this pull request to the merge queue Oct 21, 2026
Merged via the queue into master with commit 74d6283 Oct 21, 2026
24 checks passed
@zackees
zackees deleted the infra/1332-macos-core branch October 26, 2026 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant