Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add building dmd with dub #15566

Merged
merged 2 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/build_with_dub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Build D compiler using dub

on:
- pull_request
- push

jobs:
test:
name: Build D compiler using dub
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

- name: Install Host D compiler
uses: dlang-community/setup-dlang@v1

- name: Invoke dub
run: dub run dmd:compiler -- --version
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down
11 changes: 11 additions & 0 deletions dub.sdl
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading