You copied the Doc URL to your clipboard.

Command-line options for preprocessing assembly source code

The version of armasm supplied with ARM Compiler 6 does not support the --cpreproc and --cpreproc_opts command-line options that were used in earlier versions of armasm to preprocess assembly source code.

If you are using armasm to assemble source code that requires the use of the preprocessor, you must first preprocess the code using armclang, then pipe it into armasm.

The following example shows the options required to preprocess and assemble the file example.s:

armclang --target=armv8-arm-eabi-none -E -x assembler-with-cpp example.s | armasm --cpu=8-A.32 -o example.o -

Selected command-line options used in this example are:

-E
Specifies that armclang only performs preprocessing on the file.
-x assembler-with-cpp
Specifies that armclang handles the supplied source file as an assembly source file that requires preprocessing.
-
Specifies that armasm reads the assembly source from stdin rather than from a file.

Note

Ensure that you specify compatible architectures in the armclang --target option and the armasm --cpu option.