[GHC] #16055: libffi build logic is quite spread out
GHC
ghc-devs at haskell.org
Sun Dec 16 20:22:42 UTC 2018
#16055: libffi build logic is quite spread out
-------------------------------------+-------------------------------------
Reporter: mpickering | Owner: (none)
Type: task | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.6.3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by snowleopard):
> The problem here is that the two modules are completely unrelated to
each other.
Note that the situation is the same across all build rules, not just
`libffi`: the build rule and the command line flags of the corresponding
builder(s) are specified in different modules.
> 1. Modify the Make builder to take an additional argument which
indicates whether to add the install flag.
This may be consistent with so-called builder modes, e.g. see `GhcMode`,
`ArMode`, etc. We could have `MakeMode`, one possible choice could be:
{{{
data MakeMode = Default | BuildGMP | InstallLibFFI
}}}
Not only this allows us to get red of stringly-typed builder `Make
FilePath`, but also it makes it clearer that some invocations of Make pass
the `install` flag.
This seems to be more consistent with how things are currently done,
although we could of course have exceptions if they make code clearer.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16055#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list