Windows devs - how are you building dmd, druntime, phobos?

Exil Exil at gmall.com
Thu Jul 25 14:11:34 UTC 2019


On Thursday, 25 July 2019 at 13:12:58 UTC, Atila Neves wrote:
> For dmd, neither win32.mak or win64.mak work for me at all. I'm 
> at a loss as to how they work for the autotester. Fortunately I 
> learned about build.d on github, and that works fine.
>
> But then I tried druntime and couldn't build that with the 
> Windows makefile. There's no build.d there though, at least not 
> with that name. The makefile seems to try creating directories 
> more than once and fails.
>
> Given all the above, how is that people on Windows manage to 
> work on the 3 core D repos? I'm trying to fix the situation 
> (mostly so I can get the dmd bash tests to run there), but 
> first I'd like to know if I'm doing something wrong.
>
> Bear in mind I've build all 3 repos repeatedly on Windows 
> before...

Yup, welcome to hell. Everything is basically hidden behind 
configuration files somewhere in autotester. It took a long time 
to figure out how to compile DMD with VS. If you don't want to do 
it, good luck trying to figure out how to do it without VS.

To build phobos/druntime you actually need to remove a "/" from 
the environment variable, why was this done? Because fuck you 
that's why, no one on the D team is competent enough with Windows 
to make it work with the default expected value.

     cd $ROOT/src/druntime
     make -f win64.mak clean
     make -f win64.mak VCDIR="${VCINSTALLDIR::-1}" 
DMD=../dmd/src/dmd druntime32mscoff

     cd $ROOT/src/phobos
     make -f win64.mak clean
     make -f win64.mak VCDIR="${VCINSTALLDIR::-1}" 
DMD=../dmd/src/dmd phobos32mscoff


I also use git bash to run a .sh script since testing DMD 
requires shell scripts. Need to do a workaround with 
vcvarsall.bat so that it loads all the appropriate environment 
variables.

$ROOT is just the root directory that's set in the editor I use.

DMD requires all the repositories be in the same folder. So dmd, 
druntime, and phobos need to be in one folder.

Good luck!

Oh one more thing. DMD/Phobos/DRuntime use Digital Mars' MAKE to 
build with. While the testing suite uses GNU MAKE. Guess what D 
puts in your root path called "make", yup their digital mars' 
MAKE instead of what people would expect to be GNU Make (and 
those that do already have a GNU Make in their path). Why? 
Because fuck you.





More information about the Digitalmars-d mailing list