Commit 79939a54 authored by Ian Lynagh's avatar Ian Lynagh

Always define rtsOptsEnabled in the "extra object" when linking

Now that we always link in an extra object, we may as well always
define rtsOptsEnabled in it, rather than having a default value in
rts/hooks/RtsOptsEnabled.c.
parent 660568ca
......@@ -1442,16 +1442,11 @@ mkExtraObjToLinkIntoBinary dflags dep_packages = do
-- keep gcc happy
where
mk_rts_opts_enabled val
rts_opts_enabled
= vcat [text "#include \"Rts.h\"",
text "#include \"RtsOpts.h\"",
text "const RtsOptsEnabledEnum rtsOptsEnabled = " <>
text val <> semi ]
rts_opts_enabled = case rtsOptsEnabled dflags of
RtsOptsNone -> mk_rts_opts_enabled "RtsOptsNone"
RtsOptsSafeOnly -> empty -- The default
RtsOptsAll -> mk_rts_opts_enabled "RtsOptsAll"
text (show (rtsOptsEnabled dflags)) <> semi ]
extra_rts_opts = case rtsOpts dflags of
Nothing -> empty
......
/* -----------------------------------------------------------------------------
*
* (c) The GHC Team 2010
*
* En/disable RTS options
*
* ---------------------------------------------------------------------------*/
#include "Rts.h"
#include "RtsOpts.h"
const RtsOptsEnabledEnum rtsOptsEnabled = RtsOptsSafeOnly;
Markdown is supported
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