Thread overview
How to build DMD/Phobos on Windows
Aug 24, 2022
Dmitry Olshansky
Aug 24, 2022
rikki cattermole
Aug 25, 2022
bauss
Sep 01, 2022
Nick Treleaven
Aug 25, 2022
Dmitry Olshansky
Sep 01, 2022
Dukc
August 24, 2022

It's been a long time but I've found some spare hours I want to devote to finally updating our std.uni to Unicode 14 (soon to migrate to 15 I guess).

I downloaded source code of DMD/Phobos as usual and dropped them in the src folder of unpacked 7z distribution archive. Now time to build. Since DMD doesn't ship make anymore I guessed I needed a GNU make so I got that.

Doing make -f win32.mak shows an endless stream of make entering the folder and then leaving it.

make[45]: Entering directory 'C:/exp/dmd2/src/dmd'
cd compiler\src
make -f win32.mak
make[46]: Entering directory 'C:/exp/dmd2/src/dmd'
cd compiler\src
make -f win32.mak
make[47]: Entering directory 'C:/exp/dmd2/src/dmd'
cd compiler\src
make -f win32.mak
make[48]: Entering directory 'C:/exp/dmd2/src/dmd'
cd compiler\src
make -f win32.mak
make[49]: Entering directory 'C:/exp/dmd2/src/dmd'
cd compiler\src
make -f win32.mak
make[50]: Entering directory 'C:/exp/dmd2/src/dmd'
cd compiler\src
make -f win32.mak
make[51]: Entering directory 'C:/exp/dmd2/src/dmd'
cd compiler\src
make -f win32.mak

Trying to run any makefiles in compiler/druntime folders do not produce anything useful either.

So what is the canonical way to build D on Windows? Any pointers would be greately appreciated.

August 25, 2022
For dmd you use build.d that is in the repository.

For phobos win64.mak (used for 32bit by default as well):

"# Makefile to build D runtime library phobos{64,32mscoff}.lib for Windows MSVC"

So MSVC make.

Beyond that idk, but its starting point (oh and druntime is now in dmd repo, so ugh... yeah)
August 25, 2022
On Wednesday, 24 August 2022 at 21:11:42 UTC, rikki cattermole wrote:
> For dmd you use build.d that is in the repository.
>
> For phobos win64.mak (used for 32bit by default as well):
>
> "# Makefile to build D runtime library phobos{64,32mscoff}.lib for Windows MSVC"
>
> So MSVC make.
>
> Beyond that idk, but its starting point (oh and druntime is now in dmd repo, so ugh... yeah)

We really need a page in the documentation that describes how to build each component of D for each major platform.
August 25, 2022
On Wednesday, 24 August 2022 at 21:11:42 UTC, rikki cattermole wrote:
> For dmd you use build.d that is in the repository.
>

Hm, I guess the makefiles should be deleted?

> For phobos win64.mak (used for 32bit by default as well):
>
> "# Makefile to build D runtime library phobos{64,32mscoff}.lib for Windows MSVC"
>
> So MSVC make.

It’s a shame as I cannot install MSVC on this laptop (permissions).

>
> Beyond that idk, but its starting point (oh and druntime is now in dmd repo, so ugh... yeah)

Yeah, I see that build become more involved.

September 01, 2022

On Wednesday, 24 August 2022 at 18:06:29 UTC, Dmitry Olshansky wrote:

>

It's been a long time but I've found some spare hours I want to devote to finally updating our std.uni to Unicode 14 (soon to migrate to 15 I guess).

Thanks, much appreciated!

>

So what is the canonical way to build D on Windows? Any pointers would be greately appreciated.

Don't know since I don't use Windows anymore but if all else fails it probably works on WSL.

September 01, 2022
On Thursday, 25 August 2022 at 07:22:32 UTC, bauss wrote:
>
> We really need a page in the documentation that describes how to build each component of D for each major platform.

There is on the wiki, but it's out of date:
https://wiki.dlang.org/Building_under_Windows

build.d works for dmd, but I haven't been able to build druntime for a while, even before the repo was merged into dmd's. (What I do is just rename and move dmd to a folder with existing druntime installed, but that doesn't really work beyond simple uses as it gets out of sync as the implementation changes). Last time I tried digger, even that didn't work. This is a problem.