Let's improve the dmd tester.

Seb seb at wilzba.ch
Fri Jun 26 10:11:16 UTC 2020


On Friday, 26 June 2020 at 01:04:50 UTC, Walter Bright wrote:
>
> One of my issues with this is:
>
> 1. how is the compiler version that is used to build test/run.d 
> determined?

That's entirely up to `rdmd`. It picks the compiler binary in 
your path, i.e. the host compiler you used to build dmd.

> 2. how is the compiler version that runs the test(s) determined?

There's _NO_ version determination. It uses the newly generated 
dmd binary that was freshly generated, i.e. it only looks into 
the `generated` folder.
Details: 
https://github.com/dlang/dmd/blob/master/test/tools/paths.d

> 3. how is the import path to druntime/phobos set for (1) and 
> (2) ?

As for all compilation in D: by DMD's configuration file (dmd.ini 
for Posix or sc.ini on Windows). build.d ensures that a proper 
config files get generated.

DMD's configuration lookup sequence is far from ideal, but I gave 
up on improving it (see e.g. [1]) as I gave up on DMD for 
anything substantial.

[1] https://github.com/dlang/dmd/pull/7915

> Please don't answer here, add a PR to fix run.d and the 
> corresponding README.md.

Well, then I better not answer.



More information about the Digitalmars-d mailing list