compiler package cabal file assumes built artifact's path
izgzhen opened this issue · 5 comments
As in https://github.com/ghc/ghc/blob/master/compiler/ghc.cabal.in#L81
When install
the compiler
package, ghc-cabal copy
will try to find the included header files (ghc_boot_platform.h
in this case) from directories generated from the above configuration. But in Hadrian, this header file is put in _build/stageN/compiler
.
So far I was fixing such issues by postprocessing generated files, such as ghc.cabal
, by fixFile
and simple string replacement.
Here is an example: https://github.com/snowleopard/hadrian/blob/master/src/Rules/Data.hs#L38-L51
It's a hack, but I don't see a better way without touching GHC sources.
hmm .. my hack is to copy the .h
file to the required place.
hmm .. my hack is to copy the
.h
file to the required place.
Yes, I see. Choose whichever works best for now, but make sure the code explains the hack and calls for a fix in future.
also this could be closed now?
Indeed!