Specifies the target platform for cross compilation.
Arguments
Description
This option specifies the target platform for cross compilation. If you do not specify the -platform
option, the compiler will build a Linux* operating system native application. If you do not specify an argument, you will receive an error message. Using the default value for the option disables previously defined values for -platform option as well as for -gnu-prefix, and --sysroot options, and forces the compiler to generate code for the default target platform.
To compile a C language source file (for example, my_source_file.c
) for a QNX target, use a command similar to the following:
icc -platform=qnx640 my_source_file.cExample 2:
To compile a C language source file (for example, my_source_file.c
) for an Android* target, use a command similar to the following:
icc -platform=android my_source_file.c