platform

Specifies the target platform for cross compilation.

Syntax

-platform=default|<target platform>|<embedded target platform>

Arguments

default

Disables previously defined -platform, --sysroot, and -gnu-prefix values and forces compiler to generate code for the default target, which could be, for example, Linux*.

target platform

Can be any one of the following, if supported:

qnx640

Specifies the QNX* Neutrino* RTOS target.

mvl50

Specifies the MontaVista* Linux* OS target.

netbsd51

Specifies the NetBSD* OS target.

wrl30

Specifies the Wind River* Linux* OS target.

embedded target platform

Can be any one of the following, if supported:

android

Specifies the Android* target.

celpr28

Specifies the CE Linux* OS target.

wrl43

Specifies the Wind River* Linux* OS v4.3 target.

wrl50

Specifies the Wind River* Linux* OS v5.0 target.

yl12

Specifies the Yocto* Project OS v1.2 target.

yl13

Specifies the Yocto* Project OS v1.3 target.

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.

For information about the gnu-prefix and sysroot compiler options, see the Intel® C++ Compiler 18.0 Developer Guide and Reference.

Example 1:

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.c

Example 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

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