Skip to content

Commit 02d85de

Browse files
committed
Pass absolute HOST_DMD path
1 parent 727a80d commit 02d85de

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

ci/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ test_dmd() {
128128
fi
129129

130130
$build_path/dmd -g -i -Icompiler/test -release compiler/test/run.d -ofgenerated/run
131-
generated/run -j$N --environment MODEL=$MODEL HOST_DMD=$build_path/dmd "${args[@]}"
131+
generated/run -j$N --environment MODEL=$MODEL HOST_DMD="$PWD/$build_path/dmd" "${args[@]}"
132132
}
133133

134134
# build and run druntime unit tests

compiler/test/run.d

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ Options:
128128
}
129129

130130
// allow overwrites from the environment
131+
// HOST_DMD must be either a command on PATH (e.g. `dmd`, `ldmd2`) or an
132+
// absolute path; it is used to build test-harness code (dshell scripts,
133+
// tools) which runs from various working directories.
131134
hostDMD = environment.get("HOST_DMD", "dmd");
132135
unitTestRunnerCommand = resultsDir.buildPath("unit_test_runner").exeName;
133136

@@ -585,7 +588,7 @@ string[string] getEnvironment()
585588
env["SEP"] = `\`;
586589
env["DFLAGS"] = `-I"%s\import" -defaultlib=druntime -debuglib=druntime`.format(druntimePath);
587590
env["LIB"] = druntimeLibDir ~ ";" ~ environment.get("LIB");
588-
env["PHOBOS_DFLAGS"] = `-I"%s\import" -I"%s"`.format(druntimePath, phobosPath);
591+
env["PHOBOS_DFLAGS"] = `-I"%s\import" -I"%s" -L/LIBPATH:"%s"`.format(druntimePath, phobosPath, phobosPath);
589592
}
590593
else
591594
{

0 commit comments

Comments
 (0)