
On 18 July 2005 16:03, Dinko Tenev wrote:
On 7/18/05, Simon Marlow
wrote: Two reasons: one, -O implies -fvia-C and two, -keep-hc-files also implies -fvia-C (because otherwise you don't get any .hc files). You'll need to modify the definition of GhcLibHcOpts in build.mk to put -fasm after -O, and also to remove -keep-hc-files.
I'll try this tonight, thanks.
BTW, am I the only one to find it alarming that GHC would allow conflicting options to override one another without any warning? :)
The GHC command-line isn't declarative, it's imperative. Options are processed left-to-right. That's the general rule, anyway. It would be an interesting exercise to specify the GHC command-line semantics, or better still, redesign it :) Cheers, Simon

On 7/18/05, Simon Marlow
The GHC command-line isn't declarative, it's imperative. Options are processed left-to-right.
I don't have any doubts about whether GHC can make sense of conflicting options or not, be it the one way or the other. What's causing the trouble is that part of the intent specified on the command line is not carried-out by the compiler, and the only way to diagnose (or even be aware of) such occurrences seems to be searching through the manual, perhaps without even knowing what one is looking for.
That's the general rule, anyway. It would be an interesting exercise to specify the GHC command-line semantics, or better still, redesign it :)
I for one would find it quite helpful to see a warning line for each overriden option, if without so much of an explanation -- a "red light" to let me know something might be wrong. Cheers, Dinko
participants (2)
-
Dinko Tenev
-
Simon Marlow