I wonder what would be the difference when using:
lipo -create i386/libAwesome.a armv7/libAwesome.a -o fat/libAwesome.a
and
libtool -static i386/libAwesome.a armv7/libAwesome.a -o fat/libAwesome.a
I have the impression that lipo
is more general, and it will simply stick two files from different architectures while libtool
is specific for libraries, Is this true?
Under what cases I should prefer Lipo over Libtool?
file
on the output of the two commands, you'll see that both are “Mach-O universal binary with 2 architectures”, but thelipo
-created file encapsulates two Mach-O object files while thelibtool
-created file encapsulates two “current ar archive random library” files. I don't think thelipo
-created file will work as a static library file. Furthermore, if you try to put more armv7 and i386 object files into the library, thelipo
command will fail (because it can't put multiple object files with the same architecture into its output), while thelibtool
command will succeed. – Bedard