Intel® oneAPI DPC++/C++ Compiler Developer Guide and Reference

ID 767253
Date 3/31/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Compiler Options

This compiler supports many compiler options you can use in your applications.

In this section, we provide the following:

Clang compiler options are supported for this compiler. We do not document these options, but you can check -help on the command line to see if a particular option is supported. For more information about Clang options, see the Clang documentation.

NOTE:

If you want to use Microsoft Visual C++ (MSVC)-compatible option syntax, where options start with /, you must use the appropriate compiler. For information on which compiler driver to use, refer to Invoke the Compiler.

NOTE:
macOS* is not supported for the oneAPI compilers. For information on which compiler driver to use, refer to Invoke the Compiler.

For details about new functionality, such as new compiler options, see the Release Notes for the product.

Conventions Used for Compiler Options

The following conventions are used to describe compiler options.

compiler option name shortcuts

The following conventions are used as shortcuts when referencing compiler option names in descriptions:

  • No initial – or /

    This shortcut is used for option names that are the same for Linux and Windows except for the initial character.

    For example, Fa denotes:

    • Linux: -Fa

    • Windows: /Fa

  • [Q]option-name

    This shortcut is used for option names that only differ because the Windows form starts with a Q.

    For example, [Q]ipo denotes:

    • Linux: -ipo

    • Windows: /Qipo

  • [q or Q]option-name

    This shortcut is used for option names that only differ because the Linux form starts with a q and the Windows form starts with a Q.

    For example, [q or Q]opt-report denotes:

    • Linux: -qopt-report

    • Windows: /Qopt-report

More dissimilar compiler option names are shown in full.

/option or

-option

A slash before an option name indicates the option is available on Windows. A dash before an option name indicates the option is available on Linux systems. For example:

  • Linux : -help
  • Windows: /help

NOTE:
If an option is available on all supported operating systems, no slash or dash appears in the general description of the option. The slash and dash will only appear where the option syntax is described.

/option:argument or

-option=argument

Indicates that an option requires an argument (parameter).

/option:keyword or

-option=keyword

Indicates that an option requires one of the keyword values.

/option[:keyword ] or

-option[=keyword ]

Indicates that the option can be used alone or with an optional keyword.

option[n] or

option[:n] or

option[=n]

Indicates that the option can be used alone or with an optional value. For example, in -unroll[=n], the n can be omitted or a valid value can be specified for n.

option[-]

Indicates that a trailing hyphen disables the option. For example, /Qglobal_hoist- disables the Windows option /Qglobal_hoist.

[no]option or

[no-]option

Indicates that no or no- preceding an option disables the option. For example:

In the Linux option -[no-]global_hoist, -global_hoist enables the option, while -no-global_hoist disables it.

In some options, the no appears later in the option name. For example, -fno-common disables the -fcommon option.