spotify / XCRemoteCache

Other
825 stars 50 forks source link

Added workaround for xclibtool unexpectedly producing fat static libraries in certain cases #220

Closed grigorye closed 11 months ago

grigorye commented 11 months ago

This is workaround for the case that I encounter as part of https://github.com/spotify/XCRemoteCache/issues/190#issuecomment-1659962374.

It's not exactly the fix but workaround, enforcing thinning (vs just copying cached fat binary) when xclibtool is invoked with -static -arch xxx arguments.

grigorye commented 11 months ago

Closing this for now, as it's incompatbile with CreateUniversalBinary expecting fat binary on cache hit (revealed after #221). Therefore if we go this route, it would require increasing the scope of this PR to revert that thing in CreateUniversalBinary, effectively dropping CreateUniversalBinary at all? - that needs more investigation, and potentially not possible/may break lipo (have no clue about the reason for that behavior in CreateUniversalBinary - if there was a reason to implement it that way, probably it's still there).