--cpreproc_opts=option[,option,…]
Enables armasm to pass options to armclang when using the C preprocessor.
Syntax
--cpreproc_opts=
option[,option,…]
Where option[,option,…]
is a comma-separated list
of C preprocessing options.
At least one option must be specified.
Restrictions
As a minimum, you must specify the armclang options --target
and either -mcpu
or -march
in --cpreproc_opts
.
To assemble code containing C directives that require the C preprocessor,
the input assembly source filename must have an upper-case extension .S
.
You cannot pass the armclang option
-x assembler-with-cpp
, because it gets added to armclang after the source file name.
Note
Ensure that you specify compatible architectures in the armclang options--target
,
-mcpu
or -march
, and the
armasm
--cpu
option.Example
The options to the preprocessor in this example are --cpreproc_opts=--target=arm-arm-none-eabi,-mcpu=cortex-a9,-D,DEF1,-D,DEF2
.
armasm --cpu=cortex-a9 --cpreproc --cpreproc_opts=--target=arm-arm-none-eabi,-mcpu=cortex-a9,-D,DEF1,-D,DEF2 -I /path/to/includes1 -I /path/to/includes2 input.S