Fix Rosetta2 CocoaPods warning on Apple Silicon#32498
Conversation
|
PR build artifact for bbe32c7 is ready. |
Base commit: 61e1b6f |
Base commit: 61e1b6f |
|
@sota000 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
|
@barbieri and @mikehardy, can you please take a look at this? @fkgozali suggested you have more context on this fix. |
There was a problem hiding this comment.
Oh, interesting! Good catch+fix @oblador, thanks for the ping @sota000 - and while I will immediately defer to @barbieri if there were questions, this seems like it maintains the spirit of the original PR perfectly ("make sure ruby runs native not by translation") since a universal binary will run native if it can and there is a check for translation as the first clause.
|
makes total sense 👍 |
Summary
The current warning assumes the ruby binary to be single arch, but the ruby version shipping with macOS is universal
universal.arm64e-darwin20. This PR changes the check to search forarm64in any position instead of just the beginning to fix false positives.Changelog
[iOS] [Fixed] - Fix Rosetta2 CocoaPods warning on Apple Silicon
Test Plan
Before
On M1 Mac
pod installusing system ruby always yields a warning.After
pod installdoes not yield a warning.arch -x86_64 pod installyields a warning.