Difference between lipo -thin and -extract

1.1k views Asked by At

What is the difference between lipo -thin arch_type and lipo -extract arch_type [-extract arch_type...] when used to get a "single architecture" static library from a fat static library?

The documentation says:

-extract arch_type [-extract arch_type...]
Take one universal input file and copy the arch_type from that universal file into a universal output file containing only that architecture. This command requires the -output option.

-thin arch_type
Take one input file and create a thin output file with the specified arch_type. This command requires the -output option.

But to me it seems just that -extract allows multiple architectures to be extracted, while -thin only allows one architecture at a time.
Is the result of the two commands the same or am I missing something?

2

There are 2 answers

3
Richard Barber On BEST ANSWER

With extract it is possible to have a universal output given multiple architectures to extract. With thin, you cannot. You can only output a thin.

0
Grzegorz Krukowski On

The main difference is that thin removes specific architectures from a binary file, while extract extracts a specific architecture from a binary file.