diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c4c871caebcf..db15a7593519 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -101,6 +101,8 @@ jobs: ci/run.sh setup_repos "$REPO_BRANCH" - name: Build run: ci/run.sh build + - name: Build with dub + run: dub run dmd:compiler -- --version - name: Rebuild dmd (with enabled coverage) if: matrix.coverage run: ENABLE_RELEASE=0 ENABLE_DEBUG=1 ENABLE_COVERAGE=1 ${{ runner.os == 'macOS' && 'OS_NAME=osx' || '' }} ci/run.sh rebuild diff --git a/README.md b/README.md index 79504fceec5b..ca30e219611f 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,13 @@ Refer to their respective `README.md` for more in-depth information. | [compiler/samples](compiler/samples) | Various code examples | | [druntime](druntime) | root of all runtime related code | -For more general information regarding compiling, installing, and +With a D compiler and dub installed, dmd can be built with: + +``` +dub build dmd:compiler +``` + +For more information regarding compiling, installing, and hacking on DMD, check the [contribution guide](CONTRIBUTING.md) and visit the [D Wiki](https://wiki.dlang.org/DMD). diff --git a/dub.sdl b/dub.sdl index 2d77d9bf5190..dd6bdddb7178 100644 --- a/dub.sdl +++ b/dub.sdl @@ -7,6 +7,17 @@ license "BSL-1.0" targetType "none" dependency ":frontend" version="*" +subPackage { + name "compiler" + targetType "executable" + targetName "dmd" + sourcePaths "compiler/src/dmd" + importPaths "compiler/src" + stringImportPaths "compiler/src/dmd/res" "." + dflags "-L/STACK:16777216" platform="windows" + preGenerateCommands "echo -n /etc > SYSCONFDIR.imp" platform="posix" +} + subPackage { name "root" targetType "library"