ITADN

Make it possible to fetch all headers of interest from a single macOS host

#19Pull Requestkubkon 创建于 2023-03-25已合并
K
kubkoncommented
With this change, it is no longer necessary to have access to all versions of macOS of interest. It is now possible to simply download the older SDKs of interest from `developer.apple.com`, unpack them without installing them, and use the unpacked SDKs to extract the libc headers for all macOS versions of interest. The unpacking of SDKs is based on [`llvmbox`](https://github.com/rsms/llvmbox) and uses a highly abridged script from that project that is used only to parse and unpack the SDKs from `.pkg` installers. This depends on `xar` and `pbzx` utilities which do not seem overly complex, so I might implement basic versions to remove any Bashisms from this repo. While working on this, I have noticed that I have probably updated the headers of macOS 11 to macOS 12 by mistake which was wrong. This is now rectified in this PR. I have also refactored most of the code and rename the `generate` command to `dedup` instead. `fetch` command now takes an optional `--sysroot` flag too which allows us to specify a custom SDK to use.
合并状态:已合并 合并于 2023-03-25 关闭于 2023-03-25 0 条评论