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:
Kaoru0822 authored and GitHub committed 2026-10-08 19:42:05 -07:00
commit de5bfec79f
2 files changed
+79 -1

No files matched your search

+10 -1
View File
@@ -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);