snowleopard / hadrian

Hadrian: a new build system for the Glasgow Haskell Compiler. Now merged into the GHC tree!
https://gitlab.haskell.org/ghc/ghc/tree/master/hadrian
MIT License
208 stars 39 forks source link

Consider moving ghc_boot_platform.h #516

Closed ndmitchell closed 6 years ago

ndmitchell commented 6 years ago

I see a ghc_boot_platform.h in _build/stage0/compiler, and another in _build/stage0/compiler. I wonder if this should really live in _build/generated (where other generated headers go), which might let you simplify the header directory story?

Just a thought, please close if it doesn't seem useful.

snowleopard commented 6 years ago

Yes, we could keep all generated headers in generated, but there are two issues here:

ndmitchell commented 6 years ago

Is ghc_boot_platform.h really different per stage? Looking at it, it seemed invariant on the stage.

snowleopard commented 6 years ago

Here is where these files are generated:

https://github.com/snowleopard/hadrian/blob/master/src/Rules/Generate.hs#L385-L438

Perhaps the difference occurs only when cross compiling.

bgamari commented 6 years ago

Indeed, these will only differ while cross-compiling.

ndmitchell commented 6 years ago

Ok, then my idea seems a bad one.