Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/tools/d_do_test.d
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ int tryMain(string[] args)
switch (envData.os)
{
case "win32": envData.ccompiler = "dmc"; break;
case "win64": envData.ccompiler = `\"Program Files (x86)"\"Microsoft Visual Studio 10.0"\VC\bin\amd64\cl.exe`; break;
case "win64": envData.ccompiler = environment.get("VCBIN_DIR") ~ `\cl.exe`; break;
Copy link
Contributor

@marler8997 marler8997 Apr 7, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this done as a patch instead of pushing directly to the repo?

Anyway, we might want the logic to be a bit more "forgiving" and helpful in "bad environment" cases. Maybe something like this:

auto vcbinDir = environment.get("VCBIN_DIR",
    `"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64"`);
if (!isDir(vcbinDir))
{
    writefln("Error: the Visual Studio C compiler bin directory does not exist (%s)", vcbinDir);
    return 1; // fail
}
envData.ccompiler = vcbinDir ~ `\cl.exe`;

NOTE: I added "C:" to the default vcbinDir path because windows only installs Visual Studio to the C drive and without this you break 64-bit testing if dmd is on another drive. I actually have dmd on another drive but I've never run into this problem since I've never gotten the dmd test suite to work on windows :)

default: envData.ccompiler = "c++"; break;
}
}
Expand Down
5 changes: 2 additions & 3 deletions win32.mak
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
MAKE=make

auto-tester-build:
cd src
$(MAKE) -f win32.mak auto-tester-build
make -f win32.mak auto-tester-build
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason for this change?

cd ..

auto-tester-test:
cd test
$(MAKE)
gmake -j$(PARALLELISM)
cd ..
cd samples
gmake -f win32.mak DMD=..\src\dmd.exe MODEL=$(MODEL) "LIB=..\..\phobos;$(LIB)" \
Expand Down