Skip to content

Avoid Metal resource output collisions in XCFrameworks - #3109

Merged
adincebic merged 1 commit into
bazelbuild:mainfrom
vakhidbetrakhmadov:fix-xcframework-metal-outputs
Oct 22, 2026
Merged

adincebic merged 1 commit into
bazelbuild:mainfrom
vakhidbetrakhmadov:fix-xcframework-metal-outputs

Conversation

@vakhidbetrakhmadov

@vakhidbetrakhmadov vakhidbetrakhmadov commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

An apple_static_xcframework containing Metal resources for both iOS device and simulator slices fails with conflicting MetalCompile actions because the slices declare the same intermediate output paths.

Use the resource output discriminator when declaring .metallib outputs and declare .air intermediates alongside their owning Metal library.

Fixes #3108.

Honor the resource output discriminator when declaring Metal libraries and scope AIR intermediates to their owning library. This prevents device and simulator compilation from declaring the same outputs when an XCFramework contains Metal resources.

Add a regression that packages compiled shader libraries in both device and simulator framework slices.
@vakhidbetrakhmadov
vakhidbetrakhmadov force-pushed the fix-xcframework-metal-outputs branch from eed947d to 5a8f127 Compare October 22, 2026 01:05

@adincebic adincebic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@adincebic
adincebic merged commit eb91878 into bazelbuild:main Oct 22, 2026
11 checks passed
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.

Conflicting Metal outputs when building device and simulator XCFramework slices

2 participants