2.2.3 Rules for specifying command-line options

There are certain rules you must follow when using command-line options. These rules depend on the type of option.

The following rules apply:

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:

-J directory


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:


--depend file.d

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

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 compile a file named -ifile_1, use:

armcc -c -- -ifile_1

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

Non-ConfidentialPDF file icon PDF versionARM DUI0529M
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.