Sun Studio 12: C User's Guide

A.1.2 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 A–2 Compile-Time and Link-Time Options Table

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.

-p

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

-xarch

Specify instruction set architecture.

-xautopar

Turns on automatic parallelization for multiple processors.

-xexplicitpar

(SPARC) Generates parallelized code based on specification of #pragma MP directives.

-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_stack

Sets the preferred page size for the stack.

-xpagesize_heap

Sets the preferred page size for the heap.

-xparallel

(SPARC) Parallelizes loops both automatically by the compiler and explicitly specified by the programmer.

-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.