Developer Guide and Reference

Contents

Using Compiler Options

A compiler option is a case-sensitive, command line expression used to change the compiler's default operation. Compiler options are not required to compile your program, but they can control different aspects of your application, such as:
  • Code generation
  • Optimization
  • Output file (type, name, location)
  • Linking properties
  • Size of the executable
  • Speed of the executable
See the Option Categories section for the option capabilities included with the Intel® C++ Compiler.

Command Line Syntax (Linux*
and
macOS*
)

When you specify compiler options on the command line, the following syntax applies:
icc [options] [@response_file] file1 [file2...] //Linux
and
macOS*
The
options
represents zero or more compiler options and the
file
is any of the following:
  • C or C++ source file (
    .C
    ,
    .c
    ,
    .cc
    ,
    .cpp
    ,
    .cxx
    ,
    .c++
    ,
    .i
    ,
    .ii
    )
  • Assembly file (
    .s
    ,
    .S
    )
  • Object file (
    .o
    )
  • Static library (
    .a
    )
When compiling C language sources, invoke the compiler with
icc
. When compiling C++ language sources or a combination of C and C++, invoke the compiler with
icpc
.

Command Line Syntax (Windows*)

When you specify compiler options on the command line, the following syntax applies:
icl [options] [@response_file] file1 [file2 ...] [/link linker_options]
The
options
represents zero or more compiler options, the
linker_options
represents zero or more linker options, and the
file
is any of the following:
  • C or C++ source file (
    .c
    ,
    .cc
    ,
    .ccp
    </