diff --git a/.gitignore b/.gitignore index d831291466..ff02656c62 100644 --- a/.gitignore +++ b/.gitignore @@ -53,3 +53,6 @@ dmd.iml # Deliberately ignored files untracked_files/ + +# Just in case +dmd diff --git a/compiler/src/build.d b/compiler/src/build.d index 44ed89020c..4ac9882a3d 100755 --- a/compiler/src/build.d +++ b/compiler/src/build.d @@ -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.