rdmd problem
Jonathan Marler
johnnymarler at gmail.com
Mon Apr 1 17:37:25 UTC 2019
On Monday, 1 April 2019 at 11:10:06 UTC, Comrad wrote:
> I have a strange problem with rdmd:
>> cat test.d
> #!/usr/bin/env rdmd -version=test
> import std.stdio;
> void main()
> {
> writeln("Hello, world with automated script running!");
> }
>
> --------------------
> This hangs, but if I remove compile options it does work.
> Overall it doesn't work with any compiler options.
>
>> dmd --version
> DMD64 D Compiler v2.085.0
> Copyright (C) 1999-2019 by The D Language Foundation, All
> Rights Reserved written by Walter Bright
>
>> lsb_release -a
> No LSB modules are available.
> Distributor ID: Ubuntu
> Description: Ubuntu 14.04.5 LTS
> Release: 14.04
> Codename: trusty
>
>> gcc --version
> gcc (Ubuntu 4.9.4-2ubuntu1~14.04.1) 4.9.4
> Copyright (C) 2015 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.
> There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A
> PARTICULAR PURPOSE.
When I rewrote rdmd I read that some OS's don't support more than
one argument on the shebang line, so I added support for "Source
Compiler Directives".
#!/usr/bin/env rund
//!version test
import std.stdio;
void main()
{
writeln("Hello, world with automated script running!");
}
If you use rdmd quite a bit, you might want to consider switching
to rund:
https://github.com/dragon-lang/rund
It runs about twice as fast because it only needs to run the
compiler once instead of twice like rdmd does. I also fixed a
fair number of bugs with rdmd when I rewrote it. And if you find
any issues with it, please let me know and I'll quickly make sure
to get them fixed.
More information about the Digitalmars-d
mailing list