Backport of #11537 to releases/4.201.x for the upcoming 4.201.0-rc.4.
What
Replaces the rc.3 fix for cached static Objective-C xcframeworks whose headers live in a Headers/<Module>/ subdirectory and re-import each other with the <Module/...> prefix (e.g. Google’s ARCore). rc.2 produced '<Module>/X.h' file not found; the rc.3 fix (adding the xcframework’s own Headers root next to a derived/rewritten module map) traded that for import of shadowed module because the module became reachable through two module maps.
This consumes such nested xcframeworks through their own module map with the Headers root on the search path, so the module is defined exactly once and the prefixed imports resolve. Flat-layout handling is unchanged.
Validation
- Clean cherry-pick of the squashed
#11537 commit onto releases/4.201.x (no conflicts).
#11537 is green on main (mapper unit suite 18/18 + a real two-module cached-build acceptance reproduction that fails on rc.2/rc.3 and passes with this fix).
After this merges, 4.201.0-rc.4 will be cut from the branch HEAD.
🤖 Generated with Claude Code