Sun Studio 12: C++ User's Guide

3.3.3 Compile-Time and Link-Time Options

The following table lists the options that must be specified both at link-time and at compile-time.

Table 3–4 Compile-Time and Link-Time Options

Option  

Action  

-fast

Selects the optimum combination of compilation options for speed of executable code.

-m32|-m64

Specifies the memory model for the compiled binary object. 

-mt

Macro option that expands to -D_REENTRANT -lthread.

-xarch

Specify instruction set architecture.

-xautopar

Turns on automatic parallelization for multiple processors.

-xhwcprof

(SPARC) Enables compiler support for hardware counter-based profiling.

-xipo

Performs whole-program optimizations by invoking an interprocedural analysis component.

-xlinkopt

Performs link-time optimizations on relocatable object files.

-xmemalign

(SPARC) Specify maximum assumed memory alignment and behavior of misaligned data accesses.

-xopenmp

Supports the OpenMP interface for explicit parallelization including a set of source code directives, run-time library routines, and environment variables

-xpagesize

Sets the preferred page size for the stack and the heap.

-xpagesize_heap

Sets the preferred page size for the heap.

-xpagesize_stack

Sets the preferred page size for the stack.

-xpg

Prepares the object code to collect data for profiling with gprof(1).

-xprofile

Collects data for a profile or uses a profile to optimize.

-xvector

Enable automatic generation of calls to the vector library functions.