Sun Java Solaris Communities My SDN Account Join SDN
 
Compiler Options

Compile-Time and Link-Time Options by Language

Sun Studio
Patches
 
Documentation
Code Samples & Apps
Technical Articles & Tips
 
Forums
Blogs
 
 
 

Note: If you specify any of the options listed here, it is essential that you specify the option both at compile time and and at link time.

  • See the C++ list
  • See the F95 list

C Compile-Time and Link-Time Options

Option Meaning
-fast This option is a macro that you can effectively use as a starting point for tuning an executable for maximum run-time performance.
-mt Indicates compilation and linking for multithreaded code.
-xarch Specifies the target architecture instruction set (ISA).
-xautopar Turns on automatic parallelization for multiple processors.
-xexplicitpar Parallelizes the loops that are specified.
-xhwcprof Enables compiler support for hardware counter-based profiling.
-xipo Performs interprocedural optimizations.
-xlinkopt Performs link-time optimizations on relocatable object files.
-xmemalign Specifies the maximum assumed memory alignment and the behavior of misaligned data accesses.
-xopenmp Enable explicit parallelization with OpenMP directives.
-xpagesize Set the preferred page size for the stack and the heap.
-xpagesize_heap Set the preferred page size for the heap.
-xpagesize_stack Set the preferred page size for the stack.
-xparallel Parallelizes loops both automatically (by the compiler) and explicitly (as specified by the programmer).
-xpg Compiles for profiling with the gprof profiler.
-xprofile Collects or optimizes with runtime profiling data.
-xvector Enables automatic generation of calls to the vector library and/or the generation of the SIMD (Single Instruction Multiple Data) instructions.

C++ Compile-Time and Link-Time Options

Option Meaning
-fast This option is a macro that you can effectively use as a starting point for tuning an executable for maximum run-time performance.
-mt Indicates compilation and linking for multithreaded code.
-xarch Specifies the target architecture instruction set (ISA).
-xautopar Turns on automatic parallelization for multiple processors.
-xipo Performs interprocedural optimizations.
-xlinkopt Performs link-time optimizations on relocatable object files.
-xmemalign Specifies the maximum assumed memory alignment and the behavior of misaligned data accesses.
-xopenmp Enable explicit parallelization with OpenMP directives.
-xpagesize Set the preferred page size for the stack and the heap.
-xpagesize_heap Set the preferred page size for the heap.
-xpagesize_stack Set the preferred page size for the stack.
-xpg Compiles for profiling with the gprof profiler.
-xprofile Collects or optimizes with runtime profiling data.
-xvector Enables automatic generation of calls to the vector library and/or the generation of the SIMD (Single Instruction Multiple Data) instructions.

F95 Compile-Time and Link-Time Options

Option Meaning
-fast This option is a macro that you can effectively use as a starting point for tuning an executable for maximum run-time performance.
-mt Indicates compilation and linking for multithreaded code.
-xarch Specifies the target architecture instruction set (ISA).
-xautopar Turns on automatic parallelization for multiple processors.
-xexplicitpar Parallelizes the loops that are specified.
-xipo Performs interprocedural optimizations.
-xlinkopt Performs link-time optimizations on relocatable object files.
-xmemalign Specifies the maximum assumed memory alignment and the behavior of misaligned data accesses.
-xopenmp Enable explicit parallelization with OpenMP directives.
-xpagesize Set the preferred page size for the stack and the heap.
-xpagesize_heap Set the preferred page size for the heap.
-xpagesize_stack Set the preferred page size for the stack.
-xparallel Parallelizes loops both automatically (by the compiler) and explicitly (as specified by the programmer).
-xpg Compiles for profiling with the gprof profiler.
-xprofile Collects or optimizes with runtime profiling data.
-xvector Enables automatic generation of calls to the vector library and/or the generation of the SIMD (Single Instruction Multiple Data) instructions.

Related Links