0% found this document useful (0 votes)
33 views11 pages

C++ - The New Clang Toolchain in C++Builder 12.1!

The new Clang Toolchain in C++Builder 12.1 introduces a complete revision of the toolchain based on Clang 15 with a new STL, runtime, and linker. It focuses on quality, standards compliance, and setting up C++ for the future while some features like dynamic linking are not yet supported.

Uploaded by

endickhk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views11 pages

C++ - The New Clang Toolchain in C++Builder 12.1!

The new Clang Toolchain in C++Builder 12.1 introduces a complete revision of the toolchain based on Clang 15 with a new STL, runtime, and linker. It focuses on quality, standards compliance, and setting up C++ for the future while some features like dynamic linking are not yet supported.

Uploaded by

endickhk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

+ CUSTOMER PORTAL (HTTPS://MY.EMBARCADERO.COM/) + DISCOVER GETIT *NEW* (HTTPS://GETITNOW.EMBARCADERO.

COM/)

 (https://www.facebook.com/embarcaderotech/)
 (https://twitter.com/EmbarcaderoTech)
(https://  (https://github.com/Embarcadero)

www.embarcadero.com/)  (https://www.youtube.com/channel/UCMmsCQhkz-
WlJ-IVBzPhbgA)

C + + ( H T T P S : // B L O G S . E M B A R C A D E R O . C O M / C A T E G O R Y / C P P / )

M O D E R N I Z A T I O N ( H T T P S : // B L O G S . E M B A R C A D E R O . C O M / C A T E G O R Y / M O D E R N I Z A T I O N / )

N E W S ( H T T P S : // B L O G S . E M B A R C A D E R O . C O M / C A T E G O R Y / N E W S / )

R A D S T U D I O ( H T T P S : // B L O G S . E M B A R C A D E R O . C O M / C A T E G O R Y / R A D - S T U D I O / )

W I N D O W S ( H T T P S : // B L O G S . E M B A R C A D E R O . C O M / C A T E G O R Y / W I N D O W S / )

The new Clang Toolchain in C++Builder 12.1!


(https://blogs.embarcadero.com/author/davidmillington/) By David Millington (https://blogs.embarcadero.com/author/
davidmillington/) -
April 16, 2024

Table of Contents

• The new Clang Toolchain in C++Builder 12.1!


◦ Technical Info
◦ What does it provide?
▪ What has it not got?
▪ What has it got?
◦ The future

The new Clang Toolchain in C++Builder 12.1!


RAD Studio 12.1 has big news: we have released the �rst 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 �le formats. For
more information, see the second Behind the Build webinar (http://youtube.com/watch?v=Ps5pW5uhmMw) from just a few
weeks before 12.1 released. We also have documentation on upgrading with key things to know (https://
docwiki.embarcadero.com/RADStudio/Athens/en/Upgrading_Existing_C%2B%2B_Projects_to_64-
bit_Windows#Upgrading_to_the_bcc64x_.28Windows_64-bit_.28Modern.29.29).


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.
(https://i0.wp.com/
blogs.embarcadero.com/wp-content/
uploads/2024/04/
DALLE-2024-04-16-173424-A-metaphorical-
representation-of-a-C-compiler-depicted-as-
a-futuristic-structure-with-a-solid-
foundation-6239903.webp?ssl=1)
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:

• We are using the platform standard COFF object �le format


• We are using the platform standard PDB debug �le format (this should allow you to use other specialised debuggers, if
you need)
• Making heavy use of open source software, such as LLVM’s STL (libc++)
• Removing duplicate efforts: we used to have our own C runtime, but there’s one built into Windows now (the UCRT); we
use that
• Shipping both the old Win64 toolchain and the new one side by side in the IDE (yes, both are there!), so you can upgrade
and test moving from old to new just by toggling platform. This should really help upgrading: there’s no sudden, required
switch.

Examples of quality in areas that affect you:

• The linker: there should be no more memory issues, it’s the same linker used to build Chrome
• The linker: it’s about four times faster than the old ilink
• The STL: a complete replacement, with a high-quality STL with excellent standards test results

Examples of setting up for the future:

• Recent version of Clang, and much easier to keep up to date (the only reason it’s not the absolute latest now is to reduce

multiple moving targets)
• Platform standards look towards interoperability
• Open source STL looks towards constant (ongoing) quality and features
• Etc.

Examples of quality above features:

• A very strong focus on C++ standards compliance: mid-last-year, nine months before release, we were already passing
many more tests than our previous old toolchain
• A very strong focus on additional quality: we had a special focus on exception handling, where not only do we pass
multiple test suites but we created over 700 new tests for various scenarios ourselves

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 (https://
blogs.embarcadero.com/how-to-achieve-common-tasks-with-the-new-clang-toolchain-in-12-1/).

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

What has it got?


Huge bene�ts! 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
(https://i0.wp.com/blogs.embarcadero.com/wp-content/uploads/2024/04/vcl-
skia-project-new-clang-9302594.png?ssl=1)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 (https://blogs.embarcadero.com/how-to-
achieve-common-tasks-with-the-new-clang-toolchain-in-12-1/), in terms of quality it’s a solid (https://docwiki.embarcadero.com/
RADStudio/Athens/en/Upgrading_Existing_C%2B%2B_Projects_to_64-bit_Windows#Upgrading_to_the_bcc64x_.28Windows_64-
bit_.28Modern.29.29)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!


(https://youtu.be/

8NjEEy--uFU)

Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.

START FREE TRIAL (HTTPS://WWW.EMBARCADERO.COM/PRODUCTS/RAD-STUDIO/START-FOR-FREE)

UPGRADE TODAY (HTTPS://WWW.EMBARCADERO.COM/APP-DEVELOPMENT-TOOLS-STORE/)

FREE DELPHI COMMUNITY EDITION (HTTPS://WWW.EMBARCADERO.COM/PRODUCTS/DELPHI/STARTER)

FREE C++BUILDER COMMUNITY EDITION (HTTPS://WWW.EMBARCADERO.COM/PRODUCTS/CBUILDER/STARTER)

 1 (https://blogs.embarcadero.com/the-new-clang-  
toolchain-in-cbuilder-12-1/#comments) 1216 (mailto:?
subject=The⠀new⠀Clang⠀Toolchain⠀in⠀C+
    +Builder⠀12.1!
(https://
(https://
(https://
(https://
&body=https://
blogs.embarcadero.com/
blogs.embarcadero.com/
blogs.embarcadero.com/
blogs.embarcadero.com/
blogs.embarcadero.com/
the- the- the- the- the-
new-new-new-new-new-
clang-
clang-
clang-
clang-
clang-
toolchain-
toolchain-
toolchain-
toolchain-
toolchain-
in- in- in- in- in-
cbuilder-
cbuilder-
cbuilder-
cbuilder-
cbuilder-
12- 12- 12- 12- 12-
1/) 1/) 1/) 1/) 1/)


(https://
blogs.embarcadero.com/
author/davidmillington/)

ABOUT AUTHOR

David Millington (https://blogs.embarcadero.com/


author/davidmillington/)
David is an Australian developer, currently living in far-north Europe. He is the senior product manager for C+
+ at Idera, looking after C++Builder and Visual Assist.

 (https://twitter.com/cpp_delphi_dave)

(https:// PREVIOUS
The New Quality Portal Is Live – Here Are The Details
blogs.embarcadero.com/
the-new- (https://blogs.embarcadero.com/the-new-quality-portal-is-live-here-are-the-details/)

(https:// NEXT
How to achieve common tasks with the new Clang toolchain in 12.1
blogs.embarcadero.com/
how-to- (https://blogs.embarcadero.com/how-to-achieve-common-tasks-with-the-new-clang-toolchain-in-12-1/)

1 Comment

Navid REPLY (HTTPS://BLOGS.EMBARCADERO.COM/THE-NEW-CLANG-TOOLCHAIN-IN-CBUILDER-12-1/?REPLYTOCOM=8610#RESPOND)

April 18, 2024 at 11:51 am


(https://
blogs.embarcadero.com/the-
new-clang-toolchain-in-
cbuilder-12-1/#comment-8610)

Thank you for the hard


work. My initial experiences
using 12.1 were very
positive. I had no trouble
using open source libraries
that previously could not be
compiled with CPPB. Are
there plans to support
other platforms (macOS,
Linux, iOS, Android)? 
Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed (https://akismet.com/privacy/).

Join Our Global Developer Community


Join our email list and receive the latest case studies, event updates, product news, and much more.

Enter your email

SIGN UP

Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.

START FREE TRIAL (HTTPS://WWW.EMBARCADERO.COM/PRODUCTS/RAD-STUDIO/START-FOR-FREE)

UPGRADE TODAY (HTTPS://WWW.EMBARCADERO.COM/APP-DEVELOPMENT-TOOLS-STORE/)

FREE DELPHI COMMUNITY EDITION (HTTPS://WWW.EMBARCADERO.COM/PRODUCTS/DELPHI/STARTER)

FREE C++BUILDER COMMUNITY EDITION (HTTPS://WWW.EMBARCADERO.COM/PRODUCTS/CBUILDER/STARTER)


(https://lp.embarcadero.com/RAD-

Studio-Guide-For-Managers) DOWNLOAD NOW! (HTTPS://LP.EMBARCADERO.COM/RAD-STUDIO-GUIDE-FOR-MANAGERS)

(https://www.youtube.com/watch?v=kQa_dCu7ec4)

WATCH NOW! (HTTPS://WWW.YOUTUBE.COM/WATCH?V=KQA_DCU7EC4)


Search
Type keyword(s) here …

SEARCH

Something Fresh

(https:// What Are The Container Adapters in Modern C++? (https://blogs.embarcadero.com/what-are-


the-container-adapters-in-modern-c/)
blogs.embarcadero.com/
April 19, 2024
what-are-the-

(https:// Delphi App For Go-Kart Racing Tops Both App Stores! (https://blogs.embarcadero.com/delphi-
app-for-go-kart-racing-tops-both-app-stores/)
blogs.embarcadero.com/
April 17, 2024
delphi-app-for-

(https:// RAD Studio 12.1 Athens Patch 1 Available (https://blogs.embarcadero.com/rad-studio-12-1-


athens-patch-1-available/)
blogs.embarcadero.com/
April 17, 2024
rad-

Popular Posts

Athens Patch 1 Studio 12.1 Athens Is Delphi A Memory


Available
N E W S ( H T T P S : //
(https://
B LO G S . E M B A R C A D E R O. C O M / C AT E G O RY /
(https://
N E W S ( H T T P S : //
B LO G S . E M B A R C A D E R O. C O M / C AT E G O RY /
Safe Language?
N E W S ( H T T P S : //
B LO G S . E M B A R C A D E R O. C O M / C AT E G O RY /
blogs.embarcadero.com
NEWS/) blogs.embarcadero.com
NEWS/) (https://
NEWS/)

/rad-studio-12-1- /announcing-the- blogs.embarcadero.com


athens-patch-1- availability-of-rad- /is-delphi-a-memory-
available/) studio-12-1-athens/) safe-language/)
(https://blogs.embarcadero.com/ (https://blogs.embarcadero.com/ (https://blogs.embarcadero.com/
author/marcocantuembarcadero-com/) author/marcocantuembarcadero-com/) author/marcocantuembarcadero-com/
By Marco Cantu (https:// By Marco Cantu (https:// By Marco Cantu (https://
blogs.embarcadero.com/author/ blogs.embarcadero.com/author/ blogs.embarcadero.com/author/
marcocantuembarcadero-com/) - marcocantuembarcadero-com/) - marcocantuembarcadero-com/)
April 17, 2024 April 4, 2024 March 6, 2024

Categories

B U S I N E S S D E V E L O P M E N T ( H T T P S : // B L O G S . E M B A R C A D E R O . C O M / C AT E G O R Y / N E W S / B U S I N E S S - 3
DEVELOPMENT/)


C + + ( H T T P S : // B L O G S . E M B A R C A D E R O . C O M / C AT E G O R Y / C P P / ) 927
C A S E S T U D Y ( H T T P S : // B L O G S . E M B A R C A D E R O . C O M / C AT E G O R Y / C A S E - S T U D Y / ) 23

C O D E ( H T T P S : // B L O G S . E M B A R C A D E R O . C O M / C AT E G O R Y / C O D E / ) 595

C O N T E S T ( H T T P S : // B L O G S . E M B A R C A D E R O . C O M / C AT E G O R Y / N E W S / C O N T E S T / ) 2

D AT A B A S E ( H T T P S : // B L O G S . E M B A R C A D E R O . C O M / C AT E G O R Y / D AT A B A S E / ) 136

D E L P H I ( H T T P S : // B L O G S . E M B A R C A D E R O . C O M / C AT E G O R Y / D E L P H I / ) 1584

D E V E L O P E R I N T E R V I E W S ( H T T P S : // B L O G S . E M B A R C A D E R O . C O M / C AT E G O R Y / D E V E L O P E R - I N T E R V I E W S / ) 21

E V E N T ( H T T P S : // B L O G S . E M B A R C A D E R O . C O M / C AT E G O R Y / N E W S / E V E N T / ) 6

F I R E M O N K E Y ( H T T P S : // B L O G S . E M B A R C A D E R O . C O M / C AT E G O R Y / F I R E M O N K E Y / ) 12

H O W - T O ' S ( H T T P S : // B L O G S . E M B A R C A D E R O . C O M / C AT E G O R Y / N E W S / H O W - T O S / ) 18

I D E ( H T T P S : // B L O G S . E M B A R C A D E R O . C O M / C AT E G O R Y / I D E / ) 256

I N T E R B A S E ( H T T P S : // B L O G S . E M B A R C A D E R O . C O M / C AT E G O R Y / I N T E R B A S E / ) 42

I N T E R V I E W ( H T T P S : // B L O G S . E M B A R C A D E R O . C O M / C AT E G O R Y / I N T E R V I E W / ) 51

M O D E R N I Z AT I O N ( H T T P S : // B L O G S . E M B A R C A D E R O . C O M / C AT E G O R Y / M O D E R N I Z AT I O N / ) 9

N E W S ( H T T P S : // B L O G S . E M B A R C A D E R O . C O M / C AT E G O R Y / N E W S / ) 972

P R O D U C T I V I T Y ( H T T P S : // B L O G S . E M B A R C A D E R O . C O M / C AT E G O R Y / N E W S / P R O D U C T I V I T Y / ) 23

P Y T H O N ( H T T P S : // B L O G S . E M B A R C A D E R O . C O M / C AT E G O R Y / P Y T H O N / ) 14

R A D S E R V E R ( H T T P S : // B L O G S . E M B A R C A D E R O . C O M / C AT E G O R Y / R A D - S E R V E R / ) 5

R A D S T U D I O ( H T T P S : // B L O G S . E M B A R C A D E R O . C O M / C AT E G O R Y / R A D - S T U D I O / ) 700

R E S E A R C H ( H T T P S : // B L O G S . E M B A R C A D E R O . C O M / C AT E G O R Y / N E W S / R E S E A R C H / ) 11

S H O W C A S E ( H T T P S : // B L O G S . E M B A R C A D E R O . C O M / C AT E G O R Y / S H O W C A S E / ) 291

T E C H PA R T N E R ( H T T P S : // B L O G S . E M B A R C A D E R O . C O M / C AT E G O R Y / T E C H - PA R T N E R / ) 187

W E B I N A R ( H T T P S : // B L O G S . E M B A R C A D E R O . C O M / C AT E G O R Y / N E W S / W E B I N A R / ) 30

W H I T E PA P E R ( H T T P S : // B L O G S . E M B A R C A D E R O . C O M / C AT E G O R Y / N E W S / W H I T E PA P E R / ) 9
W I N D O W S ( H T T P S : // B L O G S . E M B A R C A D E R O . C O M / C AT E G O R Y / W I N D O W S / ) 23

Toggle Reader Mode

(https://feeds.feedburner.com/stackover�ow/newest-delphi) Unknown Feed ()

(https://feeds.feedburner.com/stackover�ow/newest-interbase) Unknown Feed ()

CATEGORIES

News (https://blogs.embarcadero.com/categor y/news/)

RAD Studio 

Delphi (https://blogs.embarcadero.com/categor y/delphi/)

C++ (https://blogs.embarcadero.com/categor y/cpp/)

InterBase (https://blogs.embarcadero.com/categor y/interbase/)

Community (https://blogs.embarcadero.com/community/)

Tech Par tner (https://blogs.embarcadero.com/categor y/tech-par tner/)

USEFUL LINKS

Home (/)

News 

Showcase 

Community 

� 

FOLLOW US

 (https://www.facebook.com/embarcaderotech/)  (https://twitter.com/EmbarcaderoTech)

 (https://github.com/Embarcadero)  (https://www.youtube.com/channel/UCMmsCQhkz-WlJ-IVBzPhbgA)

Embarcadero’s users understand the scalability and stability of C++ and Delphi programming, and depend 
on the decades of innovation those languages bring to development. Ninety of the Fortune 100 and an
active community of more than three million users worldwide have relied on Embarcadero’s award-winning
products over the past 30 years. Icons by Icons8.com (https://icons8.com/).

© 2024 EMBARCADERO (https://www.embarcadero.com/) INC. ALL RIGHTS RESERVED

You might also like