mirror of
https://github.com/morluto/rea.git
synced 2026-11-05 22:36:08 +00:00
Merge pull request #1172 from morluto/fix/macho-arm64e-variant-slices
fix(artifacts): match lipo arm64e variant names to their FAT slices
This commit is contained in:
2 files changed
+79
-1
No files matched your search
@@ -255,7 +255,7 @@ const lipoMatchesSlice = (
|
||||
reported.cpu_subtype_code !== null;
|
||||
return (
|
||||
(hasPhysicalIdentity || structurallyUnique) &&
|
||||
reported.name === observed.architecture &&
|
||||
lipoNameMatches(reported.name, observed.architecture) &&
|
||||
(reported.file_offset === null ||
|
||||
reported.file_offset === observed.slice_offset) &&
|
||||
(reported.size === null || reported.size === observed.slice_size) &&
|
||||
@@ -269,6 +269,15 @@ const lipoMatchesSlice = (
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Newer lipo names an arm64e ABI variant `arm64e.<variant>` (for example
|
||||
* `arm64e.v1` for pointer-auth ABI version 1). The FAT table names that slice
|
||||
* `arm64e`; its physical identity is still compared field by field.
|
||||
*/
|
||||
const lipoNameMatches = (reported: string, observed: string): boolean =>
|
||||
reported === observed ||
|
||||
(observed === "arm64e" && /^arm64e\.[A-Za-z0-9_]+$/u.test(reported));
|
||||
|
||||
const parseSliceKeyInteger = (value: string | undefined): number | null => {
|
||||
if (value === undefined || !/^\d+$/u.test(value)) return null;
|
||||
const parsed = Number(value);
|
||||
|
||||
Reference in new issue
Block a user