Win32 Clang-enhanced Compilers

From RAD Studio
Jump to: navigation, search

BCC32C and BCC32X are RAD Studio’s C++ Clang-enhanced compilers for 32-bit Windows.

See Clang-enhanced C++ Compilers for information that the BCC32C and BCC32X compilers have in common with other Clang-enhanced C++ compilers.

BCC32C is a Clang-enhanced compiler with a command line flag compatible only with BCC32 (the classic compiler), whereas BCC32X has a command line flag compatible with other C++ Clang-enhanced compilers: BCC64, BCCIOSARM, BCCIOSARM64, and BCCAARM.

Apart from the command-line flags they accept, bcc32c and bcc32x are identical. The two front-ends exist for different command-line compatibility, classic (bcc32c with bcc32) and current (bcc32x with other Clang-enhanced compilers).

Note: For 64-bit Windows, use BCC64.

General Information

Field Value
Clang Version 5.0
LLVM Version 5.0
Calling Conventions
  • MSVC __fastcall
  • C
  • Pascal
  • Register
  • Standard Call
Name Mangling Itanium
Standard Library Dinkumware
Additional Libraries compiler-rt

Output Files

File Type File Extension File Format
Executable .exe PE32
Shared Library .dll PE32
Static Library .lib OMF
Compiled Object .obj OMF

How to use the Clang-based compiler for Windows 32-bit projects

  • Projects created with RAD Studio version 10.2.x and earlier use the classic bcc32 compiler as the default compiler for Win32.
Users can choose to enable the Use 'classic' Borland compiler setting.
To enable the Clang-enhanced compiler for a specific project, select Project > Options > C++ Compiler and deselect the Use 'classic' Borland compiler option.
Use classic Borland compiler screenshot.PNG

The IDE will now use the Clang-enhanced Win32 compiler.

Note: The difference between the two Win32 Clang-enhanced compilers, bcc32c and bcc32x, exists only on the command line. The difference is that the bcc32c compiler uses a classic-compatible command line interface while the bcc32x compiler uses a clang-compatible command line interface; the in-IDE Win32 Clang-enhanced compiler is hosted in the IDE process and is not driven by the command line.

Writing C++ Code for BCC32C and BCC32X

To write C++ code specifically for BCC32C and BCC32X, use:

#if defined(__BORLANDC__) && defined(__clang__) && defined(_WIN32) && !defined(_WIN64)
    // Your code.

For more information, see Clang-enhanced C++ Compilers, Predefined Macros.

See Also