Site icon Embarcadero RAD Studio, Delphi, & C++Builder Blogs

The new Clang Toolchain in C++Builder 12.1!

The new Clang Toolchain in C++Builder 12.1!

RAD Studio 12.1 has big news: we have released the first version of our new Clang-based toolchain! This is a complete revision of the entire technology stack, and provides a solid, modern, ‘done the right way’ foundation for all of C++ going forward.

Technical Info

The new toolchain targets Windows 64-bit Intel apps, and is based on Clang 15, with a new STL, a new C++ runtime, and uses the Windows Universal C Runtime (UCRT.) It has a new linker, and uses the COFF and PDB object and debug file formats. For more information, see the second Behind the Build webinar from just a few weeks before 12.1 released. We also have documentation on upgrading with key things to know.

All binaries (the compiler, linker etc) are 64-bit EXEs, meaning they can handle large memory requirements – and you’d be surprised how often this is needed for C++. This even includes when compiling in the IDE, where we call out to the external process.

Clang: a solid foundation, reaching for the future

What does it provide?

The toolchain has a focus on quality above features (it is version 1, but we want what we release to be solid), on doing things right and making the right choices, on resolving the key areas through that quality that affect you, and on setting C++Builder up for a really exciting future.

Examples of the right choices:

Examples of quality in areas that affect you:

Examples of setting up for the future:

Examples of quality above features:

What has it not got?

Quality above features means that version 1 does not include everything. The notable absences are that packages can only be statically linked, not dynamically linked, in this release; packages built in C++ must similarly be statically linked (ie built as .libs) currently; and we don’t yet have CMake support. We’re also in the process right now of updating libraries on GetIt, like Boost. Read this blog post for info on plans for these features, and common tasks and how to achieve them.

We recommend using the toolchain unless these are blockers for you due to its greatly increased overall quality.

What has it got?

Huge benefits! We are closing tickets left, right and center because code that did not work in the past, works now.

Try it out for a new, fast linker. A new, high quality STL (ever had issues with std::variant or other types? Try it now.) Using the PDB format, if you want to use, eg, WinDbg. Huge C++ compatibility: if you need to compile 3rd party code, use this toolchain. You get the idea!

The future

This is a foundational release and we really want you to try it out! Remember, when you install RAD Studio or C++Builder, both the old and new Win64 toolchains are available at the same time, in parallel. Just add the new one to your projects (in the Projects view, right-click, Add Platform, ‘Win64 Modern’) and you can then toggle back and forth between them by double-clicking the platform target you want.

We do intend to remove the old Win64 toolchain in future once we ship dynamic packages, so we recommend taking advantage of the current parallel toolchains as an upgrade feature.

We hope you’re as excited by this release as we are. While we know it’s a version 1, in terms of quality it’s a solid version 1 and we’re really keen to see you try it out and test it against your code… and see what you can achieve now that you couldn’t before!

 

Exit mobile version