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

C++23 Behind The Scenes: The Effort to Bring C++23 to RAD Studio Explained

img_7231

When RAD Studio announced C++23 support, it looked deceptively simple — just a single line in the release notes. But under that line sits one of the most complex engineering efforts in the product’s modern history.

C++23 wasn’t just another “language update”; it was a massive paradigm change. For a platform like RAD Studio, which must balance modern language features with decades of legacy compatibility, this was less of a patch and more of a full-scale solution. With that effort came BCC64x, the short name of the Modern C++ compiler used in RAD Studio. It is based on the LLVM/Clang 20 toolchain with ‘Borland’ extensions.

The compiler is just a single piece of the C++23 integration in Embarcadero products, but it’s an important one so here’s some background to it all.

The benefits of the new C++Builder compiler

The performance tends to be even better in multi-core setups. The perfect balance between performance and feature completeness is reached in the case of 16+ cores, which corresponds to the latest x86 (64-bit) processors.

Below, we provide the results of the testing of build performance on xerces library:

Testbcc32 (Classic)bcc32c (Clang 5)bcc64 (Clang 5)bcc64x (Clang 20)
Parallel test00:11.8600:16.0800:16.9900:13.14
Sequential test00:11.9202:15.6202:47.6201:35.90

More benefits of BCC64x, the new C++Builder compiler

The Technology Challenge

The Embarcadero C++ compiler is not just another Clang fork or a casual front-end plug-in. It integrates deeply with Delphi’s runtime, VCL, and FireMonkey, and must generate code that remains ABI-compatible with everything written since the Borland days. That means you can’t just drop a new parser and call it done — special keywords (__closure, __published, __classid, etc) must be supported.

Every new feature had to be verified not only for correctness but for interoperability with the old toolchain, debugging symbols, and the IDE’s Code Insight system. And anyone who has ever touched C++ compiler internals knows that’s hard work. Sometimes, even alignment conflicts are a significant issue on the way to compatibility. Given Embarcadero’s large code base and the number of devoted users of our technology, we find it important to put in as much effort as possible to minimise issues.

How to make Delphi and C++ work together

The Embarcadero ecosystem brings significant convenience for C++ developers; however, many pieces of our R&D tools are written in Delphi. That’s true even for VCL, which is one of the technologies that we offer for developing UIs. Therefore, the main feature of the Embarcadero compilers is the compatibility with the Delphi runtime.

Delphi runtime uses its own ABI. For Win32, there are different calling conventions, and for Win64 there is just one calling convention. The Delphi ABI itself fits within Itanium ABI for Win64. While this sounds like a potentially minor issue, the effort comes from supporting this variety at the same time.

More importantly, the new C++ features actually simplify the porting of Delphi features and make Delphi interoperability cleaner.

The debugger and debugging information

The second most used feature of any IDE, besides the compiler, is the debugger. The debugger also has to support the Delphi runtime, has to map Delphi to source, and has to support the same debugging information format.

The object format has undergone significant changes between the classic compiler and the modern compiler. Now it is standard COFF, while previously it was OMF, and that changes how the debugging information is read and processed.

COFF is superior to OMF because it supports 64-bit architectures, Codeview debug information format, and is fully compatible with contemporary toolchains like LLVM and MSVC. It uses an extensible, section-based design that handles large data and complex relocations efficiently, while OMF is a legacy 16/32-bit format with size limits and poor compatibility with modern linkers and debuggers.
The classic compiler’s tds/GIANT debugging information format is not compatible with CodeView. Therefore, both of them have to be maintained.
The effort to bind projects together is quite significant, and we are proud to offer this improvement to our customers.

C++Builder’s linker now understands COFF files

For the Classic compiler, the ilink32 is used. For bcc64x, the LLVM linker (ld.lld) is used.
The new linker understands COFF object files, extended relocation types, and modern debugging information formats.
C++ Builder ensures the correctness of invocation when switching between the ilink32 and the new LLVM linker.

Conclusion and future goals

BCC64x establishes a stable foundation for future C++ and Delphi interoperability. Migration is recommended for access to C++23 features, improved diagnostics, and long-term compatibility.

We have even bigger plans for the upcoming releases, which weren’t possible without upgrading our toolset. Keep in touch!


Why not download a free trial of C++Builder today and see why we think it’s the fastest, easiest, and most efficient way to create modern apps?

Exit mobile version