Skip to content

Draft: Hadrian: Allow usage on platforms with getExecutablePath support

Ben Gamari requested to merge wip/T18173 into master

Currently Hadrian assumes that GHC can be invoked in inferred-base-directory mode (e.g. without passing an explicit -B). However, inference of the base directory (as implemented by GHC.SysTools.BaseDir.findTopDir) requires that we support the getExecutablePath operation. Unfortunately, this operation can not always be robustly implemented (e.g. OpenBSD does not provide any support for it).

Here we teach Hadrian to pass -B to all GHC invocations, eliminating the dependence on inferred-base-directory mode.

Edited by Ben Gamari

Merge request reports