Skip to content

Build: allow Darwin cross toolchains without typed allocation flags - #242

Open
cristim wants to merge 2 commits into
OpenSwiftUIProject:mainfrom
cristim:fix/darling-typed-memory-flags
Open

cristim wants to merge 2 commits into
OpenSwiftUIProject:mainfrom
cristim:fix/darling-typed-memory-flags

Conversation

@cristim

@cristim cristim commented Sep 23, 2026

Copy link
Copy Markdown

Summary

Make Apple's typed-allocation Clang flags optional in the OpenAttributeGraph SwiftPM manifest. Native builds keep the current behavior by default. A Darwin cross build using a Clang without -ftyped-memory-operations or -ftyped-cxx-new-delete can set OPENATTRIBUTEGRAPH_TYPED_MEMORY_OPERATIONS=0.

Verification

  • A target-aware arm64 macOS OpenSwiftUI_SPI build with local OpenAttributeGraph and OpenSwiftUI forks initially stopped at clang: error: unknown argument: '-ftyped-memory-operations' and '-ftyped-cxx-new-delete'.
  • With the new manifest option set to 0 in both forks, the build passed those Clang errors and reached the next source/API gap in OpenSwiftUI_SPI (NSAttributedString initWithFormat:options:locale:arguments:).
  • git diff --check passed.

This PR changes only the opt-out path for cross toolchains; the default flags remain enabled for native Apple builds.

@cristim

cristim commented Sep 23, 2026

Copy link
Copy Markdown
Author

Added a second cross-build setting in commit 4086eb1: OPENATTRIBUTEGRAPH_SWIFT_CHECKOUT_PATH selects an existing Swift source checkout for the C/C++ runtime headers. The default remains Checkouts/swift. The local Darling cross build had an empty default checkout; setting this to the local Swift 6.3.3 source removes the swift/Runtime/Metadata.h missing-header error and advances compilation to the next SDK/toolchain issues. This has been verified through the target-aware OpenSwiftUI dependency build; it does not claim a complete OpenAttributeGraph or SwiftUI runtime.

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