Intel® C++ Compiler 19.0 Developer Guide and Reference Supplement for Intel® System Studio 2019

Platform

This option applies only for cross-compiling compilers like bi-endian C++ compiler and Intel® System Studio C++ compiler.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*.

embedded target platform

android

Specifies the Android* 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 19.0 Developer Guide and Reference.

Example 1:

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