Non-Confidential | ![]() | ARM 100748_0607_00_en | ||
| ||||
Home > Using Common Compiler Options > Compilation tools command-line option rules |
You can use command-line options to control many aspects of the compilation tools' operation. There are rules that apply to each tool.
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.
The following rules apply, depending on the type of option:
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
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
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)'