From: simonmar Date: Mon, 25 Apr 2005 13:02:31 +0000 (+0000) Subject: [project @ 2005-04-25 13:02:31 by simonmar] X-Git-Tag: Initial_conversion_from_CVS_complete~678 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=50b971bddbd1756d307851d1c9abed306669c6ae;p=ghc-hetmet.git [project @ 2005-04-25 13:02:31 by simonmar] Requested by Duncan Coutts: -optc flags get passed to the assembler phase too. It's not obvious, when using GHC to compile a .c file, that options need to be passed both with -optc and -opta - gcc doesn't need this, for example. This is an experimental change - if it breaks anything we can back it out. If anyone needs to pass flags to the .c->.s phase *only*, then we will need to add another flag for that purpose. It seems unlikely, though (there aren't many flags that affect the assembler only, and those that do don't conflict with flags for the C phase). --- diff --git a/ghc/compiler/main/DynFlags.hs b/ghc/compiler/main/DynFlags.hs index 09932b6..518a8e9 100644 --- a/ghc/compiler/main/DynFlags.hs +++ b/ghc/compiler/main/DynFlags.hs @@ -766,7 +766,7 @@ dynamic_flags = [ , ( "optL" , HasArg (upd . addOptL) ) , ( "optP" , HasArg (upd . addOptP) ) , ( "optF" , HasArg (upd . addOptF) ) - , ( "optc" , HasArg (upd . addOptc) ) + , ( "optc" , HasArg (\f -> upd (addOptc f . addOpta f)) ) , ( "optm" , HasArg (upd . addOptm) ) , ( "opta" , HasArg (upd . addOpta) ) , ( "optl" , HasArg (upd . addOptl) )