Tested with llvm 17.0.6 and 18.1.6, both of them seem to have the same issue.
Given an archive with a fat object file Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit object x86_64Mach-O 64-bit object x86_64] [arm64:Mach-O 64-bit object arm64Mach-O 64-bit object arm64]
Archived with ar using ar qc archive.a object.o (both Apple's ar and llvm-ar works fine in this step)
Running llvm-ranlib archive.a fails to split the fat object file and create a fat archive,
Running cmp on oldarchive.a and archive.a it tells me that only the metadata changes:
Tested with llvm 17.0.6 and 18.1.6, both of them seem to have the same issue.
1. Given an archive with a fat object file `Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit object x86_64Mach-O 64-bit object x86_64] [arm64:Mach-O 64-bit object arm64Mach-O 64-bit object arm64]`
2. Archived with ar using `ar qc archive.a object.o` (both Apple's ar and llvm-ar works fine in this step)
3. Running `llvm-ranlib archive.a` fails to split the fat object file and create a fat archive,
Running `cmp` on oldarchive.a and archive.a it tells me that only the metadata changes:
``` 20 40 57
25 61 60
26 67 40
27 61 40
28 67 40
29 67 40
30 65 40
31 65 40
32 65 40
33 60 40
34 71 40
37 65 60
38 60 40
39 61 40
43 62 60
44 60 40
49 61 66
50 60 64
51 60 64
52 66 40
53 64 40
54 64 40
```
This behavior is different than Apple's ranlib, which does create the fat archive as expected.
Let me know if anything else is needed.
Tested with llvm 17.0.6 and 18.1.6, both of them seem to have the same issue.
Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit object x86_64Mach-O 64-bit object x86_64] [arm64:Mach-O 64-bit object arm64Mach-O 64-bit object arm64]
ar qc archive.a object.o
(both Apple's ar and llvm-ar works fine in this step)llvm-ranlib archive.a
fails to split the fat object file and create a fat archive, Runningcmp
on oldarchive.a and archive.a it tells me that only the metadata changes:This behavior is different than Apple's ranlib, which does create the fat archive as expected.
Let me know if anything else is needed.