Compiler Getting Started GuidePreface Getting Started Using Common Compiler Options Mandatory armclang options Common Arm Compiler toolchain options Selecting source language options Selecting optimization options Building to aid debugging Linking object files to produce an executable Linker options for mapping code and data to target Passing options from the compiler to the linker Controlling diagnostic messages Selecting floating-point options Compilation tools command-line option rules Writing Optimized Code Assembling Assembly Code Using Assembly and Intrinsics in C or C++ Code Mapping Code and Data to the Target Overlays Embedded Software Development Building Secure and Non-secure Images Using Armv8‑ Overview of the Linker Getting Image Details SysV Dynamic Linking Overview of the fromelf Image Converter Using fromelf Overview of the Arm Librarian Overview of the armasm Legacy Assembler Supporting reference information
Mandatory armclang options
2.1 Mandatory armclang options
When using armclang, you must specify a target on the command-line. Depending on the target you use, you might also have to specify an architecture or processor.
Specifying a target
To specify a target, use the
Specifying an architecture
To generate code for a specific architecture, use the
To see a list of all the supported architectures for the selected target, use
Specifying a processor
To generate code for a specific processor, use the
To see a list of all the supported processors for the selected
It is also possible to enable or disable optional architecture features, by
Note:You do not need to specify both the architecture and processor. The compiler infers the architecture from the processor. If you only want to run code on one particular processor, you can specify the specific processor. Performance is optimized, but code is only guaranteed to run on that processor. If you want your code to run on a range of processors from a particular architecture, you can specify the architecture. The code runs on any processor implementation of the target architecture, but performance might be impacted.
Specifying an optimization level
The default optimization level is
These examples compile and link the input file
of your data.