Delphi Compiler Changes for XE2
From RAD Studio XE2
Go Up to What's New in Delphi and C++Builder XE2
Two New Delphi Cross Compilers
Delphi supports cross-platform development for 64-bit Windows and for the Mac OS X platform. The IDE uses two new cross compilers to compile cross-platform applications:
Also see Cross-Platform OS X "Hello World" Console Application and 64-bit Windows "Hello World" Application.
Delphi RTL Supports Cross-Platform Development
The Delphi run-time library (RTL) has been modified to support development of applications for both the Win64 and Mac OSX target platforms. Exceptions include Windows-specific members and units; for example, Winapi units such as ActiveX and Messages.
The VCL, on the other hand, supports only Windows-based development (Win32 and Win64).
New DEFINEs for the Target Operating System
Eight new DEFINEs have been added:
- ALIGN_STACK
- CPUX86
- CPUX64
- MACOS (Mac operating system)
- MACOS32
- PC_MAPPED_EXCEPTIONS
- PIC
- WIN64
For a complete list of predefined conditionals for Delphi, see Conditional compilation (Delphi).
Unit Scope Names Now Required
You must specify full unit-scoped unit names in your uses clause (or #include) or in the Unit scope names field in the Project > Options > Delphi Compiler dialog box. See Unit Scope Names.
Changes in Delphi Compiler Built-in Type Sizes
See 64-bit Data Types Compared to 32-bit Data Types .
Extended Data Type Is Smaller on Win64 than on Win32
DCC64.EXE generates code that uses SSE's XMMn registers. Floating-point values are stored in SSE's XMMn registers instead of FPU's ST(n) registers.
The Extended data type is 10 bytes on Win32, but is only a double (8 bytes) on Win64. This change affects numeric precision. For more details, see Delphi Considerations for the XE2 Release.
Bitwise Shift
32-bit integral values will only shift in 32-bit space. 64-bit integral values will shift in 64-bit space.
Considerations for Preparing to Migrate to 64-bit
See Converting 32-bit Delphi Applications to 64-bit Windows .
Platform-Specific Paths and Directories for Delphi or C++ Projects
For cross-platform application development, you can now associate a specific set of paths and directories with a target platform (such as OS X or 64-bit Windows):
Use the new Selected Platform field to display and specify platform-specific options. The Selected Platform field is located at the top of the following pages in Tools > Options:
- Tools > Options > Environment Options > C++ Options > Paths and Directories
- Tools > Options > Environment Options > Delphi Options > Library
- Tools > Options > Environment Options > Delphi Options > Library - Translated
New Delphi Compiler Options in the IDE
HPP output directory on Tools Options Environment Options Library page. See IDE Changes for XE2.
Compiler Version Table Added to Help
This table contains a list of every release with its associated compiler version. Compiler versions are used in conditional compilation. See Compiler Versions.