Compiler Options

The Intel® Compiler for Intel® Quark™ Microcontrollers supports many compiler options you can use in your applications:

  • All the options supported by the Clang compiler, documented at llvm.org.

  • A subset of the options supported by the standard Intel compiler. These Intel compiler options, as well general rules for their use, are fully documented in the User and Reference Guide for Intel® C++ Compiler 16.0.

The following table lists all the supported Intel compiler options in alphabetical order.

B

Specifies a directory that can be used to find include files, libraries, and executables.

Bdynamic

Enables dynamic linking of libraries at run time.

Bstatic

Enables static linking of a user's library.

Bsymbolic

Binds references to all global symbols in a program to the definitions within a user's shared library.

Bsymbolic-functions

Binds references to all global function symbols in a program to the definitions within a user's shared library.

c

Prevents linking.

D

Defines a macro name that can be associated with an optional value.

dD (Linux)

QdD (Windows)

Same as option dM (Linux) or QdM (Windows), but outputs #define directives in preprocessed source.

diag (Linux)

Qdiag (Windows)

Controls the display of diagnostic information.

diag-error-limit (Linux)

Qdiag-error-limit (Windows)

Specifies the maximum number of errors allowed before compilation stops.

diag-file (Linux)

Qdiag-file (Windows)

Causes the results of diagnostic analysis to be output to a file.

diag-file-append (Linux)

Qdiag-file-append (Windows)

Causes the results of diagnostic analysis to be appended to a file.

diag-id-numbers (Linux)

Qdiag-id-numbers (Windows)

Determines whether the compiler displays diagnostic messages by using their ID number values.

diag-once (Linux)

Qdiag-once (Windows)

Tells the compiler to issue one or more diagnostic messages only once.

dM (Linux)

QdM (Windows)

Tells the compiler to output macro definitions in effect after preprocessing.

dryrun

Specifies that driver tool commands should be shown but not executed.

dumpmachine

Displays the target machine and operating system configuration.

dumpversion

Displays the version number of the compiler.

dynamic-linker

Specifies a dynamic linker other than the default.

E

Causes the preprocessor to send output to stdout.

EP

Causes the preprocessor to send output to stdout, omitting #line directives.

fasm-blocks

Enables the use of blocks and entire functions of assembly code within a C or C++ file.

fasynchronous-unwind-tables

Determines whether unwind information is precise at an instruction boundary or at a call boundary.

fblocks

Determines whether Apple* blocks are enabled or disabled.

fbuiltin (Linux)

Oi (Windows)

Enables or disables inline expansion of intrinsic functions.

fcommon

Determines whether the compiler treats common symbols as global definitions.

fexceptions

Enables exception handling table generation.

ffreestanding (Linux)

Qfreestanding (Windows)

Ensures that compilation takes place in a freestanding environment.

ffunction-sections

Places each function in its own COMDAT section.

fgnu89-inline

Tells the compiler to use C89 semantics for inline functions when in C99 mode.

finstrument-functions (Linux)

Qinstrument-functions (Windows)

Determines whether function entry and exit points are instrumented.

fmath-errno

Tells the compiler that errno can be reliably tested after calls to standard math library functions.

fno-gnu-keywords

Tells the compiler to not recognize typeof as a keyword.

fno-operator-names

Disables support for the operator names specified in the standard.

fno-rtti

Disables support for run-time type information (RTTI).

fomit-frame-pointer (Linux)

Oy (Windows)

Determines whether EBP is used as a general-purpose register in optimizations.

foptimize-sibling-calls

Determines whether the compiler optimizes tail recursive calls.

fpack-struct

Specifies that structure members should be packed together.

fpascal-strings

Tells the compiler to allow for Pascal-style string literals.

fpic

Determines whether the compiler generates position-independent code.

fpie

Tells the compiler to generate position-independent code. The generated code can only be linked into executables.

fshort-enums

Tells the compiler to allocate as many bytes as needed for enumerated types.

fsyntax-only

Tells the compiler to check only for correct syntax.

funroll-all-loops

Unroll all loops even if the number of iterations is uncertain when the loop is entered.

funsigned-char

Change default char type to unsigned.

fverbose-asm

Produces an assembly listing with compiler comments, including options and version information.

fvisibility

Specifies the default visibility for global symbols or the visibility for symbols in a file.

fvisibility-inlines-hidden

Causes inline member functions (those defined in the class declaration) to be marked hidden.

fzero-initialized-in-bss (Linux)

Qzero-initialized-in-bss (Windows)

Determines whether the compiler places in the DATA section any variables explicitly initialized with zeros.

g

Tells the compiler to generate full debugging information in the object file.

g0

Disables generation of symbolic debug information.

gcc (Linux)

gcc-sys (Windows)

Determines whether certain GNU macros are defined or undefined.

gcc-include-dir

Controls whether the gcc-specific include directory is put into the system include path.

gcc-name

Lets you specify the name of the gcc compiler that should be used to set up the environment for C compilations.

gdwarf

Lets you specify a DWARF Version format when generating debug information.

gnu-prefix

Lets you specify a prefix that will be added to the names of gnu utilities called from the compiler.

gsplit-dwarf

Creates a separate object file containing DWARF debug information.

gxx-name

Lets you specify the name of the g++ compiler that should be used to set up the environment for C++ compilations.

help

Displays all available compiler options or a category of compiler options.

I

Specifies an additional directory to search for include files.

I-

Splits the include path.

idirafter

Adds a directory to the second include file search path.

imacros

Allows a header to be specified that is included in front of the other headers in the translation unit.

iprefix

Option for indicating the prefix for referencing directories containing header files.

iquote

Add directory to the front of the include file search path for files included with quotes but not brackets.

isystem

Specifies a directory to add to the start of the system include path.

iwithprefix

Appends a directory to the prefix passed in by -iprefix and puts it on the include search path at the end of the include directories.

iwithprefixbefore

Similar to -iwithprefix except the include directory is placed in the same place as -I command line include directories.

Kc++ (Linux)

TP (Windows)

Tells the compiler to process all source or unrecognized file types as C++ source files. This is a deprecated option. The replacement option for Kc++ is -x c++; the replacement option for /TP is /Tp<file>.

l

Tells the linker to search for a specified library when linking.

L

Tells the linker to search for libraries in a specified directory before searching the standard directories.

M (Linux)

QM (Windows)

Tells the compiler to generate makefile dependency lines for each source file.

m32, m64 (Linux)

Qm32, Qm64 (Windows)

Tells the compiler to generate code for a specific architecture.

map-opts (Linux)

Qmap-opts (Windows)

Maps one or more compiler options to their equivalent on a different operating system.

march

Tells the compiler to generate code for processors that support certain features.

mcmodel

Tells the compiler to use a specific memory model to generate code and store data.

MD (Linux)

QMD (Windows)

Preprocess and compile, generating output file containing dependency information ending with extension .d.

MF (Linux)

QMF (Windows)

Tells the compiler to generate makefile dependency information in a file.

MG (Linux)

QMG (Windows)

Tells the compiler to generate makefile dependency lines for each source file.

MM (Linux)

QMM (Windows)

Tells the compiler to generate makefile dependency lines for each source file.

MMD (Linux)

QMMD (Windows)

Tells the compiler to generate an output file containing dependency information.

mtune (Linux)

tune (Windows)

Performs optimizations for specific processors.

multiple-processes (Linux)

MP (Windows)

Creates multiple processes that can be used to compile large numbers of source files at the same time.

nodefaultlibs

Prevents the compiler from using standard libraries when linking.

no-libgcc

Prevents the linking of certain gcc-specific libraries.

nostartfiles

Prevents the compiler from using standard startup files when linking.

nostdinc++

Do not search for header files in the standard directories for C++, but search the other standard directories.

nostdlib

Prevents the compiler from using standard libraries and startup files when linking.

o

Specifies the name for an output file.

O

Specifies the code optimization for applications.

Os

Enables optimizations that do not increase code size; it produces smaller code size than O2.

P

Tells the compiler to stop the compilation process and write the results to a file.

pie

Determines whether the compiler generates position-independent code that will be linked into an executable.

print-multi-lib

Prints information about where system libraries should be found.

print-sysroot

Prints the target sysroot directory that is used during compilation.

pthread

Tells the compiler to use pthreads library for multithreading support.

qopenmp (Linux)

Qopenmp (Windows)

Enables the parallelizer to generate multi-threaded code based on OpenMP* directives. Option -qopenmp is the replacement option for -openmp, which is deprecated.

Qoption

Passes options to a specified tool.

restrict (Linux)

Qrestrict (Windows)

Determines whether pointer disambiguation is enabled with the restrict qualifier.

S

Causes the compiler to compile to an assembly file only and not link.

save-temps (Linux)

Qsave-temps (Windows)

Tells the compiler to save intermediate files created during compilation.

shared

Tells the compiler to produce a dynamic shared object instead of an executable.

shared-intel

Causes Intel-provided libraries to be linked in dynamically.

shared-libgcc

Links the GNU libgcc library dynamically.

static

Prevents linking with shared libraries.

static-intel

Causes Intel-provided libraries to be linked in statically.

staticlib

Invokes the libtool command to generate static libraries.

static-libgcc

Links the GNU libgcc library statically.

static-libstdc++

Links the GNU libstdc++ library statically.

std (Linux)

Qstd (Windows)

Tells the compiler to conform to a specific language standard.

stdlib

Lets you select the C++ library to be used for linking.

sysroot

Specifies the root directory where headers and libraries are located.

T

Tells the linker to read link commands from a file.

U

Undefines any definition currently in effect for the specified macro .

undef

Disables all predefined macros .

v

Specifies that driver tool commands should be displayed and executed.

V

Displays the compiler version information.

version

Tells the compiler to display GCC-style version information.

Wa

Passes options to the assembler for processing.

Wcheck

Tells the compiler to perform compile-time code checking for certain code.

wd (Linux)

Qwd (Windows)

Disables a soft diagnostic. This is a deprecated option. The replacement option is [Q]diag-disable.

we (Linux)

Qwe (Windows)

Changes a soft diagnostic to an error. This is a deprecated option. The replacement option is [Q]diag-error.

Wl

Passes options to the linker for processing.

wn (Linux)

Qwn (Windows)

Controls the number of errors displayed before compilation stops. This is a deprecated option. The replacement option is [Q]diag-error-limit.

wo (Linux)

Qwo (Windows)

Tells the compiler to issue one or more diagnostic messages only once. This is a deprecated option. The replacement option is [Q]diag-once id.

Wp

Passes options to the preprocessor.

wr (Linux)

Qwr (Windows)

Changes a soft diagnostic to an remark. This is a deprecated option. The replacement option is [Q]diag-remark.

ww (Linux)

Qww (Windows)

Changes a soft diagnostic to an warning. This is a deprecated option. The replacement option is [Q]diag-warning.

x (type option)

All source files found subsequent to -x type will be recognized as a particular type.

Xlinker

Passes a linker option directly to the linker.

Optimization Notice

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804

For more complete information about compiler optimizations, see our Optimization Notice.