{
  "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
    },
    "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\n-c    compile only, do not link\n-debug    compile in debug code\n-g    add symbolic debug info\n-inline    do function inlining\n-lib    generate library rather than object files\n-main    add default main() if not present already (e.g. for unittesting)\n-O    optimize\n-of=<filename>    name output file to <filename>\n-release    contracts and asserts are not emitted, and bounds checking is performed only in @safe functions\n-shared    generate shared library (DLL)\n-unittest    compile in unit tests\n-w    warnings as errors (compilation will halt)\n-wi    warnings as messages (compilation will continue)\n"
      }
    ],
    "field": [
      {
        "id": "sources",
        "label": "Source files",
        "type": "path",
        "position": 0,
        "path": {
          "kind": "file",
          "role": "input"
        },
        "multiple": true,
        "sources": [
          "man"
        ]
      },
      {
        "id": "output",
        "label": "Output file name",
        "description": "Written as -of<name>.",
        "type": "path",
        "option": [
          "-of"
        ],
        "path": {
          "kind": "file",
          "role": "output"
        },
        "sources": [
          "man"
        ]
      },
      {
        "id": "compile_only",
        "label": "Compile only (no link)",
        "type": "boolean",
        "option": [
          "-c"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "optimize",
        "label": "Optimize",
        "type": "boolean",
        "option": [
          "-O"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "release",
        "label": "Release build",
        "description": "No asserts or contract checks.",
        "type": "boolean",
        "option": [
          "-release"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "inline",
        "label": "Inline functions",
        "type": "boolean",
        "option": [
          "-inline"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "debug_info",
        "label": "Symbolic debug info",
        "type": "boolean",
        "option": [
          "-g"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "debug_code",
        "label": "Compile debug code",
        "type": "boolean",
        "option": [
          "-debug"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "unittest",
        "label": "Compile unit tests",
        "type": "boolean",
        "option": [
          "-unittest"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "main",
        "label": "Add default main()",
        "type": "boolean",
        "option": [
          "-main"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "warn_err",
        "label": "Warnings as errors",
        "type": "boolean",
        "option": [
          "-w"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "warn_info",
        "label": "Warnings as messages",
        "type": "boolean",
        "option": [
          "-wi"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "lib",
        "label": "Build a library",
        "type": "boolean",
        "option": [
          "-lib"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "shared",
        "label": "Build a shared library",
        "type": "boolean",
        "option": [
          "-shared"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "better_c",
        "label": "BetterC mode",
        "type": "boolean",
        "option": [
          "-betterC"
        ],
        "sources": [
          "man"
        ]
      }
    ],
    "task": [
      {
        "id": "debug",
        "label": "Debug build",
        "fields": [
          "sources",
          "output",
          "debug_info"
        ],
        "required": [
          "sources"
        ]
      },
      {
        "id": "release",
        "label": "Optimized release build",
        "fields": [
          "sources",
          "output",
          "optimize",
          "release",
          "inline"
        ],
        "required": [
          "sources"
        ],
        "set": {
          "optimize": [
            true
          ],
          "release": [
            true
          ],
          "inline": [
            true
          ]
        }
      },
      {
        "id": "test",
        "label": "Run unit tests",
        "fields": [
          "sources",
          "unittest",
          "main"
        ],
        "required": [
          "sources"
        ],
        "set": {
          "unittest": [
            true
          ],
          "main": [
            true
          ]
        }
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "sources",
          "output",
          "optimize",
          "release",
          "debug_info",
          "unittest",
          "main"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "debug_code",
          "warn_err",
          "warn_info",
          "lib",
          "shared",
          "better_c",
          "inline",
          "compile_only"
        ]
      }
    ]
  }
}
