I'm running on a 2017 macbook pro so I don't need arm64 architecture. I can thin the application manually by going to each executable and library and use lipo
to extract the x86_64 architecture, but it's very time-consuming for applications with many frameworks/libraries embedded.
Is there a software or a way to thin universal application recursively? It need to:
- identify all files that are executables/libraries and contains both x86_64 and arm64 in the application bundle, and for each file:
- extract the x86_64 part of the file
- replace the original file with the thinned file
- preferably, restore the modified date of the folder containing the file
Note that the two solutions here does not answer my question because Monolingual does not thin frameworks and libraries inside the application bundle and Xslimmer is discontinued.
otool
, there's aLC_CODE_SIGNATURE
entry per architecture. Never noticed this, and I sometimes needed to look executables with an editor; signatures are indeed present multiple times. Still leaves the question: are you sure it's worth the effort? I'd simply write a small shell script, finding all executables usingfind … -type f -perm +a=x …
, which will also find lots of files with executable bits that are not libraries or programs. You can try to filter these further usingfile
, butlipo
should ignore them anyway (with a warning). – DarkDust Nov 03 '21 at 07:57