Thread overview
Any plans for GDC to get DMD's -i option?
Jul 24, 2022
TTK Ciar
Jul 27, 2022
kdevel
Jul 28, 2022
Iain Buclaw
July 24, 2022

Hello GDC folks,

I am using GDC 12.1.0 and not finding any equivalent to DMD's "-i" option, which causes DMD to automatically find and compile imported modules. (There's "-I" but that does something rather different.)

I've looked in "gdc --help=d" and "man gdc" to no avail, and looked through the latest gdmd (from https://github.com/D-Programming-GDC/GDMD) but it does not appear to support -i.

Does anyone know if this functionality will be available in the next version of GDC? If it's going to materialize in the next year or so I can tough it out, but if it's not I'm inclined to write a wrapper.

July 27, 2022

On Sunday, 24 July 2022 at 00:07:06 UTC, TTK Ciar wrote:

>

[...]

>

I am using GDC 12.1.0 and not finding any equivalent to DMD's "-i" option, which causes DMD to automatically find and compile imported modules. (There's "-I" but that does something rather different.)

>

[...]

Ran into the same problem when trying to write a separate Makefile for compiling with GDC. Maybe one of the -M family switches can be used to emulate the -i behavior:

`-M'
     Output the module dependencies of all source files being compiled
     in a format suitable for `make'.  The compiler outputs one `make'
     rule containing the object file name for that source file, a
     colon, and the names of all imported files.

`-MM'
     Like `-M' but does not mention imported modules from the D standard
     library package directories.

`-MF FILE'
     When used with `-M' or `-MM', specifies a FILE to write the
     dependencies to.  When used with the driver options `-MD' or
     `-MMD', `-MF' overrides the default dependency output file.
July 28, 2022

On Sunday, 24 July 2022 at 00:07:06 UTC, TTK Ciar wrote:

>

Hello GDC folks,

I am using GDC 12.1.0 and not finding any equivalent to DMD's "-i" option, which causes DMD to automatically find and compile imported modules. (There's "-I" but that does something rather different.)

I've looked in "gdc --help=d" and "man gdc" to no avail, and looked through the latest gdmd (from https://github.com/D-Programming-GDC/GDMD) but it does not appear to support -i.

Does anyone know if this functionality will be available in the next version of GDC? If it's going to materialize in the next year or so I can tough it out, but if it's not I'm inclined to write a wrapper.

It would be best to raise an issue so can keep track of feature requests.

https://gcc.gnu.org/bugzilla/enter_bug.cgi?product=gcc&component=d&version=13.0

Supporting -i on its own might be fine (needs a better name though), the pattern matching variant less so. IMO dub should more than capable of doing this instead.