D.gnu - Support of -run and source code from stdin
- Andre Pany (12/12) May 27 2020 Hi,
- Iain Buclaw (11/21) May 27 2020 I see no obvious use for having something like -run in the
- Andre Pany (8/33) May 28 2020 Thanks for the info.
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 wheter it supports reading source code from stdin? 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 Kind regards Andre
May 27 2020
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 knowI 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.orgLooks like the description of the problem matches what this PR is fixing. https://github.com/dlang/dub/pull/1941 Iain
May 27 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: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é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 knowI 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.orgLooks like the description of the problem matches what this PR is fixing. https://github.com/dlang/dub/pull/1941 Iain
May 28 2020