17

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?

Steven Lu
  • 41,389
  • 58
  • 210
  • 364
nacho4d
  • 43,720
  • 45
  • 157
  • 240
  • 1
    Why this is non constructive? I am looking for an objective reason or case in where I should use lip over libtool. – nacho4d Jul 24 '15 at 01:49
  • 1
    I think this is a reasonable question. It has an objective, non-opinion answer that we can determine by reading the documentation and/or experimenting. – rob mayoff Jul 24 '15 at 01:53
  • 5
    If you run `file` on the output of the two commands, you'll see that both are “Mach-O universal binary with 2 architectures”, but the `lipo`-created file encapsulates two Mach-O object files while the `libtool`-created file encapsulates two “current ar archive random library” files. I don't think the `lipo`-created file will work as a static library file. Furthermore, if you try to put more armv7 and i386 object files into the library, the `lipo` command will fail (because it can't put multiple object files with the same architecture into its output), while the `libtool` command will succeed. – rob mayoff Jul 24 '15 at 02:10

0 Answers0