‑C |
Keep comments in the preprocessed output. |
Compilation and assembly. |
‑c |
Only perform the compile step, do not invoke armlink. |
Compilation and assembly. |
‑D |
Defines a preprocessor macro. |
Compilation and assembly. |
‑E |
Only perform the preprocess step, do not compile or link. |
Compilation and assembly. |
‑e |
Specifies the unique initial entry point of the image. |
Compilation and assembly. |
‑fbare‑metal‑pie |
Generates position-independent code. AArch32 state only. This option is deprecated. |
Compilation only. |
‑fbracket‑depth
|
Sets the limit for nested parentheses, brackets, and
braces. |
Compilation and assembly. |
‑fcommon ,
‑fno‑common
|
Generates common zero-initialized values for tentative definitions. |
Compilation only. |
‑fdata‑sections ,
‑fno‑data‑sections
|
Enables or disables the generation of one ELF section for each variable in the source file. |
Compilation only. |
‑fexceptions ,
‑fno‑exceptions
|
Enables or disables the generation of code needed to support C++ exceptions. |
Compilation only. |
‑ffast‑math ,
‑fno‑fast‑math
|
Enables or disables the use of aggressive floating-point optimizations. |
Compilation only. |
‑ffixed‑rN
|
Prevents the compiler from using the specified core register, unless the use is for Arm ABI compliance. |
Compilation only. |
‑ffp‑mode
|
Specifies floating-point standard conformance. |
Compilation only. |
‑ffunction‑sections ,
‑fno‑function‑sections
|
Enables or disables the generation of one ELF section for each function in the source file. |
Compilation only. |
‑fident ,
‑fno‑ident
|
Controls whether the output file contains the compiler name and version information. |
Compilation only. |
@file |
Reads a list of command-line options from a file. |
Compilation and assembly. |
‑fldm‑stm ,
‑fno‑ldm‑stm
|
Enable or disable the generation of LDM and STM instructions. AArch32 only. |
Compilation only. |
‑flto |
Enables link time optimization, and outputs bitcode wrapped in an ELF file for link time optimization. |
Compilation only. |
‑fno‑builtin |
Disables generic (non-Arm specific) handling and
optimization of standard C and C++ library functions and operators.
See also -nostdlib . |
Compilation only. |
‑fno‑inline‑functions |
Disables the automatic inlining of functions at optimization levels ‑O2 and ‑O3 . |
Compilation only. |
‑fomit‑frame‑pointer ,
‑fno‑omit‑frame‑pointer
|
Enables or disables the storage of stack frame pointers during function calls. |
Compilation only. |
‑fpic ,
‑fno‑pic
|
Enables or disables the generation of
position-independent code with relative address references, which
are independent of the location where your program is
loaded. |
Compilation only. |
‑fropi ,
‑fno‑ropi
|
Enables or disables the generation of Read-Only Position-Independent (ROPI) code. |
Compilation only. |
‑fropi‑lowering ,
‑fno‑ropi‑lowering
|
Enables or disables runtime static initialization when generating Read-Only Position-Independent (ROPI) code. |
Compilation only. |
‑frwpi ,
‑fno‑rwpi
|
Enables or disables the generation of Read-Write Position-Independent (RWPI) code. |
Compilation only. |
‑frwpi‑lowering ,
‑fno‑rwpi‑lowering
|
Enables or disables runtime static initialization when generating Read-Write Position-Independent (RWPI) code. |
Compilation only. |
‑fsanitize [ALPHA] |
Selects the sanitizer option used in code generation. |
Compilation only. |
‑fshort‑enums ,
‑fno‑short‑enums
|
Allows or disallows the compiler to set the size of an enumeration type to the smallest data type that can hold all enumerator values. |
Compilation only. |
‑fshort‑wchar ,
‑fno‑short‑wchar
|
Sets the size of wchar_t to 2 or 4 bytes. |
Compilation only. |
‑fstack‑protector, ‑fstack‑protector‑strong, ‑fstack‑protector‑all, ‑fno‑stack‑protector |
Inserts a guard variable onto the stack frame for each vulnerable function or for all functions. |
Compilation only. |
‑fstrict‑aliasing ,
‑fno‑strict‑aliasing
|
Instructs the compiler to apply or not apply the strictest aliasing rules available. |
Compilation only. |
‑fsysv ,
‑fno‑sysv
|
Enables or disables the generation of code suitable for
the SysV linking model. |
Compilation only. |
‑ftrapv |
Instructs the compiler to generate traps for signed arithmetic overflow on addition, subtraction, and multiplication operations. |
Compilation only. |
‑fvectorize ,
‑fno‑vectorize
|
Enables or disables the generation of Advanced SIMD and MVE vector instructions directly from C or C++ code at optimization levels ‑O1 and higher. |
Compilation only. |
-fvisibility |
Sets the default visibility of ELF symbols to the specified option. |
Compilation and assembly. |
‑fwrapv |
Instructs the compiler to assume that signed arithmetic overflow of addition, subtraction, and multiplication, wraps using two's-complement representation. |
Compilation only. |
‑g ,
‑gdwarf‑2 ,
‑gdwarf‑3 ,
‑gdwarf‑4
|
Adds debug tables for source-level debugging. |
Compilation and assembly. |
‑I |
Adds the specified directory to the list of places that are searched to find include files. |
Compilation and assembly. |
‑include |
Includes the source code of the specified file at the beginning of the compilation. |
Compilation only. |
‑L |
Specifies a list of paths that the linker searches for user libraries. |
Compilation only. |
‑l |
Add the specified library to the list of searched libraries. |
Compilation only. |
‑M ,
‑MM
|
Produces a list of makefile dependency rules suitable for use by a make utility. |
Compilation and assembly. |
‑MD ,
‑MMD
|
Compiles or assembles source files and produces a list of makefile dependency rules suitable for use by a make utility. |
Compilation and assembly. |
‑MF |
Specifies a filename for the makefile dependency rules produced by the -M and -MD options. |
Compilation only. |
‑MG |
Prints dependency lines for header files even if the header files are missing. |
Compilation only. |
‑MP |
Emits dummy dependency rules that work around make errors that are generated if you remove header files without a corresponding update to the makefile. |
Compilation only. |
‑MT |
Changes the target of the makefile dependency rule produced by dependency generating options. |
Compilation and assembly. |
‑march |
Targets an architecture profile, generating generic code that runs on any processor of that architecture. |
Compilation and assembly. |
‑marm |
Requests that the compiler targets the A32 instruction
set. |
Compilation only. |
‑masm |
Selects the correct assembler for the input assembly source files. |
Compilation and assembly. |
‑mbig‑endian |
Generates code suitable for an Arm processor using byte-invariant big-endian (BE-8) data. |
Compilation and assembly. |
‑mbranch‑protection |
Protects branches using Pointer Authentication and Branch Target Identification. |
Compilation only. |
‑mcmodel |
Selects the generated code model. |
Compilation only. |
‑mcmse |
Enables the generation of code for the Secure state of the Armv8‑M Security Extensions. |
Compilation only. |
‑mcpu |
Targets a specific processor, generating optimized code for that specific processor. |
Compilation and assembly. |
‑mexecute‑only |
Generates execute-only code, and prevents the compiler from generating any data accesses to code sections. |
Compilation only. |
‑mfloat‑abi |
Specifies the following:
- Whether to use hardware instructions or software library functions for floating-point operations.
- Which registers are used to pass floating-point parameters and return values.
|
Compilation and assembly. |
‑mfpu |
Specifies the target FPU architecture, that is the floating-point hardware available on the target. |
Compilation and assembly. |
‑mimplicit‑it |
Specifies the behavior of the integrated assembler if there are conditional instructions outside IT blocks. |
Compilation and assembly. |
‑mlittle‑endian |
Generates code suitable for an Arm processor using
little-endian data. |
Compilation and assembly. |
‑mno‑neg‑immediates |
Disables the substitution of invalid instructions with
valid equivalent instructions that use the logical inverse or
negative of the specified immediate value. |
Compilation and assembly. |
‑moutline ,
‑mno‑outline
|
Puts identical sequences of code into a separate function. |
Compilation only. |
‑mpixolib |
Generates a Position Independent eXecute Only (PIXO) library. |
Compilation only. |
‑munaligned‑access ,
‑mno‑unaligned‑access
|
Enables or disables unaligned accesses to data on
Arm
processors. |
Compilation only. |
‑mthumb |
Requests that the compiler targets the T32 instruction set. |
Compilation only. |
-nostdlib |
Tells the compiler to not use the Arm standard C and C++ libraries.
|
Compilation only. |
-nostdlibinc |
Tells the compiler to exclude the Arm standard C and C++ library header files. |
Compilation only. |
‑O |
Specifies the level of optimization to use when compiling source files. |
Compilation only. |
‑o |
Specifies the name of the output file. |
Compilation and assembly. |
-pedantic |
Generate warnings if code violates strict ISO C and ISO C++. |
Compilation only. |
-pedantic-errors |
Generate errors if code violates strict ISO C and ISO C++. |
Compilation only. |
‑Rpass [COMMUNITY] |
Outputs remarks from the optimization passes made by armclang . You can output remarks for all optimizations, or remarks for a specific optimization. |
Compilation only. |
‑S |
Outputs the disassembly of the machine code generated by the compiler. |
Compilation only. |
‑save‑temps |
Instructs the compiler to generate intermediate assembly files from the specified C/C++ file. |
Compilation only. |
‑shared |
Creates a System V (SysV) shared object. |
Compilation only. |
‑std |
Specifies the language standard to compile for. |
Compilation only. |
‑‑target |
Generate code for the specified target triple. |
Compilation and assembly. |
‑U |
Removes any initial definition of the specified preprocessor macro. |
Compilation only. |
‑u |
Prevents the removal of a specified symbol if it is undefined. |
Compilation and assembly. |
‑v |
Displays the commands that invoke the compiler and sub-tools, such as armlink, and executes those commands. |
Compilation and assembly. |
‑‑version |
Displays the same information as --vsn . |
Compilation and assembly. |
‑‑version_number |
Displays the version of armclang you are using. |
Compilation and assembly. |
‑‑vsn |
Displays the version information and the license details. |
Compilation and assembly. |
‑W |
Controls diagnostics. |
Compilation only. |
‑Wl |
Specifies linker command-line options to pass to the linker when a link step is being performed after compilation. |
Compilation only. |
‑Xlinker |
Specifies linker command-line options to pass to the linker when a link step is being performed after compilation. |
Compilation only. |
‑x |
Specifies the language of source files. |
Compilation and assembly. |
‑### |
Displays the commands that invoke the compiler and sub-tools, such as armlink, without executing those commands. |
Compilation and assembly. |