Skip to content

Compiling

dd86k edited this page Oct 10, 2024 · 12 revisions

Prerequisites

  • A D compiler
    • DMD >=2.068.1
    • LDC >=0.17.1
    • GDC >=8.4.0
  • (Optional, recommended) DUB >=0.9.24

Using DUB

DUB often comes alongside a D compiler and is the recommended way to build the project. Otherwise it can be installed manually.

A compiler can be chosen with the --compiler= option. Available options are DMD, GDC, and LDC (via ldc2).

NOTE: BetterC mode is used for builds when available. Except for docs and unittests.

Usage: dub COMMAND [-b|--build BUILDTYPE] [-c|--config CONFIG] [--compiler=COMPILER]

You can look in dub.sdl for available build types and configurations.

In summary:

  • Make a debug build of Alicedbg: dub build
  • Make a release build of Alicedump using LDC: dub build -b release -c dumper --compiler=ldc2
  • Compile example: dub build -c simple
  • Run tests (library only): dub test
  • Build docs: dub build -b docs
  • Make static library: dub build -b library
  • Make shared library: dub build -b shared

Notes

Profile builds (-b profile)

The profile builds are GC-dependant and thus not supported.

Introduction

Usage

Development

Clone this wiki locally