Skip to content

Handle absolute paths to build roots in Hadrian.

P.C. Shyamshankar requested to merge sykloid/ghc:wip/16187 into master

Fixes #16187 (closed).

This patch fixes various path concatenation issues to allow functioning builds with hadrian when the build root location is specified with an absolute path.

Remarks:

  • The path concatenation operator (-/-) now handles absolute second operands appropriately. Its behavior should match that of POSIX (</>) in this regard.

  • The getDirectoryFiles* family of functions only searches for matches under the directory tree rooted by its first argument; all of the results are also relative to this root. If the first argument is the empty string, the current working directory is used.

    This patch passes the appropriate directory (almost always either top or root), and subsequently attaches that directory prefix so that the paths refer to the appropriate files.

Edited by P.C. Shyamshankar

Merge request reports