4.6.2.6 X: Specify Source Language Option
The -xlanguage
option allows you to
specify that the source files that follow are written in the specified language, regardless
of the extension they use.
The languages allowed by the compiler are tabulated below.
Language | Description |
---|---|
assembler | Assembly source code |
assembler-with-cpp | Assembly source code that must be preprocessed |
For example, the
command:
xc8-cc
-mcpu=16F1946
-mdfp="Microchip/PIC12-16F1xxx_DFP/1.7.242/xc8"
-c -xassembler-with-cpp init.s
will
tell the compiler to run the preprocessor over the assembly
source file, even though the init.s
file name does not use a
.S extension.