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 3.3
LLVM Version 3.3
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

BCC32C and BCC32X do not replace BCC32, RAD Studio gives you the option to choose the compiler for each of your projects. BCC32 is the default C++ compiler for 32-bit Windows.

To enable BCC32C or BCC32X for a specific project, select Project > Options > C++ Compiler and disable the Use 'classic' Borland compiler option under Classic Compiler.

The IDE will now use the Clang-enhanced Win32 compiler. The difference between bcc32c and bcc32x exists only on the command line; the in-IDE 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