Creating a Library from IPO Objects

Normally, libraries are created using a library manager such as lib. Given a list of objects, the library manager will insert the objects into a named library to be used in subsequent link steps.

prompt>xiar user.a a.o b.o

A library named user.a will be created containing a.o and b.o.

If, however, the objects have been created using -ipo -c, then the objects will not contain a valid object but only the intermediate representation (IR) for that object file.

prompt>icc -ipo -c a.cpp b.cpp

will produce a.o and b.o that only contains IR to be used in a link time compilation. The library manager will not allow these to be inserted in a library.

In this case you must use the Intel library driver xild -lib. This program will invoke the compiler on the IR saved in the object file and generate a valid object that can be inserted in a library.

prompt>xild -lib /out:user.a a.o b.o