id = "dmd"
name = "DMD"
homepage = "https://dlang.org/"
description = "DMD is the reference compiler for the D programming language."
executables = ["dmd"]
platforms = ["macos", "linux"]
[dotfiles]
paths = ["~/dmd.conf"]
exclude = []
secret = []
[commands]
format = 1
label = "Compile D code"
description = "Compile D sources with the DMD reference compiler. Import paths, version identifiers, -run, -check and -preview switches are left out."
quality = "ai-draft"
parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false }
[[commands.source]]
id = "man"
kind = "manual"
url = "https://github.com/dlang/dmd/blob/master/compiler/src/dmd/cli.d"
evidence = """
-betterC omit generating some runtime information and helper functions
-c compile only, do not link
-debug compile in debug code
-g add symbolic debug info
-inline do function inlining
-lib generate library rather than object files
-main add default main() if not present already (e.g. for unittesting)
-O optimize
-of=<filename> name output file to <filename>
-release contracts and asserts are not emitted, and bounds checking is performed only in @safe functions
-shared generate shared library (DLL)
-unittest compile in unit tests
-w warnings as errors (compilation will halt)
-wi warnings as messages (compilation will continue)
"""
[[commands.field]]
id = "sources"
label = "Source files"
type = "path"
position = 0
path = { kind = "file", role = "input" }
multiple = true
sources = ["man"]
[[commands.field]]
id = "output"
label = "Output file name"
description = "Written as -of<name>."
type = "path"
option = ["-of"]
path = { kind = "file", role = "output" }
sources = ["man"]
[[commands.field]]
id = "compile_only"
label = "Compile only (no link)"
type = "boolean"
option = ["-c"]
sources = ["man"]
[[commands.field]]
id = "optimize"
label = "Optimize"
type = "boolean"
option = ["-O"]
sources = ["man"]
[[commands.field]]
id = "release"
label = "Release build"
description = "No asserts or contract checks."
type = "boolean"
option = ["-release"]
sources = ["man"]
[[commands.field]]
id = "inline"
label = "Inline functions"
type = "boolean"
option = ["-inline"]
sources = ["man"]
[[commands.field]]
id = "debug_info"
label = "Symbolic debug info"
type = "boolean"
option = ["-g"]
sources = ["man"]
[[commands.field]]
id = "debug_code"
label = "Compile debug code"
type = "boolean"
option = ["-debug"]
sources = ["man"]
[[commands.field]]
id = "unittest"
label = "Compile unit tests"
type = "boolean"
option = ["-unittest"]
sources = ["man"]
[[commands.field]]
id = "main"
label = "Add default main()"
type = "boolean"
option = ["-main"]
sources = ["man"]
[[commands.field]]
id = "warn_err"
label = "Warnings as errors"
type = "boolean"
option = ["-w"]
sources = ["man"]
[[commands.field]]
id = "warn_info"
label = "Warnings as messages"
type = "boolean"
option = ["-wi"]
sources = ["man"]
[[commands.field]]
id = "lib"
label = "Build a library"
type = "boolean"
option = ["-lib"]
sources = ["man"]
[[commands.field]]
id = "shared"
label = "Build a shared library"
type = "boolean"
option = ["-shared"]
sources = ["man"]
[[commands.field]]
id = "better_c"
label = "BetterC mode"
type = "boolean"
option = ["-betterC"]
sources = ["man"]
[[commands.task]]
id = "debug"
label = "Debug build"
fields = ["sources", "output", "debug_info"]
required = ["sources"]
[[commands.task]]
id = "release"
label = "Optimized release build"
fields = ["sources", "output", "optimize", "release", "inline"]
required = ["sources"]
set = { optimize = [true], release = [true], inline = [true] }
[[commands.task]]
id = "test"
label = "Run unit tests"
fields = ["sources", "unittest", "main"]
required = ["sources"]
set = { unittest = [true], main = [true] }
[[commands.group]]
id = "basic"
label = "Basic"
fields = ["sources", "output", "optimize", "release", "debug_info", "unittest", "main"]
[[commands.group]]
id = "advanced"
label = "Advanced"
fields = ["debug_code", "warn_err", "warn_info", "lib", "shared", "better_c", "inline", "compile_only"]