[all-commits] [llvm/llvm-project] b11674: [Object] Remove restriction universal archives hav...
Daniel Rodríguez Troitiño via All-commits
all-commits at lists.llvm.org
Mon Oct 2 19:25:45 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b1167474d886e0a4e700ebf6eea20ccd57d3aafc
https://github.com/llvm/llvm-project/commit/b1167474d886e0a4e700ebf6eea20ccd57d3aafc
Author: Daniel Rodríguez Troitiño <drodriguez at users.noreply.github.com>
Date: 2023-10-02 (Mon, 02 Oct 2023)
Changed paths:
M llvm/lib/Object/MachOUniversalWriter.cpp
M llvm/test/tools/llvm-lipo/create-archive-input.test
Log Message:
-----------
[Object] Remove restriction universal archives having both IR and native (#67505)
Mach-O archives seems to be able to contain both IR objects and native
objects mixed together. Apple tooling seems to deal with them correctly.
The current implementation was adding an additional restriction of all
the objects in the archive being either IR objects or native objects.
The changes in this commit remove that restriction and allow mixing both
IR and native objects, while still checking that the CPU restrictions
still apply (all objects in a slice need to be the same CPU
type/subtype).
A test that was testing for the previous behaviour had been modified to
test that mixed archives are allowed and that they create the expected
results.
Additionally, locally I checked the results of Apple's `libtool` against
`llvm-libtool-darwin` with this code, and the resulting libraries are
almost identical with expected differences in the GUID and code
signatures load commands, and some minor differences in the rest of the
binary.
More information about the All-commits
mailing list