$tooldir variable in settings should not exist
After a call with @alt-romes we discussed why 5d768464 introduced support for the $tooldir
variable in a settings file.
It seems that this support for finding the tooldir (see findToolDir
which looks upwards two directories) was implemented as workaround for the fact that the bundled mingw toolchain exists in two diffent places during a build and in the bindist.
- During a build
mingw
exists at$topdir/../../mingw
because the bundled toolchain is placed in_build/mingw
rather than_build/stageN/mingw
, and topdir is_build/stageN/lib
. - In a bindist the
mingw
folder is in$topdir/../mingw
It seems that a better solution is to have a different settings file for build time and install time
- The settings file during a build points to
$topdir/../../mingw
- The settings file in the bindist points to
$topdir/../mingw
This situation mirrors the same situation as with linux builds where we have one settings file which is used during the build process and then a generate a different settings file at install time. The difference is that on windows we can generate this "install time" settings file at build time because it's the same for all installations.
cc @alt-romes