    {-# OPTIONS_GHC -Wno-missing-fields #-}

    -- Modified from ghc-lib-api-ext.

    module GHC.DynFlags
      ( baseDynFlags,
      )
    where

    import GHC.Driver.Session
    import GHC.Platform
    import GHC.Settings
    import GHC.Settings.Config
    import GHC.Utils.Fingerprint

    fakeSettings :: Settings
    fakeSettings :: Settings
    fakeSettings =
      Settings
        { sGhcNameVersion :: GhcNameVersion
    sGhcNameVersion =
            GhcNameVersion
              { ghcNameVersion_programName :: String
    ghcNameVersion_programName = String
    "ghc",
                ghcNameVersion_projectVersion :: String
    ghcNameVersion_projectVersion = String
    cProjectVersion
              },
          sFileSettings :: FileSettings
    sFileSettings = FileSettings {},
          sTargetPlatform :: Platform
    sTargetPlatform =
            Platform
              { platformArchOS :: ArchOS
    platformArchOS =
                  ArchOS
                    { archOS_arch :: Arch
    archOS_arch = Arch
    ArchUnknown,
                      archOS_OS :: OS
    archOS_OS = OS
    OSUnknown
                    },
                platformWordSize :: PlatformWordSize
    platformWordSize = PlatformWordSize
    PW8,
                platformUnregisterised :: Bool
    platformUnregisterised = Bool
    True,
                platformByteOrder :: ByteOrder
    platformByteOrder = ByteOrder
    LittleEndian,
                platformHasGnuNonexecStack :: Bool
    platformHasGnuNonexecStack = Bool
    False,
                platformHasIdentDirective :: Bool
    platformHasIdentDirective = Bool
    False,
                platformHasSubsectionsViaSymbols :: Bool
    platformHasSubsectionsViaSymbols = Bool
    False,
                platformIsCrossCompiling :: Bool
    platformIsCrossCompiling = Bool
    False,
                platformLeadingUnderscore :: Bool
    platformLeadingUnderscore = Bool
    False,
                platformTablesNextToCode :: Bool
    platformTablesNextToCode = Bool
    False,
                platformHasLibm :: Bool
    platformHasLibm = Bool
    False,
                platform_constants :: Maybe PlatformConstants
    platform_constants = Maybe PlatformConstants
    forall a. Maybe a
    Nothing
              },
          sPlatformMisc :: PlatformMisc
    sPlatformMisc = PlatformMisc {},
          sToolSettings :: ToolSettings
    sToolSettings =
            ToolSettings
              { toolSettings_opt_P_fingerprint :: Fingerprint
    toolSettings_opt_P_fingerprint = Fingerprint
    fingerprint0,
                toolSettings_pgm_F :: String
    toolSettings_pgm_F = String
    ""
              }
        }

    fakeLlvmConfig :: LlvmConfig
    fakeLlvmConfig :: LlvmConfig
    fakeLlvmConfig = [(String, LlvmTarget)] -> [(Int, String)] -> LlvmConfig
    LlvmConfig [] []

    baseDynFlags :: DynFlags
    baseDynFlags :: DynFlags
    baseDynFlags = Settings -> LlvmConfig -> DynFlags
    defaultDynFlags Settings
    fakeSettings LlvmConfig
    fakeLlvmConfig