You may need to set certain environment variables before using the command line. For more information, see Specifying the Location of Compiler Components.
The table below provides the different compiler front-end and driver information.
Compiler | Notes | Linux* Driver | Windows* Driver |
---|---|---|---|
Intel® DPC++ Compiler |
A C++ and Khronos SYCL* compiler with a Clang front-end. |
dpcpp | dpcpp (clang compatible) dpcpp-cl (clang-cl compatible) |
Intel® C++ Compiler |
A C++ compiler with a Clang front-end, supporting OpenMP* offload. |
icx for C icpx for C++ |
icx |
Use the compiler with the OS/language specific invocations below.
Linux:
Invoke the compiler using icx/icpx (for C/C++) or dpcpp (for DPC++) to compile LLVM C/C++/DPC++ source files.
The icx/icpx (for C/C++) or dpcpp (for DPC++) command does the following:
Windows:
You can invoke the compiler on the command line using the icx (for C/C++) or dpcpp-cl (for DPC++) command. This command:
When compilation occurs with the compiler, many tools may be called to complete the task that may reproduce diagnostics unique to the given tool. For instance, the linker may return a message if it cannot resolve a global reference. The watch option can help clarify which component is generating the error.
When you invoke the compiler, the syntax is: For C/C++ projects:
// (Linux) {icx/icpx} [options] file1 [file2...]
// (Windows) icx [options] file1 [file2...] [/link link_options]For DPC++ projects:
// (Linux) dpcpp [options] file1 [file2...]
// (Windows) dpcpp-cl [options] file1 [file2...] [/link link_options]
Argument |
Description |
---|---|
options |
Indicates one or more command line options. On Linux systems, the compiler recognizes one or more letters preceded by a hyphen (-). On Windows, options are preceded by a slash (/). This includes linker options. Options are not required when invoking the compiler. The default behavior of the compiler implies that some options are ON by default when invoking compiler. |
file1, file2... |
Indicates one or more files to be processed by the compiler. You can specify more than one file, using space as a delimiter for multiple files. |
/link (Windows) |
All options following /link are passed to the linker. Compiler options must precede link if they are not to be passed to the linker. |
To enable OpenMP* offloading for C++ applications, invoke the compiler with:
To enable OpenMP offloading for DPC++ applications, invoke the compiler with: