For posix targets make a symlink to the latest generated dmd (./generated/...) in the top level dir. (#14693)

The idea is to have faster iteration times.

A "dmd" entry has been added to the .gitignore
This commit is contained in:
Max Haughton 2022-12-15 08:45:59 +00:00 committed by GitHub
parent 020685c85b
commit afed3381b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

3
.gitignore vendored
View file

@ -53,3 +53,6 @@ dmd.iml
# Deliberately ignored files
untracked_files/
# Just in case
dmd

View file

@ -459,7 +459,19 @@ alias directoryRule = makeRuleWithArgs!((MethodInitializer!BuildRule builder, Bu
.msg("mkdirRecurse '%s'".format(dir))
.commandFunction(() => mkdirRecurse(dir))
);
alias dmdSymlink = makeRule!((builder, rule) => builder
.commandFunction((){
import std.process;
version(Windows)
{
}
else
{
spawnProcess(["ln", "-sf", env["DMD_PATH"], "./dmd"]);
}
})
);
/**
BuildRule for the DMD executable.