Creating a Multi-file IPO Executable

This topic describes how to use the Intel® linking tools, xild (Linux* and Mac OS*) or xilink (Windows*), instead of the method specified in Using IPO.

The Intel linking tools behave differently on different platforms. The following sections summarizes the primary differences between the linking behaviors.

Linux and Mac OS Linking Behavior Summary

Invokes the compiler to perform IPO if objects containing IR (intermediate representation) is found. (These are mock objects.) Invokes GNU ld to link the application.

The command-line syntax for xild is the same as that of the GNU linker:

xild [<options>] <normal command-line>

where:

  • [<options>]: (optional) one or more options supported only by xild.

  • <normal command-line>: linker command line containing a set of valid arguments for ld.

To create app using IPO, use the option -ofile as shown in the following example:

xild <options> -oapp a.o b.o c.o

The linking tool calls the compiler to perform IPO for objects containing IR and creates a new list of object(s) to be linked. The linker then calls ld to link the object files that are specified in the new list and produce the application with the name specified by the -o option. The linker supports the -ipo, -ipoN, and -ipo-separate options.

Windows Linking Behavior Summary

Invokes the Intel compiler to perform multi-file IPO if objects containing IR (intermediate representation) is found. These are mock objects. Invokes Microsoft* link.exe to link the application.

The command-line syntax for the Intel® linker is the same as that of the Microsoft linker:

xilink [<options>] <normal command-line>

where:

  • [<options>]: (optional) one or more options supported only by xilink.

  • <normal command-line>: linker command line containing a set of valid arguments for the Microsoft linker.

To place the multifile IPO executable in ipo_file.exe, use the linker option /out:file; for example:

xilink <options> /out:ipo_file.exe a.obj b.obj c.obj

The linker calls the compiler to perform IPO for objects containing IR and creates a new list of object(s) to be linked. The linker calls Microsoft link.exe to link the object files that are specified in the new list and produce the application with the name specified by the /out:file linker option.

Using the Linking Tools

You must use the Intel linking tools to link your application if the following conditions apply:

The following table lists the available, case-insensitive options supported by the Intel linking tools and briefly describes the behavior of each option:

Linking Tools Option

Description

-qhelp

Lists the available linking tool options. Same as passing no option.

-qnoipo

Disables multi-file IPO compilation.

-qipo_fa[{file|dir/}]

Produces assembly listing for the multi-file IPO compilation. You may specify an optional name for the listing file, or a directory (with the backslash) in which to place the file.

The default listing name is depends on the platform:

  • Linux and Mac OS: ipo_out.s

  • Windows: ipo_out.asm

If the Intel linking tool invocation results in multi-object compilation, either because the application is big or because the user explicitly instructed the compiler to generate multiple objects, the first .s (Linux and Mac OS) or .asm (Windows) file takes its name from the -qipo_fa option.

The compiler derives the names of subsequent .s (Linux and Mac OS) or .asm (Windows) files by appending an incrementing number to the name, for example, foo.asm and foo1.asm for ipo_fafoo.asm. The same is true for the -qipo_fo option (listed below).

-qipo_fo[{file|dir/}]

Produces object file for the multi-file IPO compilation. You may specify an optional name for the object file, or a directory (with the backslash) in which to place the file. The default object file name is depends on the platform:

  • Linux and Mac OS: ipo_out.o

  • Windows: ipo_out.obj

-qipo_fas

Add source lines to assembly listing.

-qipo_fac

Adds code bytes to the assembly listing.

-qipo_facs

Add code bytes and source lines to assembly listing.

-quseenv

Disables override of existing PATH, LIB, and INCLUDE variables.

-lib

Invokes librarian instead of linker.

-libtool

Mac OS: Invokes libtool to create a library instead of ld.

-qv

Displays version information.