You copied the Doc URL to your clipboard.

Compilation tools command-line option rules

You can control many aspects of the compilation tools operation with command-line options.

armclang option rules

armclang follows the same syntax rules as GCC. Some options are preceded by a single dash -, others by a double dash --. Some options require an = character between the option and the argument, others require a space character.

armasm, armar, amlink, and fromelf command-line syntax rules

The following rules apply, depending on the type of option:

Single-letter options

All single-letter options, including single-letter options with arguments, are preceded by a single dash -. You can use a space between the option and the argument, or the argument can immediately follow the option. For example:

armar -r -a obj1.o mylib.a obj2.o

armar -r -aobj1.o mylib.a obj2.o

Keyword options

All keyword options, including keyword options with arguments, are preceded by a double dash --. An = or space character is required between the option and the argument. For example:

armlink myfile.o --cpu=list

armlink myfile.o --cpu list

Compilation tools options that contain non-leading - or _ can use either of these characters. For example, --force_explicit_attr is the same as --force-explicit-attr.

Command-line syntax rules common to all tools

To compile files with names starting with a dash, use the POSIX option -- to specify that all subsequent arguments are treated as filenames, not as command switches. For example, to link a file named -ifile_1, use:

armlink -- -ifile_1

In some Unix shells, you might have to include quotes when using arguments to some command-line options, for example:

armlink obj1.o --keep='s.o(vect)'

Migration tools command-line syntax

The ARM Compiler Source Compatibility Checker has a small number of keyword options, all of which are preceded by a double dash --.

The command-line translation wrapper conforms to the syntax rules for older compiler versions.

Was this page helpful? Yes No