cross-compilation mode for hsc2hs
brian.bloniarz at gmail.com
Sun Dec 19 05:57:21 CET 2010
On 12/17/2010 10:26 AM, Ian Lynagh wrote:
> Sorry for the slow reply.
No problem, thanks for paying attention.
> On Fri, Nov 12, 2010 at 08:50:39PM -0800, Brian Bloniarz wrote:
>> I developed the following patch which adds hsc2hs --cross-compile.
>> This special mode generates the .hs by extracting information from
>> compilations only
> Couldn't we always do this, rather than having to maintain 2 separate
> code paths?
It's slow, that's the only reason I can think of. A single .hsc
file is going to invoke the c compiler multiple times for each
directive. IIRC running hsc2hs on every .hsc in the GHC tree,
it was around 10x slower.
> Also, it would be good to have a flag that makes hsc2hs fail when using
> non-cross-compilation features even when we aren't cross-compiling. That
> way we can stop them accidentally creeping into the GHC build.
Great idea, I can add this feature on monday.
More information about the Cvs-ghc