summaryrefslogtreecommitdiff
path: root/compiler/main/DynFlags.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/main/DynFlags.hs')
-rw-r--r--compiler/main/DynFlags.hs19
1 files changed, 17 insertions, 2 deletions
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 723bf44b8b..d07977ceea 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -20,6 +20,7 @@ module DynFlags (
WarningFlag(..),
ExtensionFlag(..),
Language(..),
+ PlatformConstants(..),
FatalMessager, LogAction, FlushOut(..), FlushErr(..),
ProfAuto(..),
glasgowExtsFlags,
@@ -115,6 +116,10 @@ module DynFlags (
#endif
-- ** Only for use in the tracing functions in Outputable
tracingDynFlags,
+
+#include "../includes/dist-derivedconstants/header/GHCConstantsHaskellExports.hs"
+ bLOCK_SIZE_W,
+ wORD_SIZE_IN_BITS,
) where
#include "HsVersions.h"
@@ -127,7 +132,7 @@ import {-# SOURCE #-} Packages (PackageState)
import DriverPhases ( Phase(..), phaseInputExt )
import Config
import CmdLineParser
-import Constants ( mAX_CONTEXT_REDUCTION_DEPTH )
+import Constants
import Panic
import Util
import Maybes ( orElse )
@@ -705,8 +710,9 @@ data Settings = Settings {
sOpt_l :: [String],
sOpt_windres :: [String],
sOpt_lo :: [String], -- LLVM: llvm optimiser
- sOpt_lc :: [String] -- LLVM: llc static compiler
+ sOpt_lc :: [String], -- LLVM: llc static compiler
+ sPlatformConstants :: PlatformConstants
}
targetPlatform :: DynFlags -> Platform
@@ -3138,3 +3144,12 @@ compilerInfo dflags
("Global Package DB", systemPackageConfig dflags)
]
+#include "../includes/dist-derivedconstants/header/GHCConstantsHaskellType.hs"
+#include "../includes/dist-derivedconstants/header/GHCConstantsHaskellWrappers.hs"
+
+bLOCK_SIZE_W :: DynFlags -> Int
+bLOCK_SIZE_W dflags = bLOCK_SIZE dflags `quot` wORD_SIZE
+
+wORD_SIZE_IN_BITS :: DynFlags -> Int
+wORD_SIZE_IN_BITS _ = wORD_SIZE * 8
+