User`s guide

Compiler Overview [7]
This produces (barring errors in the source file) a traditional, or fat, object file
ddot.o. To produce the two fat object files ddot.o and daxpy.o, each of the two
source files can be compiled separately. To do this, use the following command.
c++ -c ddot.cc daxpy.cc
Using the previous command is the same as using the following sequence of
commands.
c++ -c ddot.cc
c++ -c daxpy.cc
When compiling a file in separate-module mode, the compiler performs inter-function
optimizations within individual files. As in whole-program mode, when the compiler
constructs an executable, it also produces a program library. In separate-module
mode, however, the program library is much smaller because it contains only
information the debugger uses to locate more detailed debugging information in the
separate fat object files.
7.3.3 Mixed Mode
Whole-program and separate-module mode may be used in combination to build a
particular program. You can use mixed-mode to isolate code in fat modules from
changes made in other skinny or fat modules. You can also use it to share the same
piece of precompiled object code among several programs, while still allowing the
programs to take advantage of whole-program optimizations performed on unshared
code.
The following sequence of commands shows how to use mixed mode.
c++ -c arnoldi.cc
c++ -pl test.pl -c jacobian.cc blas.cc
c++ -pl test.pl -o test arnoldi.o jacobian.o blas.o
The first command compiles arnoldi.cc in separate-module mode, and produces
the fat object file arnold.o . In this step, the compiler optimizes functions in
arnoldi.cc without using information from the jacobian or blas functions.
The second command partially compiles jacobian.cc and blas.cc in
whole-program mode, places the results in test.pl, and produces the skinny .o
files jacobian.o and blas.o .
The third command performs final compilation and optimizations of functions from
jacobian.cc and blas.cc, then links the functions to form the executable
test. In this step, the compiler has knowledge of functions in arnoldi.cc,
jacobian.cc, and blas.cc.
S247920 83