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
, and
c.o
objects.
Example
xilibtool -static -o mylib.a a.o b.o c.o
Alternately, the following example command will create a dynamic library named
mylib.dylib
that includes the
a.o
,
b.o
, and
c.o
objects.
Example
xilibtool -dynamic -o mylib.dylib a.o b.o c.o
Specifying
xilibtool
is the same as specifying
xild -libtool
.

Windows* Only

Create libraries using
xilib
or
xilink -lib
to create libraries of IPO mock object files and link them on the command line.
For example, assume that you create three mock object files by using a command similar to the following:
Example
icl /c /Qipo a.cpp b.cpp c.cpp
Further assume
a.obj
contains the main subprogram. You can enter commands similar to the following to create a library.
Example
xilib -out:main.lib b.obj c.obj or xilink -lib -out:main.lib b.obj c.obj
You can link the library and the main program object file by entering a command similar to the following:
Example
xilink -out:result.exe a.obj main.lib

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804