dmd.cli

Defines the help texts for the CLI options offered by DMD.

Discussion

This file is not shared with other compilers which use the DMD front-end. However, this file will be used to generate the online documentation and MAN pages.

Authors

Walter Bright

Source: cli.d

  • Declaration

    enum TargetOS: ubyte;

    Bit decoding of the TargetOS

  • Declaration

    @safe bool isCurrentTargetOS(TargetOS os);

    Checks whether os is the current . For TargetOS.all it will always return true.

    Parameters

    TargetOS os

    to check

    Return Value

    true iff os contains the current targetOS.

  • Declaration

    static string capitalize(string w);

    Capitalize a the first character of a ASCII string.

    Parameters

    string w

    ASCII i string to capitalize

    Return Value

    capitalized string

  • Declaration

    struct Usage;

    Contains all available CLI s.

    See Also

    • Declaration

      struct Option;

      Representation of a CLI Option

      Discussion

      The DDoc description ddoxText is only available when compiled with -version=DdocOptions.

      • Declaration

        string flag;

        The CLI flag without leading -, e.g. color

      • Declaration

        string helpText;

        A detailed description of the flag

      • os

        Declaration

        TargetOS os;

        For which TargetOS the flags are applicable

      • Declaration

        @safe this(string flag, string helpText, TargetOS os = TargetOS.all, bool documented = true);
        @safe this(string flag, string helpText, string ddocText, TargetOS os = TargetOS.all, bool documented = true);

        Parameters

        string flag

        CLI flag without leading -, e.g. color

        string helpText

        detailed description of the flag

        TargetOS os

        for which TargetOS the flags are applicable

        string ddocText

        detailed description of the flag (in Ddoc)

        bool documented

        whether this option should be shown in the documentation

    • Declaration

      static immutable Option[] options;

      Returns all available CLI options

    • Declaration

      struct Feature;

      Representation of a CLI feature

      • Declaration

        string name;

        name of the feature

      • Declaration

        bool deprecated_;

        whether the feature is still in use

    • Declaration

      static immutable Feature[] transitions;

      Returns all available transitions

    • Declaration

      static immutable Feature[] reverts;

      Returns all available reverts

    • Declaration

      static immutable Feature[] previews;

      Returns all available previews

  • Declaration

    struct CLIUsage;

    Formats the Options for CLI printing.

    • Declaration

      static @safe string usage();

      Returns a string of all available CLI options for the current targetOS. Options are separated by newlines.

    • Declaration

      enum string mcpuUsage;

      CPU architectures supported -mcpu=id

    • Declaration

      enum string transitionUsage;

      Language changes listed by -transition=id

    • Declaration

      enum string revertUsage;

      Language changes listed by -revert

    • Declaration

      enum string previewUsage;

      Language previews listed by -preview

    • Declaration

      enum string checkActionUsage;

      Options supported by -checkaction=

    • Declaration

      enum string checkUsage;

      Options supported by -check

    • Declaration

      enum string externStdUsage;

      Options supported by -extern-std

    • Declaration

      enum string hcUsage;

      Options supported by -HC

    • Declaration

      enum string gdwarfUsage;

      Options supported by -gdwarf