Option |
Language |
Meaning |
-B |
C C++
|
Specifies whether a library binding for linking is symbolic, dynamic
(shared), or static (nonshared).
|
-c |
C C++
|
Suppresses linking with the linker and, instead, produces a .o file
for each source file.
|
-Dname |
C C++
|
Defines a macro symbol name to the preprocessor. |
-d |
C C++
|
Allows or disallows dynamic libraries for the entire executable. |
-dalign |
C C++
|
Use -xmemalign instead. |
-E |
C C++
|
Directs the CC driver to only preprocess the C++ source files,
and to send the result to stdout (standard output).
|
-erroff |
C C++
|
Suppresses compiler warning messages but has no effect on error messages.
|
-errtags |
C C++
|
Displays the message tag for each warning message of the compiler
front-end that can be suppressed with the -erroffoption or made a fatal
error with the -errwarn option.
|
-errwarn |
C C++
|
Causes the compiler to exit with a failure status for the given
warning messages.
|
-fast |
C C++
|
This option is a macro that you can effectively use as a starting
point for tuning an executable for maximum run-time performance.
|
-fma |
C C++
|
Enables automatic generation of floating-point, fused, multiply-add
instructions.
|
-fns |
C C++
|
Enables the nonstandard floating-point mode on SPARC and selects
SSE flush-to-zero mode and, where available, denormals-are-zero mode for x86.
|
-fprecision |
C C++
|
Sets floating-point rounding precision mode. |
-fround |
C C++
|
Sets the IEEE rounding mode in effect at startup. |
-fsimple |
C C++
|
Selects floating-point optimization preferences. |
-fstore |
C C++
|
Forces precision of floating-point expressions. |
-ftrap |
C C++
|
Sets the IEEE trapping mode in effect at startup but does not
install a SIGFPE handler.
|
-G |
C C++
|
Build a dynamic shared library instead of an executable file. |
-g |
C C++
|
Instructs both the compiler and the linker to prepare the file or program for debugging. |
-H |
C C++
|
Prints the path name of each include file contained in the
current compilation to the standard error output.
|
-h |
C C++
|
Assign a name to the generated shared dynamic library. |
-I |
C C++
|
Adds a pathname to the list of directories that are searched
for #include files with relative file paths.
|
-I- |
C C++
|
Change the include-file search rules. |
-i |
C C++
|
Tells the linker, ld(1), to ignore any LD_LIBRARY_PATH setting.
|
-KPIC |
C C++
|
Use -xcode=pic32 instead. |
-Kpic |
C C++
|
Use -xcode=pic13 instead. |
-keeptmp |
C C++
|
Retains the temporary files that are created during compilation. |
-L |
C C++
|
Adds a path to the library search paths. |
-l |
C C++
|
Adds dynamic or static library to linker's list of search libraries. |
-m32|64 |
C C++
|
Specifies the memory model for the compiled binary object. |
-mc |
C C++
|
Removes duplicate strings from the .comment section of the object file. |
-misalign |
C C++
|
This option is deprecated in the C compiler so use the -xmemalign=1i
option instead. However, this option is allowed in the C++ compiler where it permits
misaligned data in memory which would otherwise generate an error.
|
-mr |
C C++
|
Removes all strings from the .comment section of the object file
and, if a substitute string is supplied, places the substitute in that section.
|
-mt |
C C++
|
Indicates compilation and linking for multithreaded code. |
-native |
C C++
|
Use -xtarget=native instead. |
-nofstore |
C C++
|
Disables forced precision of expression. |
-O |
C C++
|
Macro for -x03. Note: use the capital letter o for this option, not
zero.
|
-o |
C C++
|
Sets the name of the output file (with the suffix .o) or the
executable file.
|
-P |
C C++
|
Only preprocesses source; does not compile. |
-p |
C C++
|
Use -xpg instead. |
-qp |
C C++
|
Same as -p. |
-R |
C C++
|
Builds dynamic library search paths into the executable file. |
-S |
C C++
|
Compiles and generates only assembly code. |
-s |
C C++
|
Strips the symbol table from the executable file. |
-Uname |
C C++
|
Removes any initial definition of the named macro symbol that was
created by -D on the same command line, including those implicitly
placed there by the command-line driver.
|
-w |
C C++
|
Suppresses warning messages. |
-xa |
C C++
|
Generates code for profiling. |
-xalias_level |
C C++
|
Allows the compiler to perform type-based alias-analysis. |
-xarch |
C C++
|
Specifies the target architecture instruction set (ISA). |
-xautopar |
C C++
|
Turns on automatic parallelization for multiple processors. |
-xbinopt |
C C++
|
Instructs the compiler to prepare the binary for later optimizations, transformations and analysis (see binopt(1)). |
-xbuiltin |
C C++
|
Enables or disables better optimization of standard library calls.
|
-xcache |
C C++
|
Defines the cache properties for use by the optimizer. |
-xcg |
C C++
|
Do not use this option, the current Solaris operating systems no
longer support the SPARC V7 architecture.
|
-xchar |
C C++
|
Eases the migration of code from systems where the char type is
defined as unsigned.
|
-xcheck |
C C++
|
Enables a runtime check for stack overflow. |
-xchip |
C C++
|
Specifies the target processor for use by the optimizer. |
-xcode |
C C++
|
Specifies code address space. |
-xdebugformat |
C C++
|
Identifies the format of debugger information |
-xdepend |
C C++
|
Analyzes loops for inter-iteration data dependencies and performs
loop restructuring.
|
-xe |
C C++
|
Checks only for syntax and semantic errors. |
-xF |
C C++
|
Enables the optimal reordering of functions and variables by the
linker.
|
-xhelp |
C C++
|
Displays online help for compiler options or latest readme. |
-xhwcprof |
C C++
|
Enables compiler support for hardware counter-based profiling. |
-xinline |
C C++
|
Specifies which user-written routines can be inlined by the
optimizer at -xO3 or higher.
|
-xinstrument |
C C++
|
Compiles and instruments your program for analysis by the Thread Analyzer. |
-xipo |
C C++
|
Performs interprocedural optimizations. |
-xjobs |
C C++
|
Sets compilation for multiple processors. |
-xldscope |
C C++
|
Changes the default linker scoping for the definition of extern symbols.
|
-xlibmieee |
C C++
|
Causes libm to return IEEE 754 values for math routines in
exceptional cases.
|
-xlibmil |
C C++
|
Inlines selected library routines for optimization. |
-xlibmopt |
C C++
|
Uses a library of optimized math routines. |
-xlic_lib |
C C++
|
Use -library=sunperf instead. |
-xlicinfo |
C C++
|
Obsolete: This option is silently ignored by the compiler. |
-xlinkopt |
C C++
|
Performs link-time optimizations on relocatable object files. |
-xM1 |
C C++
|
Same as -xM, except that this option does not report
dependencies for the /usr/include header files and it does not report
dependencies for compiler-supplied header files.
|
-xM |
C C++
|
Runs only the preprocessor on the named C++ programs, requesting
that it generate makefile dependencies and send the result to the standard
outputx
|
-xmaxopt |
C C++
|
Limits the level of the opt pragma. |
-xmemalign |
C C++
|
Specifies the maximum assumed memory alignment and the behavior of
misaligned data accesses.
|
-xmodel |
C C++
|
Enables the compiler to modify the form of 64-bit objects for the
Solaris x86 platforms and should only be specified for the compilation of such
objects.
|
-xnativeconnect |
C C++
|
Includes interface information inside object file and subsequent
shared libraries so that the shared library can interface with Java.
|
-xnolib |
C C++
|
Disables linking with default system libraries. |
-xnolibmil |
C C++
|
Cancels -xlibmil on the command line. |
-xnolibmopt |
C C++
|
Does not use the math routine library by turning off any previously
specified -xlibmopt options.
|
-xO |
C C++
|
Specifies optimization level. |
-xopenmp |
C C++
|
Enable explicit parallelization with OpenMP directives. |
-xpagesize |
C C++
|
Set the preferred page size for the stack and the heap. |
-xpagesize_heap |
C C++
|
Set the preferred page size for the heap. |
-xpagesize_stack |
C C++
|
Set the preferred page size for the stack. |
-xpch |
C C++
|
Activates the precompiled-header feature. |
-xpchstop |
C C++
|
Identifies the last include file to be considered in creating a
precompiled-header file.
|
-xpg |
C C++
|
Compiles for profiling with the gprof profiler. |
-xprefetch |
C C++
|
Enables and adjusts prefetch instructions on those architectures
that support prefetch.
|
-xprefetch_auto_type |
C C++
|
Determines whether or not the compiler generates indirect prefetches
for the loops indicated by the -xprefetch_level option in the same
fashion that the prefetches for direct memory accesses are generated.
|
-xprefetch_level |
C C++
|
Controls the aggressiveness of automatic insertion of prefetch
instructions as determined with -xprefetch=auto.
|
-xprofile |
C C++
|
Collects or optimizes with runtime profiling data. |
-xregs |
C C++
|
Makes available additional scratch registers for use during
compilation.
|
-xrestrict |
C C++
|
Treats pointer-valued function parameters as restricted pointers.
|
-xs |
C C++
|
Allows debugging by dbx without object files. |
-xsafe |
C C++
|
Allows the compiler to assume that no memory protection violations
occur.
|
-xspace |
C C++
|
Does not allow optimizations that increase code size. |
-xtarget |
C C++
|
Specifies the target system for instruction set and optimization. |
-xthreadvar |
C C++
|
Works in conjunction with the __thread declaration
specifier to take advantage of the compiler's thread-local storage facility.
|
-xtime |
C C++
|
Causes the CC driver to report execution times for the various
compilation passes.
|
-xtrigraphs |
C C++
|
Enables or disables recognition of trigraph sequences as defined by
the ISO/ANSI C standard.
|
-xunroll |
C C++
|
Enables unrolling of loops where possible. |
-xustr |
C C++
|
Enables compiler recognition of UTF-16 character strings and
literals.
|
-xvector |
C C++
|
Enables automatic generation of calls to the vector library and/or
the generation of the SIMD (Single Instruction Multiple Data) instructions.
|
-xvis |
C C++
|
Declares the use of the assembly-language templates defined in the
VIS[tm] instruction set Software Developers Kit (VSDK).
|
-Y |
C C++
|
Specifies a new path for the location of compilation components.
|