Introduce a $tooldir variable for nicer toolchain detection on Windows
authorAlp Mestanogullari <alp@well-typed.com>
Tue, 17 Apr 2018 22:04:11 +0000 (23:04 +0100)
committerTamar Christina <tamar@zhox.com>
Tue, 17 Apr 2018 22:08:30 +0000 (23:08 +0100)
commit5d76846405240c051b00cddcda9d8d02c880968e
treee63b4fdae0d8e236a3a6e291bf164b38d80f2b5c
parentcab3e6bfa8486c6c8eecac269c54d662f1371a0c
Introduce a $tooldir variable for nicer toolchain detection on Windows

Summary:
This patch affects several files that affect how we detect mingw and perl
on Windows. The initial motivation is:

    https://github.com/snowleopard/hadrian/issues/564

where, with Hadrian building relocatable (non-inplace) GHCs, the current
detection mechanism falls short by e.g only trying $topdir/../mingw. But
in Hadrian, for reasons given in that issue, we would need to store e.g mingw
under $topdir/../../mingw except for binary distributions, where we want
to follow the existing structure, in which case $topdir/../mingw is correct. So
we need to support both, which is what this patch hopefully implements.

Test Plan: ./validate

Reviewers: Phyx, hvr, bgamari, erikd

Reviewed By: Phyx

Subscribers: snowleopard, thomie, carter

Differential Revision: https://phabricator.haskell.org/D4598
aclocal.m4
compiler/main/SysTools.hs
compiler/main/SysTools/BaseDir.hs