Support of -run and source code from stdin
Andre Pany
andre at s-e-a-p.de
Thu May 28 12:36:57 UTC 2020
On Thursday, 28 May 2020 at 04:58:26 UTC, Iain Buclaw wrote:
> On Wednesday, 27 May 2020 at 21:40:38 UTC, Andre Pany wrote:
>> Hi,
>> Dmd and ldc supports running source code from stdin:
>>
>> ```
>> echo 'void main(){}' | dmd -run -
>> ```
>>
>> It seems GDC does not support argument -run and I do not know
>
> I see no obvious use for having something like -run in the
> driver. Toolchain apps are more than capable of doing this
> themselves.
>
>> wheter it supports reading source code from stdin?
>>
>
> gdc -x d -
>
> The -x tells gcc what language to parse, as the driver is
> capable of handling all languages gcc knows about, eg -xc++.
>
>> Could this 2 featured be added to gdc?
>> This would solve the probe file issue mentioned here
>> https://forum.dlang.org/post/uwxndbpxspwaofolksbr@forum.dlang.org
>>
>
> Looks like the description of the problem matches what this PR
> is fixing.
>
> https://github.com/dlang/dub/pull/1941
>
> Iain
Thanks for the info.
The issue is not about the compiled artifacts but about the probe
modules (source code).
In some cases, they are not deleted (There is a module destructor
in dub which should take care of).
Kind regards
André
More information about the D.gnu
mailing list