Commit 0c5a0584 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Make -fext-core a dynamic flag (it was a static flag)

parent 03589065
...@@ -26,7 +26,6 @@ import Outputable ...@@ -26,7 +26,6 @@ import Outputable
import Encoding import Encoding
import ForeignCall import ForeignCall
import DynFlags import DynFlags
import StaticFlags
import FastString import FastString
import IO import IO
...@@ -34,7 +33,7 @@ import Data.Char ...@@ -34,7 +33,7 @@ import Data.Char
emitExternalCore :: DynFlags -> CgGuts -> IO () emitExternalCore :: DynFlags -> CgGuts -> IO ()
emitExternalCore dflags cg_guts emitExternalCore dflags cg_guts
| opt_EmitExternalCore | dopt Opt_EmitExternalCore dflags
= (do handle <- openFile corename WriteMode = (do handle <- openFile corename WriteMode
hPutStrLn handle (show (mkExternalCore cg_guts)) hPutStrLn handle (show (mkExternalCore cg_guts))
hClose handle) hClose handle)
......
...@@ -309,6 +309,7 @@ data DynFlag ...@@ -309,6 +309,7 @@ data DynFlag
| Opt_PrintBindContents | Opt_PrintBindContents
| Opt_GenManifest | Opt_GenManifest
| Opt_EmbedManifest | Opt_EmbedManifest
| Opt_EmitExternalCore
-- temporary flags -- temporary flags
| Opt_RunCPS | Opt_RunCPS
...@@ -1740,6 +1741,7 @@ fFlags = [ ...@@ -1740,6 +1741,7 @@ fFlags = [
deprecatedForLanguage "IncoherentInstances" ), deprecatedForLanguage "IncoherentInstances" ),
( "gen-manifest", Opt_GenManifest, const Supported ), ( "gen-manifest", Opt_GenManifest, const Supported ),
( "embed-manifest", Opt_EmbedManifest, const Supported ), ( "embed-manifest", Opt_EmbedManifest, const Supported ),
( "ext-core", Opt_EmitExternalCore, const Supported ),
( "implicit-import-qualified", Opt_ImplicitImportQualified, const Supported ) ( "implicit-import-qualified", Opt_ImplicitImportQualified, const Supported )
] ]
......
...@@ -167,7 +167,6 @@ isStaticFlag f = ...@@ -167,7 +167,6 @@ isStaticFlag f =
"static", "static",
"fhardwire-lib-paths", "fhardwire-lib-paths",
"funregisterised", "funregisterised",
"fext-core",
"fcpr-off", "fcpr-off",
"ferror-spans", "ferror-spans",
"fPIC", "fPIC",
......
...@@ -68,7 +68,6 @@ module StaticFlags ( ...@@ -68,7 +68,6 @@ module StaticFlags (
opt_HistorySize, opt_HistorySize,
opt_OmitBlackHoling, opt_OmitBlackHoling,
opt_Unregisterised, opt_Unregisterised,
opt_EmitExternalCore,
v_Ld_inputs, v_Ld_inputs,
tablesNextToCode, tablesNextToCode,
opt_StubDeadValues, opt_StubDeadValues,
...@@ -281,9 +280,6 @@ tablesNextToCode :: Bool ...@@ -281,9 +280,6 @@ tablesNextToCode :: Bool
tablesNextToCode = not opt_Unregisterised tablesNextToCode = not opt_Unregisterised
&& cGhcEnableTablesNextToCode == "YES" && cGhcEnableTablesNextToCode == "YES"
opt_EmitExternalCore :: Bool
opt_EmitExternalCore = lookUp (fsLit "-fext-core")
-- Include full span info in error messages, instead of just the start position. -- Include full span info in error messages, instead of just the start position.
opt_ErrorSpans :: Bool opt_ErrorSpans :: Bool
opt_ErrorSpans = lookUp (fsLit "-ferror-spans") opt_ErrorSpans = lookUp (fsLit "-ferror-spans")
......
...@@ -2054,7 +2054,7 @@ ...@@ -2054,7 +2054,7 @@
<row> <row>
<entry><option>-fext-core</option></entry> <entry><option>-fext-core</option></entry>
<entry>Generate <filename>.hcr</filename> external Core files</entry> <entry>Generate <filename>.hcr</filename> external Core files</entry>
<entry>static</entry> <entry>dynamic</entry>
<entry>-</entry> <entry>-</entry>
</row> </row>
</tbody> </tbody>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment