{-# LANGUAGE CPP #-}
module GHC.DynFlags
  ( baseDynFlags,
  ) where

import           DynFlags hiding (settings)
import           GHC.Paths (libdir)
import           SysTools
import           Util

fakeLlvmConfig :: LlvmConfig
fakeLlvmConfig :: LlvmConfig
fakeLlvmConfig =
#if __GLASGOW_HASKELL__ < 810
  ([], [])
#else
  [(String, LlvmTarget)] -> [(Int, String)] -> LlvmConfig
LlvmConfig [] []
#endif

baseDynFlags :: IO DynFlags
baseDynFlags :: IO DynFlags
baseDynFlags = do
  Settings
settings <- String -> IO Settings
initSysTools String
libdir
  DynFlags -> IO DynFlags
forall (f :: * -> *) a. Applicative f => a -> f a
pure (DynFlags -> IO DynFlags) -> DynFlags -> IO DynFlags
forall a b. (a -> b) -> a -> b
$ (Settings -> LlvmConfig -> DynFlags
defaultDynFlags Settings
settings LlvmConfig
fakeLlvmConfig)
    { useColor :: OverridingBool
useColor = OverridingBool
Always }