Fix issue 17392 - Add Dub file for the lexer and parser

The Dub file is intended to make the the compiler available as a
library through Dub.
This commit is contained in:
Jacob Carlborg 2017-05-08 21:54:22 +02:00
parent 832186a773
commit b5e6ed443d
5 changed files with 113 additions and 0 deletions

50
dub.sdl Normal file
View file

@ -0,0 +1,50 @@
name "dmd"
description "The DMD compiler"
authors "Walter Bright"
copyright "Copyright © 1999-2017, Digital Mars"
license "BSL-1.0"
targetType "none"
dependency ":parser" version="*"
subPackage {
name "root"
targetType "library"
sourcePaths "src/ddmd/root"
}
subPackage {
name "lexer"
targetType "library"
sourcePaths
sourceFiles \
"src/ddmd/console.d" \
"src/ddmd/entity.d" \
"src/ddmd/errors.d" \
"src/ddmd/globals.d" \
"src/ddmd/id.d" \
"src/ddmd/identifier.d" \
"src/ddmd/lexer.d" \
"src/ddmd/tokens.d" \
"src/ddmd/utf.d"
// stringImportPaths cannot be used because it will make Dub extremely slow
// https://github.com/dlang/dub/issues/1199
dflags "-J$PACKAGE_DIR"
dependency "dmd:root" version="*"
}
subPackage {
name "parser"
targetType "library"
sourcePaths
sourceFiles \
"src/ddmd/astbase.d" \
"src/ddmd/astbasevisitor.d" \
"src/ddmd/parse.d"
dependency "dmd:lexer" version="*"
}