Arm Community
Arm Community
  • Site
  • User
  • Site
  • Search
  • User
  • Groups
    • Research Collaboration and Enablement
    • DesignStart
    • Education Hub
    • Innovation
    • Open Source Software and Platforms
  • Forums
    • AI and ML forum
    • Architectures and Processors forum
    • Arm Development Platforms forum
    • Arm Development Studio forum
    • Arm Virtual Hardware forum
    • Automotive forum
    • Compilers and Libraries forum
    • Graphics, Gaming, and VR forum
    • High Performance Computing (HPC) forum
    • Infrastructure Solutions forum
    • Internet of Things (IoT) forum
    • Keil forum
    • Morello Forum
    • Operating Systems forum
    • SoC Design and Simulation forum
    • 中文社区论区
  • Blogs
    • AI and ML blog
    • Announcements
    • Architectures and Processors blog
    • Automotive blog
    • Graphics, Gaming, and VR blog
    • High Performance Computing (HPC) blog
    • Infrastructure Solutions blog
    • Innovation blog
    • Internet of Things (IoT) blog
    • Operating Systems blog
    • Research Articles
    • SoC Design and Simulation blog
    • Tools, Software and IDEs blog
    • 中文社区博客
  • Support
    • Arm Support Services
    • Documentation
    • Downloads
    • Training
    • Arm Approved program
    • Arm Design Reviews
  • Community Help
  • More
  • Cancel
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 and ML blog

  • Announcements

  • Architectures and Processors blog

  • Automotive blog

  • Embedded blog

  • Graphics, Gaming, and VR blog

  • High Performance Computing (HPC) blog

  • Infrastructure Solutions blog

  • Internet of Things (IoT) blog

  • Operating Systems 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
  • What is new in LLVM 16?

    Pablo Barrio
    Pablo Barrio
    Arm contributions from Arm to the new release include the usual architecture and CPU additions and new features such as, function multi-versioning and strict floating point support.
    • May 1, 2023
  • Product update: Arm Development Studio 2023.0 now available

    Ronan Synnott
    Ronan Synnott
    Arm Development Studio 2023.0 now available with support for Arm Neoverse V2 processor.
    • April 27, 2023
  • What is new in LLVM 15?

    Pablo Barrio
    Pablo Barrio
    LLVM 15.0.0 was released on September 6, followed by a series of minor bug-fixing releases. Arm contributed support for new Arm extensions and CPUs.
    • February 27, 2023