Developer Guide and Reference

Contents

Creating a Library from IPO Objects

Linux*
and
macOS*

Libraries are often created using a library manager such as
xiar
for Linux*
/
macOS*
or
xilib
for Windows. Given a list of objects, the library manager will insert the objects into a named library to be used in subsequent link steps.
Example
xiar cru user.a a.o b.o
The above command creates a library named
user.a
containing the
a.o
and
b.o
objects.
If the objects have been created using
[Q]ipo -c
then the archive will not only contain a valid object, but the archive will also contain intermediate representation (IR) for that object file. For example, the following example will produce
a.o
and
b.o
that may be archived to produce a library containing both object code and IR for each source file.
Example
icc -ipo -c a.cpp b.cpp
The commands generate mock object files, which when placed in archive will also be accompanied by a true object file.
Using
xiar
is the same as specifying
xild -lib
.

macOS*
Only

When using
xilibtool
, specify
-static
to generate static libraries, or specify
dynamic
to create dynamic libraries. For example, the following command will create a static library named
mylib.a
that includes the
a.o
,
b.o
, an