The standard predefined versions are documented by the D language specification hosted at https://dlang.org/spec/version.html#predefined-versions.
allnoneVersion none is never defined; used to just disable a section of code.
Version all is always defined; used as the opposite of none.
BigEndianLittleEndianThese versions reflect the byte order of multi-byte data in memory.
LittleEndian is set when the least significant byte is first.
BigEndian is set when the most significant byte is first.
CRuntime_BionicCRuntime_GlibcCRuntime_MicrosoftCRuntime_MuslCRuntime_NewlibCRuntime_UClibcThese versions reflect which standard C library is being linked in.
CRuntime_Bionic is set when Bionic is the default C library.
CRuntime_Glibc is set when GLIBC is the default C library.
CRuntime_Microsoft is set when MSVCRT is the default C library.
CRuntime_Musl is set when musl is the default C library.
CRuntime_Newlib is set when Newlib is the default C library.
CRuntime_UClibc is set when uClibc is the default C library.
CppRuntime_GccThis version is defined when the standard C++ library being linked in is libstdc++.
D_BetterCThis version is defined when the standard D libraries are not being implicitly linked in. This also implies that features of the D language that rely on exceptions, module information, or run-time type information are disabled as well. Enabled by -fno-druntime.
D_CoverageThis version is defined when code coverage analysis instrumentation is being generated. Enabled by -ftest-coverage.
D_DdocThis version is defined when Ddoc documentation is being generated. Enabled by -fdoc.
D_ExceptionsThis version is defined when exception handling is supported. Disabled by -fno-exceptions.
D_HardFloatD_SoftFloatThese versions reflect the floating-point ABI in use by the target.
D_HardFloat is set when the target hardware has a floating-point unit.
D_SoftFloat is set when the target hardware does not have a
floating-point unit.
D_InvariantsThis version is defined when checks are being emitted for class invariants and struct invariants. Enabled by -finvariants.
D_LP64This version is defined when pointers are 64-bits. Not to be confused with
with C’s __LP64__ model.
D_ModuleInfoThis version is defined when run-time module information (also known as
ModuleInfo) is supported. Disabled by -fno-moduleinfo.
D_NoBoundsChecksThis version is defined when array bounds checks are disabled. Enabled by -fno-bounds-checks.
D_OptimizedThis version is defined in all optimizing compilations.
D_PICThis version is defined when position-independent code is being generated. Enabled by -fPIC.
D_PIEThis version is defined when position-independent code that can be only linked into executables is being generated. Enabled by -fPIE.
D_PreConditionsThis version is defined when checks are being emitted for in contracts.
Disabled by -fno-preconditions.
D_PostConditionsThis version is defined when checks are being emitted for out contracts.
Disabled by -fno-postconditions.
D_TypeInfoThis version is defined when run-time type information (also known as
TypeInfo) is supported. Disabled by -fno-rtti.
D_Version2This version defined when this is a D version 2 compiler.
unittestThis version is defined when the unittest code is being compiled in.
Enabled by -funittest.