Specifies the language of source files.
Specifies the language of subsequent source files, one of
- C code.
- C++ code.
- Assembly code containing C directives that
require the C preprocessor.
- Assembly code that does not require the C
-x overrides the default language
standard for the subsequent input files that follow it on the command-line. For
inputfile1.s -xc inputfile2.s inputfile3.s
In this example, armclang treats
the input files as follows:
inputfile1.s appears before the
-xc option, so armclang treats it as assembly code because of the
inputfile3.s appear after the
-xc option, so armclang treats them as C code.
-std to set the default
By default the compiler determines the source file language from the
filename suffix, as follows:
indicate C++, equivalent to
.c indicates C, equivalent to
.s (lower-case) indicates
assembly code that does not require preprocessing, equivalent to
.S (upper-case) indicates
assembly code that requires preprocessing, equivalent to