Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Two patches for better C support #1080
This was referenced
Oct 23, 2012
If I've understood correctly (and I've not done a detailed review yet) then I'm not worried about the build time. Doing a separate invocation of ghc to link is cheap, it's not having to load .hi files or anything like that for the link step. Indeed we'll eventually switch to a separate link anyway when we move to doing individual ghc invocations for parallel builds and the like.
So I don't think we should add extra complexity of two different code paths or anything like that.
If you're worried you can time it. I'll be quite surprised if the difference is non-trivial.
Ok, patches modified somewhat and committed as de88f40 02f8eef (with credit given in the commit messages -- BTW, what do people normally do to preserve patch authorship & credit, but when the patches have to be changed and we don't want to have a messy patch history?)
The main difference is that we now always do three steps: compile hs, compile C and link everything. This is simpler and avoids the slightly hacky "pre build" stuff.
The Linux kernel project uses the following procedure (described in more detail here):