Keil Logo

Technical Support

On-Line Manuals

Compiler User Guide

Preface Overview of the Compiler Getting Started with the Compiler Compiler command-line syntax Compiler command-line options listed by group Default compiler behavior Order of compiler command-line options Using stdin to input source code to the compiler Directing output to stdout Filename suffixes recognized by the compiler Compiler output files Factors influencing how the compiler searches for Compiler command-line options and search paths Compiler search rules and the current place The ARMCC5INC environment variable Code compatibility between separately compiled and Linker feedback during compilation Unused function code Minimizing code size by eliminating unused functio Compilation build time Compilation build time Minimizing compilation build time Minimizing compilation build time with a single ar Effect of --multifile on compilation build time Minimizing compilation build time with parallel ma Compilation build time on Windows Compiler Features Compiler Coding Practices Compiler Diagnostic Messages Using the Inline and Embedded Assemblers of the AR Compiler Command-line Options Language Extensions Compiler-specific Features C and C++ Implementation Details What is Semihosting? Via File Syntax Summary Table of GNU Language Extensions Standard C Implementation Definition Standard C++ Implementation Definition C and C++ Compiler Implementation Limits

Compiler command-line options listed by group

2.2 Compiler command-line options listed by group

This topic lists the compiler command-line options, ordered by functional group.

Note

The following characters are interchangeable:
  • Nonprefix hyphens and underscores. For example, --version_number and --version-number.
  • Equals signs and spaces. For example, armcc --cpu=list and armcc --cpu list.
This applies to all tools provided with the compiler.
The compiler command-line options are as follows:
Help
  • --echo
  • --help
  • --show_cmdline
  • --version_number
  • --vsn
Source languages
  • --c90
  • --c99
  • --compile_all_input, --no_compile_all_input
  • --cpp
  • --cpp11
  • --cpp_compat
  • --strict, --no_strict
  • --strict_warnings
Search paths
  • -Idir[,dir,...]
  • -Jdir[,dir,...]
  • --kandr_include
  • --preinclude=filename
  • --reduce_paths, --no_reduce_paths
  • --sys_include
  • --ignore_missing_headers
Precompiled headers
  • --create_pch=filename
  • --pch
  • --pch_dir=dir
  • --pch_messages, --no_pch_messages
  • --pch_verbose, --no_pch_verbose
  • --use_pch=filename
Preprocessor
  • -C
  • --code_gen, --no_code_gen
  • -Dname[(parm-list)][=def]
  • -E
  • -M
  • --old_style_preprocessing
  • -P
  • --preprocess_assembly
  • --preprocessed
  • -Uname
C++
  • --allow_null_this
  • --anachronisms, --no_anachronisms
  • --dep_name, --no_dep_name
  • --force_new_nothrow, --no_force_new_nothrow
  • --friend_injection, --no_friend_injection
  • --guiding_decls, --no_guiding_decls
  • --implicit_include, --no_implicit_include
  • --implicit_include_searches, --no_implicit_include_searches
  • --implicit_typename, --no_implicit_typename
  • --nonstd_qualifier_deduction, --no_nonstd_qualifier_deduction
  • --old_specializations, --no_old_specializations
  • --parse_templates, --no_parse_templates
  • --pending_instantiations=n
  • --rtti, --no_rtti
  • --rtti_data
  • --type_traits_helpers
  • --using_std, --no_using_std
  • --vfe, --no_vfe
Output format
  • --asm
  • --asm_dir
  • -c
  • --default_extension=ext
  • --depend=filename
  • --depend_dir
  • --depend_format=string
  • --depend_single_line
  • --depend_system_headers, --no_depend_system_headers
  • --depend_target
  • --errors
  • --info=totals
  • --interleave
  • --list
  • --list_dir
  • --list_macros
  • --md
  • --mm
  • -o filename
  • --output_dir
  • --phony_targets
  • -S
  • --split_sections
Target architectures and processors
  • --arm
  • --arm_only
  • --compatible=name
  • --cpu=list
  • --cpu=name
  • --fpu=list
  • --fpu=name
  • --thumb
Floating-point support
  • --fp16_format=format
  • --fpmode=model
  • --fpu=list
  • --fpu=name
Debug
  • --debug, --no_debug
  • --debug_macros, --no_debug_macros
  • --dwarf2
  • --dwarf3
  • -g
  • --remove_unneeded_entities, --no_remove_unneeded_entities
  • --emit_frame_directives
Code generation
  • --allow_fpreg_for_nonfpdata, --no_allow_fpreg_for_nonfpdata
  • --alternative_tokens, --no_alternative_tokens
  • --bigend
  • --bitband
  • --branch_tables
  • --bss_threshold=num
  • --conditionalize, --no_conditionalize
  • --default_definition_visibility
  • --dollar, --no_dollar
  • --enum_is_int
  • --exceptions, --no_exceptions
  • --exceptions_unwind, --no_exceptions_unwind
  • --execute_only
  • --float_literal_pools
  • --export_defs_implicitly, --no_export_defs_implicitly
  • --extended_initializers, --no_extended_initializers
  • --global_reg
  • --implicit_key_function
  • --integer_literal_pools
  • --interface_enums_are_32_bit
  • --littleend
  • --locale=lang_country
  • --long_long
  • --loose_implicit_cast
  • --message_locale=lang_country[.codepage]
  • --min_array_alignment=opt
  • --multibyte_chars, --no_multibyte_chars
  • --multiply_latency
  • --narrow_volatile_bitfields
  • --pointer_alignment=num
  • --protect_stack, --no_protect_stack
  • --restrict, --no_restrict
  • --relaxed_ref_def
  • --share_inlineable_strings
  • --signed_bitfields, --unsigned_bitfields
  • --signed_chars, --unsigned_chars
  • --split_ldm
  • --string_literal_pools
  • --trigraphs
  • --unaligned_access, --no_unaligned_access
  • --use_frame_pointer
  • --vla, --no_vla
  • --wchar
  • --wchar16
  • --wchar32
Optimization
  • --autoinline, --no_autoinline
  • --data_reorder, --no_data_reorder
  • --forceinline
  • --fpmode=model
  • --inline, --no_inline
  • --library_interface=lib
  • --library_type=lib
  • --loop_optimization_level=opt
  • --lower_ropi, --no_lower_ropi
  • --lower_rwpi, --no_lower_rwpi
  • --multifile, --no_multifile
  • -Onum
  • -Ospace
  • -Otime
  • --reassociate_saturation
  • --retain=option
  • --whole_program

Note

Optimization options can limit the debug information generated by the compiler.
Diagnostics
  • --brief_diagnostics, --no_brief_diagnostics
  • --diag_error=tag[,tag,...]
  • --diag_remark=tag[,tag,...]
  • --diag_style={arm|ide|gnu}
  • --diag_suppress=tag[,tag,...]
  • --diag_suppress=optimizations
  • --diag_warning=tag[,tag,...]
  • --diag_warning=optimizations
  • --errors=filename
  • --link_all_input
  • --remarks
  • -W
  • --wrap_diagnostics, --no_wrap_diagnostics
Command-line options in a text file
  • --via=filename
Linker feedback
  • --feedback=filename
Procedure call standard
  • --apcs=qualifier...qualifier
Passing options to other tools
  • -Aopt
  • -Lopt
Other options
  • --omf_browse
Non-ConfidentialPDF file icon PDF versionARM DUI0375H
Copyright © 2007, 2008, 2011, 2012, 2014-2016 ARM. All rights reserved. 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.