Skip to content

Move `/includes` to `/rts/include`, sort per package better

John Ericson requested to merge wip/organize-headers into master

In order to make the packages in this repo "reinstallable", we need to associate source code with a specific packages. Having a top level /includes dir that mixes concerns (which packages' includes?) gets in the way of this.

To start, I have moved everything to rts/, which is mostly correct. There are a few things however that really don't belong in the rts (like the generated constants haskell type, CodeGen.Platform.hs). Those needed to be manually adjusted.

Things of note:

  • Blanket -Iincludes is gone in both build systems, include paths now more strictly respect per-package dependencies.

  • PosixSource.h is used outside of the rts so it is now rts/PosixSource.h and exposed.

  • deriveConstants has been taught to not require a --target-os flag when generating the platform-agnostic Haskell type. Make takes advantage of this, but Hadrian has yet to.

CC @hsyl20 @wz1000 @mpickering

Merge request reports