This directory contains the source code of the dmd compiler. Refer to this file for an overview of the actual source files.
The compiler can be built using the integrated build system build.d.
./build.dBuilding requires a host D compiler (DMD/LDC/GDC) of version 2.079.1 or above
and defaults to dmd as found on the path. This behaviour can be overriden
by explicitly specifying a different host compiler using the HOST_DMD variable.
./build.d HOST_DMD=<compiler path>Note that building with LDC & GDC requires the ldmd2/gdmd wrappers to
translate the command line arguments.
See the output of ./build.d --help to get a list of all supported targets
or see the list of major targets below.
To bootstrap dmd on posix you need to have a C++ compiler installed,
such as gcc, when using the default $CC setting.
Use bootstrap.sh to bootstrap the compiler if there is no D compiler
installed. The script will download an official release and use it
as a host compiler when forwarding targets to build.d.
Refer to the HOST_DMD_VER variable in bootstrap.sh for the currently
used release version.
build.d supports a variety of checks for the source which are enforced
alongside of the general test suite.
Runs all unittest blocks in the source code.
Runs the C++ frontent test to verify the manually created C++ headers in the source directory.
Note: This is currently not supported on windows.
Verifies that the manually maintained C++ headers in
compiler/include/dmd/ stay in sync with the D
extern(C++) declarations in the compiler source. Checks enum constant
values, field offsets and sizes, class instance sizes, vtable indices,
and C++ mangled names.
Note: Linux/64-bit only (Itanium ABI mangling).