keith / dyld-shared-cache-extractor

A CLI for extracting libraries from Apple's dyld shared cache file

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Create a way to extract specific dylibs

rubenvb opened this issue · comments

Usually you don't need all libraries in the cache, and only want specific ones for your use case.

e.g. icecc-create-env would only want a very limited subset of the total cache (two or three dylibs), as suggested (by me) as a solution for the macOS issues present in the current system: icecc/icecream#592 (comment)

Currently the way this tool works is it uses the "supported" interface of a dylib shipped by Apple to extract the dylibs. The only 2 functions offered by that dylib extract the entire shared cache. Theoretically we could copy-paste more of what those functions are doing (without copying too much making the tool incompatible with newer shared cache versions), but that's probably not a great option.

We could provide better UX from this tool to extract everything but only copy over the ones you care about and toss the rest after it's done, the biggest downside being performance would be the same as today. Would that solve your case?

In retrospect it may be just easier to use the extraction directory to find the libraries required.
Or the more future-proof option, let the icecc chroot use the host's libraries...

Thanks for the insight, your answer makes sense and isn't really something your tool should be handling itself IMHO.
Better to keep it simple, functional and maintainable.