Any plans for GDC to get DMD's -i option?

kdevel kdevel at vogtner.de
Wed Jul 27 20:26:00 UTC 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.
```


More information about the D.gnu mailing list