Skip to content

Commit

Permalink
Temporary experiment to see why win32 is failing
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Marler authored and marler8997 committed Oct 16, 2019
1 parent 1ed9c3e commit 31a1417
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions src/build.d
Expand Up @@ -452,10 +452,20 @@ alias checkwhitespace = memoize!(function()
name = "checkwhitespace";
description = "Checks for trailing whitespace and tabs";
deps = [toolsRepo];
// TODO: do we need this? CC=env["HOST_CXX"]
command = [env["HOST_DMD_RUN"], "-run", env["TOOLS_DIR"].buildPath("checkwhitespace.d")]
.chain(.sources.dmd, .sources.root, .sources.lexer, .sources.backend, .sources.cheaders).array;
msg = command.join(" ");
commandFunction = ()
{
const cmdPrefix = [env["HOST_DMD_RUN"], "-run", env["TOOLS_DIR"].buildPath("checkwhitespace.d")];
const allSources = chain(.sources.dmd, .sources.root, .sources.lexer, .sources.backend, .sources.cheaders).array;
auto chunkLength = allSources.length;
version (Win32)
chunkLength = 80; // avoid command-line limit on win32
foreach (nextSources; allSources.chunks(chunkLength).parallel(1))
{
const nextCommand = cmdPrefix ~ nextSources;
writefln(nextCommand.join(" "));
run(nextCommand);
}
};
}
return new DependencyRef(dep);
});
Expand Down

0 comments on commit 31a1417

Please sign in to comment.