Hadrian resolves executables names to absolute paths unnecessarily
Currently hadrian/src/Builder.hs
uses lookupInPath
to lookup the full path of any tools in system.cfg
on Windows (seemingly to ensure that the tool name has a .exe
extension). However, two things:
- It calls
lookupInPath
on all operating systems, despite only (possibly) using the result on Windows - A comment by @angerman rightly points out that this sort of resolution is unnecessary and undesireable: if the user provided a relative path then we should use a relative path, not underhandedly subvert their intention. If the tool name needs an extension then we should either make this so in the
configure
script or leave it to the user.