Find out druntime/import and phobos folder on Linux

Andre Pany andre at s-e-a-p.de
Sun Jul 15 09:23:31 UTC 2018


On Sunday, 15 July 2018 at 09:17:31 UTC, Seb wrote:
> On Saturday, 14 July 2018 at 17:19:20 UTC, Andre Pany wrote:
>> [...]
>
> DMD: 
> https://github.com/dlang/dmd/blob/master/src/dmd/dinifile.d#L40
> LDC: https://wiki.dlang.org/Using_LDC, 
> https://github.com/dlang/dmd/blob/master/src/dmd/frontend.d#L97
>
> Once you have the config file, simply parse the config files: 
> https://github.com/dlang/dmd/blob/master/src/dmd/frontend.d#L156
>
> Anyhow as DMD is on DUB, there's no need for copy/pasting:
>
> ---
> #!/usr/bin/env dub
> /+dub.sdl:
> dependency "dmd" version="~master"
> +/
> void main()
> {
>     import dmd.frontend;
>     import std.stdio;
>     findImportPaths().writeln; // will determine the currently 
> active "dmd" compiler (can be LDC too)
> }
> ---
>
> DMD's order is a bit annoying, see: 
> https://github.com/dlang/dmd/pull/7915

Thank you all for the answers. That was exactly the answers I 
searched for.
The IntelliJ D plugin is written in java/Kotlin so I cannot use 
dmd here but simple rewrite the logic in java.

Kind regards
Andre


More information about the Digitalmars-d-learn mailing list