blob: 087767d39bed78de5c18a0f99e375f2c32014a34 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
module GHC.Driver.Config.StgToJS
( initStgToJSConfig
)
where
import GHC.StgToJS.Types
import GHC.Driver.Session
import GHC.Platform.Ways
import GHC.Utils.Outputable
import GHC.Prelude
-- | Initialize StgToJS settings from DynFlags
initStgToJSConfig :: DynFlags -> StgToJSConfig
initStgToJSConfig dflags = StgToJSConfig
-- flags
{ csInlinePush = False
, csInlineBlackhole = False
, csInlineLoadRegs = False
, csInlineEnter = False
, csInlineAlloc = False
, csTraceRts = False
, csAssertRts = False
, csBoundsCheck = gopt Opt_DoBoundsChecking dflags
, csDebugAlloc = False
, csTraceForeign = False
, csProf = ways dflags `hasWay` WayProf
, csRuntimeAssert = False
-- settings
, csContext = initSDocContext dflags defaultDumpStyle
}
|