2.2.5 Precedence of command-line options when using them in a text file

The compilation tools read command-line options from a specified text file and combine them with any additional options you have specified for the tool. Some options might take precedence over other options.

The precedence given to a command-line option depends on:

  • The command-line option.

  • The position of the --via option on the command line.

To see a command line equivalent to the result of combining the options, specify the --show_cmdline option. For example, if armcc.txt contains the options --debug --cpu=ARM926EJ-S:

  • armcc -c --show_cmdline --cpu=ARM7TDMI --via=armcc.txt hello.c [armcc --show_cmdline --debug -c --cpu=ARM926EJ-S hello.c]

    In this case, --cpu=ARM7TDMI is not used because --cpu=ARM926EJ-S is the last instance of --cpu on the command-line.

  • armcc --via=armcc.via -c --show_cmdline --cpu=ARM7TDMI hello.c [armcc --show_cmdline --debug -c hello.c]

    In this case, --cpu=ARM926EJ-S is not used because --cpu=ARM7TDMI is the last instance of --cpu on the command line. In addition, --cpu=ARM7TDMI is not shown in the output, because this is the default option for --cpu.

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