Red Hat Developer

We are pleased to announce the general availability of these three compiler toolsets for Red Hat Enterprise Linux 7:

  • Clang/LLVM 7.0
  • Go 1.11
  • Rust 1.31

These toolsets can be installed from the Red Hat Enterprise Linux 7 Devtools channel. See the "Compiler toolset details" section of this article to learn about the new features.

These toolsets became officially supported Red Hat offerings as of the previous release.

About compiler toolsets for Red Hat Enterprise Linux

Twice a year, Red Hat distributes new versions of compiler toolsets, scripting languages, open source databases, and web tools providing application developers with access to the latest, stable versions. These Red Hat-supported offerings are packaged as Red Hat Software Collections (scripting languages, open source databases, web tools, etc.), Red Hat Developer Toolset (GCC), and the recently added compiler toolsets Clang/LLVM, Go, and Rust. All of these offerings are yum installable and included in all Red Hat Enterprise Linux Developer Subscriptions and most Red Hat Enterprise Linux subscriptions. Most components are also available as Linux container images for hybrid cloud development across Red Hat platforms, including Red Hat Enterprise Linux, Red Hat OpenShift, Red Hat OpenStack, etc.

Compiler toolset details

Clang/LLVM 7.0

This release is based on LLVM version 7.0 and is fully supported by Red Hat.

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. The LLVM Core libraries provide a modern source- and target-independent optimizer, along with code generation support for the Red Hat Enterprise Linux CPU architectures.

Clang is an "LLVM native" C/C++/Objective-C compiler, which aims to deliver amazingly fast compiles and extremely useful error and warning messages and to provide a platform for building great source level tools. The Clang Static Analyzer is a tool that automatically finds bugs in your code and is a great example of the sort of tool that can be built using the Clang front end as a library to parse C/C++ code.

The following components are included in this release:

  • llvm-toolset-7.0 (automatically installs Clang)

Clang/LLVM 7.0 runs on Red Hat Enterprise Linux 7 (x86_64, Power LE, aarch64, S390x)

Note: Since the November 2018 release, Red Hat's Clang/LLVM package naming convention has changed so that the Red Hat version number now reflects the upstream version. The llvm-toolset-7packages (without the dot zero), are based on Clang/LLVM 5.0. The new package name for Clang/LLVM 7.0 is llvm-toolset-7.0 (seven dot zero). Although this might seem confusing now, hopefully it will make things easier for everyone going forward.

Here's a list of the version numbers and corresponding package names:

  • LLVM version 7.x, package name llvm-toolset-7.0
  • LLVM version 6.x, package name llvm-toolset-6.0
  • LLVM Version 5.x, package name llvm-toolset-7

For more information, see the LLVM 7.0.0 Release Notes and Clang 7.0.0 Release Notes.

Golang 1.11

This Go toolset is based on Golang 1.11 and is fully supported by Red Hat.

Go is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel type system enables flexible and modular program construction. Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It's a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language.

The following components are included in this release:

  • go-toolset-1.11
  • go-toolset-1.11-golang-1.11

Golang 1.11 runs on Red Hat Enterprise Linux 7 (x86_64, Power LE, aarch64, S390x)

For more details, see the Go 1.11 release notes.

Rust 1.31.1

This Rust toolset is based on Rust 1.31 and is fully supported by Red Hat.

Rust is an open source systems programming language created by Mozilla and a community of volunteers. It is designed to help developers create fast, secure applications that take full advantage of the powerful features of modern multi-core processors. It prevents segmentation faults and guarantees thread safety, all with an easy-to-learn syntax.

Additionally, Rust offers zero-cost abstractions, move semantics, guaranteed memory safety, threads with no data races, trait-based generics, pattern matching, type inference, and efficient C bindings, with a minimum runtime size.

Cargo is Rust’s package manager and build tool. It allows Rust projects to declare dependencies with specific version requirement. Cargo will resolve the full dependency graph, download packages as needed, and build and test the entire project.

The following components are included in this release:

  • rust-toolset-1.31 (automatically installs Cargo)
  • rust-toolset-1.31-cargo

Rust 1.31 runs on Red Hat Enterprise Linux 7 (x86_64, Power LE, aarch64, S390x)

  • New capabilities with defining procedural macros
    • Attribute macros let you define custom #[name] annotations.
    • Function macros work like those defined by macro_rules! but have more flexibility being implemented in Rust.
    • Macros can now be imported in use statements, removing the need for the #[macro_use] crate attribute.
    • The proc_macro crate is now stable, to help write these new macros.
  • Module improvements
    • External crates are now in the prelude, which allows a crate name to serve as the root of a path from anywhere.
    • The crate keyword now serves as the root of your own crate in paths and use statements.
    • 2018 edition
      • The new 2018 edition marks a collective milestone of the past three years of Rust development, while also making a few opt-in breaking changes. Existing code will default to 2015 edition, with no breaking changes, and crates from different editions are fully interoperable. cargo new will specify edition = "2018" in Cargo.toml for new projects.
      • async, await, and try are reserved keywords in 2018, and dyn is now a strict keyword.
      • Non-lexical lifetimes are a refinement of the previous block-based lifetime system, allowing borrowed values to be released sooner in many cases to be reused elsewhere. This is initially exclusive to the 2018 edition but planned for 2015 as well.
      • Module changes: Explicit extern crate declarations are unnecessary in most cases in 2018. use paths can now be relative from the current scope, rather than always starting from the root scope as in 2015.
    • Lifetimes can now be left implicit in more cases, especially using the new '_ placeholder.
    • const fn — Functions can be declared constant, which allows them to be used in restricted contexts, like the initialization of a const or static value.
    • Stable tools: clippy, rls, and rustfmt. We have been shipping these tools as preview already, but now they are officially supported.
      • clippy adds extra lints for code/style issues.
      • rls implements the Language Server protocol for IDE integration.
      • rustfmt formats your code and is also integrated with the cargo fmt subcommand.
    • Tool lints let you add warning annotations for custom lints, especially for those added by clippy. For example, #[allow(clippy::bool_comparison)] will silence that warning on an item for which you deem it acceptable.
  •  Notable changes to Cargo include:
    • Cargo now shows a progress bar as it builds your crates and dependencies.
    • Cargo now allows renaming dependencies in Cargo.toml, which affects how they are referenced in your sources. Previously, you could only rename in source, like extern crate published_name as new_name;.

Note: The Rust compiler naming convention has changed so that the version number reflects the community version. The previous version was Rust-toolset-7, which was based on Rust 1.29.

For more information

Last updated: January 2, 2024