This topic provides a reference to all the compiler options and some linker control options.
Option | Description | Default |
---|---|---|
-A- | Disables all predefined macros. More... |
OFF |
-[no]align IA-32 only |
Analyze and reorder memory layout for variables and arrays. | OFF |
-[no]restrict | Enables/disables pointer disambiguation with the restrict qualifier. | OFF |
-Aname[(value)] | Associates a symbol name
with the specified sequence of value. Equivalent
to an #assert preprocessing directive. More... |
OFF |
-alias_args[-] | This option implies arguments may be aliased [not aliased]. | -alias_args |
-ansi | Equivalent to GNU* ANSI. | OFF |
-ansi_alias[-] | -ansi_alias directs
the compiler to assume the following:
|
OFF |
-auto_ilp32 Itanium-based systems only |
Specifies that the application cannot exceed a 32-bit address space, which allows the compiler to use 32-bit pointers whenever possible. To use this option, you must also specify -ipo. Using the -auto_ilp32 option on programs that can exceed 32-bit address space (2**32) may cause unpredictable results during program execution. | OFF |
-ax{K|W|N|B|P} IA-32 only |
Generates specialized code for processor-specific
codes K, W, N,
B, and P while also generating
generic IA-32 code.
|
OFF |
-C | Places comments in preprocessed source
output. More... |
OFF |
-c | Stops the compilation process after an
object file has been generated. The compiler generates an object file
for each C or C++ source file or preprocessed source file. Also takes
an assembler file and invokes the assembler to generate an object file. More... |
OFF |
-c99[-] | Enables [disables] C99 support for C
programs. More... |
ON |
-complex_limited_range[-] | Enables the use of "delete basic algebraic expansions" of some arithmetic operations involving data of type _Complex. This can cause some performance improvements in programs that use _Complex arithmetic, but values at the extremes of the exponent range may not compute correctly. Default is -complex_limited_range-. | OFF |
-create_pch filename | Manual creation of precompiled header (filename.pchi). | OFF |
-cxxlib-gcc | Link using C++ run-time libraries provided with gcc (requires gcc 3.2 or above) | OFF |
-cxxlib-icc | Link using C++ run-time libraries provided by Intel. | ON |
-dM | Output macro definitions in effect after preprocessing (use with -E). | OFF |
-Dname[=value] | Defines a macro name
and associates it with the specified value.
Equivalent to a #define preprocessor directive. More... |
OFF |
-dryrun | Show driver tool commands, but do not execute tools. | OFF |
-dynamic-linkerfilename | Selects a dynamic linker (filename) other than the default. | OFF |
-E | Stops the compilation process after the
C or C++ source files have been preprocessed, and writes the results to
stdout. More... |
OFF |
-EP | Preprocess to stdout omitting #line
directives. More... |
OFF |
-f[no]verbose-asm | Produce assemblable file with compiler comments. | ON |
-falias | Assume aliasing in program. | ON |
-fast | Maximize speed across the entire program.
Turns on -O3, -ipo, and
-static. More... |
OFF |
-fcode-asm | Produce assemblable file with optional code annotations. Requires -S. | OFF |
-ffnalias | Assume aliasing within functions | ON |
-fminshared | Compilation is for the main executable. Absolute addressing can be used and non-position independent code generated for symbols that are at least protected. | OFF |
-fno-alias | Assume no aliasing in program. | OFF |
-fno-common | Enables the compiler to treat common variables as if they were defined, allowing the use of gprel addressing of common data variables. | OFF |
-fno-fnalias | Assume no aliasing within functions, but assume aliasing across calls. | OFF |
-fno-rtti | Disable RTTI support. | OFF |
-fnsplit[-] Itanium-based systems only |
Enables [disables] function splitting. Default is ON with -prof_use. To disable function splitting when you use -prof_use, also specify -fnsplit-. | OFF |
-fp IA-32 only |
Disable using the EBP register as general
purpose register. More... |
OFF |
-fpic, -fPIC | For IA-32, this option generates position
independent code. For Itanium-based systems, this option generates code allowing full symbol preemption. |
OFF |
-fp_port IA-32 only |
Round fp results at assignments and casts. Some speed impact. | OFF |
-fpstkchk IA-32 only |
Generates extra code after every function
call to assure the FP stack is in the expected state. More... |
OFF |
-fr32 Itanium-based systems only |
Use only lower 32 floating-point registers. | OFF |
-fshort-enums | Allocate as many bytes as needed for enumerated types. | OFF |
-fsource-asm | Produce assemblable file with optional code annotations. Requires -S. | OFF |
-fsyntax-only | Same as -syntax. | OFF |
-ftz[-] Itanium-based systems only |
Flushes denormal results to zero. The
option is turned ON with -O3. More... |
OFF |
-funsigned-bitfields | Change default bitfield type to unsigned. | OFF |
-funsigned-char | Change default char type to unsigned. | OFF |
-fvisibility-default=file | Space separated symbols listed in the file argument will get visibility set to default. More... | OFF |
-fvisibility-extern=file | Space separated symbols listed in the file argument will get visibility set to extern. More... | OFF |
-fvisibility-hidden=file | Space separated symbols listed in the file argument will get visibility set to hidden. More... | OFF |
-fvisibility-internal=file | Space separated symbols listed in the file argument will get visibility set to internal. More... | OFF |
-fvisibility-protected=file | Space separated symbols listed in the file argument will get visibility set to protected. More... | OFF |
-fvisibility= [extern|default|protected |hidden|internal] |
Global symbols (common and defined data and functions) will get the visibility attribute given by default. Symbol visibility attributes explicitly set in the source code or using the symbol visibility attribute file options will override the -fvisibility setting. More... | OFF |
-fwritable-strings | Ensure that string literals are placed in a writable data section. | OFF |
-g | Generates symbolic debugging information
in the object code for use by source-level debuggers. The -g
option changes the default optimization from -O2
to -O0. More... |
OFF |
-gcc-name=name | Use this option to specify the location of g++ when compiler cannot locate gcc C++ libraries. For use with -cxxlib-gcc configuration. Use this option when referencing a non-standard gcc installation. | OFF |
-gcc-version=nnn | This option provides compatible behavior with gcc, where nnn indicates the gcc version. This version of the Intel compiler supports -gcc-version=320 (Default). | ON |
-H | Print "include" file order and continue compilation. | OFF |
-help | Prints compiler options summary. | OFF |
-idirafterdir | Add directory (dir) to the second include file search path (after -I). | OFF |
-Idirectory | Specifies an additional directory
to search
for include files. More... |
OFF |
-i_dynamic | Link Intel provided libraries dynamically. | OFF |
-inline_debug_info | Preserve the source position of inlined code instead of assigning the call-site source position to inlined code. | OFF |
-ip | Enables interprocedural optimizations
for single file compilation. More... |
OFF |
-IPF_fma[-] Itanium-based systems only |
Enable [disable] the combining of floating-point
multiplies and add/subtract operations. More... |
OFF |
-IPF_fltacc[-] Itanium-based systems only |
Enable [disable] optimizations that affect
floating-point accuracy. More... |
OFF |
-IPF_flt_eval_method0 Itanium-based systems only |
Floating-point operands evaluated to
the precision indicated by the program. More... |
OFF |
-IPF_fp_speculationmode Itanium-based systems only |
Enable floating-point speculations with
the following mode conditions:
|
OFF |
-ip_no_inlining | Disables inlining that would result from
the -ip interprocedural optimization, but has
no effect on other interprocedural optimizations. More... |
OFF |
-ip_no_pinlining IA-32 only |
Disable partial inlining. Requires -ip or -ipo. | OFF |
-ipo | Enables interprocedural optimizations
across files. More... |
OFF |
-ipo_c | Generates a multifile object file (ipo_out.o) that can be used in further link steps. More... |
OFF |
-ipo_obj | Forces the compiler to create real object
files when used with -ipo. More... |
OFF |
-ipo_S | Generates a multifile assemblable file
named ipo_out.s that can be used in further link
steps. More... |
OFF |
-isystemdir | Add directory dir to the start of the system include path. | OFF |
-ivdep_parallel Itanium-based systems only |
This option indicates there is absolutely
no loop-carried memory dependency in the loop where IVDEP directive is
specified. More... |
OFF |
-Kc++ | Compile all source or unrecognized file types as C++ source files. | ON |
-Knopic, -KNOPIC Itanium-based systems only |
Deprecated. Use fpic instead of this option. | ON for Itanium-based systems OFF for IA-32 |
-KPIC, -Kpic | Deprecated. Use fpic instead of this option. | OFF |
-Ldirectory | Instruct linker to search directory
for libraries. More... |
OFF |
-long_double IA-32 only |
Changes the default size of the long
double data type from 64 to 80 bits. More... |
OFF |
-M | Generates makefile dependency lines for each source file, based on the #include lines found in the source file. | OFF |
-march=cpu IA-32 only |
Generate code excusively for a given
cpu. Values for cpu
are:
|
OFF |
-mcpu=cpu | Optimize for a specific cpu.
For IA-32, cpu values are:
|
ON pentium on IA-32 itanium2 on Itanium-based Systems |
-MD | Preprocess and compile. Generate output file (.d extension) containing dependency information. | OFF |
-MFfile | Generate makefile dependency information in file. Must specify -M or -MM. | OFF |
-MG | Similar to -M, but treats missing header files as generated files. | OFF |
-MM | Similar to -M, but does not include system header files. | OFF |
-MMD | Similar to -MD, but does not include system header files. | OFF |
-mp | Favors conformance to the ANSI C and
IEEE 754 standards for floating-point arithmetic. More... |
OFF |
-mp1 | Improve floating-point precision (speed
impact is less than -mp). More... |
OFF |
-mrelax Itanium-based systems only |
Pass -relax to the linker. | ON |
-mno-relax Itanium-based systems only |
Do not pass -relax to the linker. | OFF |
-mserialize-volatile Itanium-based systems only |
Impose strict memory access ordering for volatile data object references. | OFF |
-mno-serialize-volatile Itanium-based systems only |
The compiler may suppress both run-time and compile-time memory access ordering for volatile data object references. Specifically, the .rel/.acq completers will not be issued on referencing loads and stores. | OFF |
-MX | Generate dependency file (.o.dep extension) containing information used for the Intel wb tool. | OFF |
-nobss_init | Places variables that are initialized
with zeroes in the DATA section. Disables placement of zero-initialized
variables in BSS (use DATA). More... |
OFF |
-no_cpprt | Do not link in C++ run-time libraries. | OFF |
-nodefaultlibs | Do not use standard libraries when linking. | |
-no-gcc | Do not predefine the __GNUC__, __GNUC_MINOR__, and __GNUC_PATCHLEVEL__ macros. | OFF |
-nolib_inline | Disables inline expansion of standard
library functions. More... |
OFF |
-nostartfiles | Do not use standard startup files when linking. | OFF |
-nostdinc | Same as -X. | OFF |
-nostdlib | Do not use standard libraries and startup files when linking. | OFF |
-O | Same as -O1 on IA-32. Same as -O2 on Itanium-based systems. | OFF |
-O0 | Disables optimizations. More... |
OFF |
-O1 | Enable optimizations. Optimizes for speed.
For Itanium compiler, -O1 turns off software pipelining
to reduce code size. More... |
ON |
-O2 | Same as -O1 on
IA-32. Same as -O on Itanium-based systems. More... |
OFF |
-O3 | Enable -O2 plus
more aggressive optimizations that may increase the compilation time.
Impact on performance is application dependent, some applications may
not see a performance improvement. More... |
OFF |
-Obn | Controls the compiler's inline expansion.
The amount of inline expansion performed varies with the value of n as follows:
|
ON |
-ofile | Name output file. | OFF |
-openmp | Enables the parallelizer to generate
multi-threaded code based on the OpenMP* directives. The -openmp
option only works at an optimization level of -O2
(the default) or higher. More... |
OFF |
-openmp_report{0|1|2} | Controls the OpenMP parallelizer's diagnostic
levels. More... |
ON -openmp_report1 |
-openmp_stubs | Enables OpenMP programs to compile in sequential mode. The OpenMP directives are ignored and a stub OpenMP library is linked sequentially. | OFF |
-opt_report | Generates an optimization report directed to stderr, unless -opt_report_file is specified. | OFF |
-opt_report_filefilename | Specifies the filename for the optimization report. It is not necessary to invoke -opt_report when this option is specified. | OFF |
-opt_report_levellevel | Specifies the verbosity level
of the output. Valid level arguments:
|
OFF |
-opt_report_phasename | Specifies the compilation name
for which reports are generated. The option can be used multiple times
in the same compilation to get output from multiple phases. Valid name arguments:
|
OFF |
-opt_report_routinesubstring | Specifies a routine substring. Reports from all routines with names that include substring as part of the name are generated. By default, reports for all routines are generated. | OFF |
-opt_report_help | Displays all possible settings for -opt_report_phase. No compilation is performed. | OFF |
-p | Same as -qp. | OFF |
-P, -F | Stops the compilation process after C
or C++ source files have been preprocessed and writes the results to files
named according to the compiler's default file-naming conventions. More... |
OFF |
-parallel | Detects parallel loops capable of being executed safely in parallel and automatically generates multithreaded code for these loops. | OFF |
-par_report{0|1|2|3} | Controls the auto-parallelizer's diagnostic
levels 0, 1, 2, or 3 as follows:
|
OFF |
-par_threshold[n] | Sets a threshold for the auto-parallelization
of loops based on the probability of profitable execution of the loop
in parallel, n=0 to 100. This option is used for
loops whose computation work volume cannot be determined at compile time.
|
OFF |
-pc32 IA-32 only |
Set internal FPU precision to 24-bit significand. | OFF |
-pc64 IA-32 only |
Set internal FPU precision to 53-bit significand. | OFF |
-pc80 IA-32 only |
Set internal FPU precision to 64-bit significand. | ON |
-pch | Automatic processing for precompiled headers. | OFF |
-pch_dir dirname | Directs the compiler to find and/or create a file for precompiled headers in dirname. | OFF |
-prec_div IA-32 only |
Disables the floating point division-to-multiplication
optimization. Improves precision of floating-point divides. More... |
OFF |
-prefetch[-] | Enables [disables] the insertion of software prefetching by the compiler. Default is -prefetch. | ON |
-prof_dir dirname | Specify the directory (dirname)
to hold profile information (*.dyn, *.dpi). More... |
OFF |
-prof_file filename | Specify the filename
for profiling summary file. More... |
OFF |
-prof_format_32 | By default, the Intel compiler creates 64-bit profiling counters (.dyn and .dpi). This option creates 32-bit counters for compatibility with the Intel C++ Compiler 7.0. | OFF |
-prof_gen[x] | Instruments the program to prepare for
instrumented execution and also creates a new static profile information
file (.spi). With the x
qualifier, extra source position is collected which enables code coverage
tools. More... |
OFF |
-prof_use | Uses dynamic feedback information. More... |
OFF |
-Qinstall dir | Sets dir as root of compiler installation. | OFF |
-Qlocation,tool,path | Sets path
as the location of the tool specified by tool . More... |
OFF |
-Qoption,tool,list | Passes an argument list
to another
tool in
the compilation sequence, such as the assembler or linker. More... |
OFF |
-qp | Compile and link for function profiling with UNIX* prof tool | OFF |
-rcd IA-32 only |
Disables changing of the FPU rounding
control. Enables fast float-to-int conversions. More... |
OFF |
-S | Generates assemblable files with .s suffix, then stops the compilation. More... |
OFF |
-shared | Produce a shared object. | OFF |
-shared-libcxa | Link Intel libcxa C++ library dynamically. | ON |
-sox[-] IA-32 only |
Enables [disables] the saving of compiler options and version information in the executable file. | -sox- |
-static | Prevents linking with shared libraries. | OFF |
-static-libcxa | Link Intel libcxa C++ library statically. | OFF |
-std=c99 | Enable C99 support for C programs. | ON |
-strict_ansi | Strict ANSI conformance dialect. | OFF |
-syntax | Checks the syntax of a program and stops
the compilation process after the C or C++ source files and preprocessed
source files have been parsed. Generates no code and produces no output
files. Warnings and messages appear on stderr. More... |
OFF |
-T file | Direct linker to read link commands from file. | OFF |
-tpp1 Itanium-based systems only |
Targets optimization for the Itanium processor. | OFF |
-tpp2 Itanium-based systems only |
Targets optimization for the Itanium® 2 processor. Generated code is compatible with the Itanium processor. | ON |
-tpp5 IA-32 only |
Targets the optimizations for the Pentium
processor. More... |
OFF |
-tpp6 IA-32 only |
Targets the optimizations for the Pentium
Pro, Pentium II and Pentium III processors. More... |
OFF |
-tpp7 IA-32 only |
Targets optimizations for the Intel Pentium
4 processors, Intel®
Xeon(TM) processors, Intel®
Pentium®
M processors, and Intel processors code-named "Prescott". More... |
ON |
-Uname | Suppresses any definition of a macro
name. Equivalent to a #undef
preprocessing directive. More... |
OFF |
-unroll0 | Disable loop unrolling. | OFF |
-unroll 0 | Disable loop unrolling. | OFF |
-use_asm | Produce objects through assembler. | OFF |
-use_msasm IA-32 only |
Accept the Microsoft* MASM-style inlined assembly format instead of GNU-style. | OFF |
-use_pch filename | Manual use of precompiled header (filename.pchi). | OFF |
-u symbol | Pretend the symbol is undefined. | OFF |
-V | Display compiler version information. | OFF |
-v | Show driver tool commands and execute tools. | |
-vec_report[n] IA-32 only |
Controls the amount of vectorizer diagnostic
information.
|
ON -vec_report1 |
-w | Disable all warnings. | OFF |
-Wall | Enable all warnings. | OFF |
-Wbrief | Enable a mode in which a shorter form of the diagnostic output is used. When enabled, the original source line is not displayed and the error message text is not wrapped when too long to fit on a single line. | OFF |
-Wcheck | Performs compile-time code checking for code that exhibits non-portable behavior, represents a possible unintended code sequence, or possibly affects operation of the program because of a quiet change in the ANSI C Standard. | OFF |
-wn | Control diagnostics.
|
ON -w1 |
-wdL1[,L2,...] | Disables diagnostics L1
through LN. More... |
OFF |
-weL1[,L2,...] | Changes severity of diagnostics L1 through LN
to error. More... |
OFF |
-Werror | Force warnings to be reported as errors. | OFF |
-wnn | Limits the number of errors displayed
prior to aborting compilation to n. More... |
ON -wn100 |
-wrL1[,L2,...] | Changes the severity of diagnostics L1 through LN
to remark. More... |
OFF |
-wwL1[,L2,...] | Changes severity of diagnostics L1 through LN
to warning. More... |
OFF |
-Wl,o1[,o2,...] | Pass options o1, o2, etc. to the linker for processing. | OFF |
-Wp64 Itanium-based systems only |
Print diagnostics for 64-bit porting. | OFF |
-xtype | All source files found subsequent to
-xtype will be recognized as one of the
following types:
|
OFF |
-X | Removes the standard directories from
the list of directories to be searched for include files. More... |
OFF |
-x{K|W|N|B|P} IA-32 only |
Generates specialized code for processor-specific
codes K, W, N,
B, and P.
|
OFF |
-Xlinker val | Pass val directly to the linker for processing. | OFF |
-Zp{1|2|4|8|16} | Packs structures on 1, 2, 4, 8, or 16
byte boundaries. More... |
ON -Zp16 |