Arm Community
Arm Community
  • Site
  • User
  • Site
  • Search
  • User
Arm Community blogs
Arm Community blogs
Tools, Software and IDEs blog C and C++ update for Arm Compiler 6
  • Blogs
  • Mentions
  • Sub-Groups
  • Tags
  • Jump...
  • Cancel
More blogs in Arm Community blogs
  • AI blog

  • Announcements

  • Architectures and Processors blog

  • Automotive blog

  • Embedded and Microcontrollers blog

  • Internet of Things (IoT) blog

  • Laptops and Desktops blog

  • Mobile, Graphics, and Gaming blog

  • Operating Systems blog

  • Servers and Cloud Computing blog

  • SoC Design and Simulation blog

  • Tools, Software and IDEs blog

Tags
  • Keil MDK
  • Arm Compiler 6
  • C++
Actions
  • RSS
  • More
  • Cancel
Related blog posts
Related forum threads

C and C++ update for Arm Compiler 6

Ronan Synnott
Ronan Synnott
July 28, 2017
2 minute read time.

As you are hopefully aware, Arm Compiler 6 has been available for 3+ years now, and has grown in maturity, and optimization quality release on release. As I write this, the latest available version is 6.8, and 6.6 has been qualified for use in safety-related development. We offer full support for the latest Arm processors, across the Cortex-A, R, and M, and SecureCore families. Arm Compiler 6 is available within DS-5 and Keil MDK toolchains. Furthermore the qualified version is available for purchase stand-alone.

Arm Compiler 6 is based on the LLVM framework, using the modern Clang compiler front-end, and this is reflected in the name of the executable, Armclang. The compiler is then integrated into the full Arm tools suite, enabling use of legacy assembler code built with Armasm, as well as gas format assembler directly with Armclang. Finally the Arm linker (Armlink) brings in the optimized C and C++ libraries, or if desired the size optimized Arm C MicroLib library, as well as (optionally) implementing link-time optimizations across the source code.

One advantage of using Clang is that this allows for support for the latest C and C++ standards. In particular we are seeing a growing interest in C++11 and C++14 features. We document that C++11 and other standards are supported, and are selected with the -std option. We also allow for additional features, such as C++14, to have beta-quality support. These are features that we have not yet formally productized, but are present within Clang (for example, the --std=c++14 option is not currently mentioned in Arm's documentation, but is consumed by the compiler).

For information on C++ support in Clang, see here.

For information on the source language compatibility in Clang, see here.

C++ threads

We have also been working on C++ threading (std::thread) support. While the top level functionality is supported, their is a requirement on the user to provide the necessary low level support. We are developing an API as defined in arm-tpl.h to facilitate this. Within this header file is an example 'dummy' implementation to allow your code to successfully build (though will not execute), which you can use by pre-defining (-D) the macro _ARMTPL_BUILD_DUMMY_THREADS, and of course including this header (#include <arm-tpl.h>).

A cursory search online found a number of C++ thread code examples. I was able to easily build these by including the above header file in the source(s), and (as per the documentation) compiling with:

  • D_ARM_LIBCPP_EXTERNAL_THREADS -D_ARMTPL_BUILD_DUMMY_THREADS-std=c++11

and linking with:

  • -stdlib=threaded_libc++

Note that C++ threading, while a powerful feature, is not suitable in all use cases, notably in highly memory limited systems, as even relatively simple examples pull in over 100KB of library code to support this.

Anonymous
Tools, Software and IDEs blog
  • Python on Arm: 2025 Update

    Diego Russo
    Diego Russo
    Python powers applications across Machine Learning (ML), automation, data science, DevOps, web development, and developer tooling.
    • August 21, 2025
  • Product update: Arm Development Studio 2025.0 now available

    Stephen Theobald
    Stephen Theobald
    Arm Development Studio 2025.0 now available with Arm Toolchain for Embedded Professional.
    • July 18, 2025
  • GCC 15: Continuously Improving

    Tamar Christina
    Tamar Christina
    GCC 15 brings major Arm optimizations: enhanced vectorization, FP8 support, Neoverse tuning, and 3–5% performance gains on SPEC CPU 2017.
    • June 26, 2025