Skip to content

build: support Objective-C inputs in the Cargo native engine - #1664

Merged
zackees merged 3 commits into
masterfrom
infra/1332-cargo-application
Oct 21, 2026
Merged

zackees merged 3 commits into
masterfrom
infra/1332-cargo-application

Conversation

@zackees

@zackees zackees commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Scope

Dependent build-engine step toward #1332: compile Objective-C and Objective-C++ inputs and preserve their explicit unity groups, individual-source mode and optional PCH semantics.

The complete Cargo application/platform migration remains open. This PR does not complete #1332 or claim macOS application coverage.

Changes

  • Keep C, C++, Objective-C and Objective-C++ in separate ordered compilation batches, retaining the matching generated unity-file extension.
  • Expand .m.h / .mm.hpp group members into language-correct wrappers when unity is disabled.
  • Compile optional PCH in its consumer language and include that language in the PCH identity.
  • Add contracts to the existing Application test executable; no additional test binaries.

RED → GREEN

  • RED e81621b: group-expansion contract fails because an Objective-C group remains unexpanded.
  • RED cc45065: correct the subprocess selector; actual mixed-language compilation fails with unsupported native source language Some("m").
  • GREEN 771a0fd: all 12 native-build contracts pass on Linux with GCC/Clang. The new mixed-language contract compiles, links, dynamically loads and observes changed header values with unity and PCH independently on/off (four configurations).
  • soldr cargo fmt --all --check: pass.
  • soldr cargo clippy -p obs-build -p obs-studio-rust --all-targets -- -D warnings: pass.
  • git diff --check: pass.

The Objective-C fixture uses real language constructs without Cocoa/Foundation dependencies. It exercises both unity modes on macOS when run there, but compiled PCH remains limited to the existing Linux implementation. No macOS run is claimed from local Linux evidence.

No public headers, existing C tests, submodule pointers or workflows are changed.

@zackees
zackees marked this pull request as ready for review October 21, 2026 22:17
@zackees
zackees enabled auto-merge October 21, 2026 22:17
@zackees
zackees added this pull request to the merge queue Oct 21, 2026
Merged via the queue into master with commit dd8a7a6 Oct 21, 2026
22 checks passed
@zackees
zackees deleted the infra/1332-cargo-application 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