-- | Linker configuration

module GHC.Linker.Config
  ( FrameworkOpts(..)
  , LinkerConfig(..)
  )
where

import GHC.Prelude
import GHC.Utils.TmpFs
import GHC.Utils.CliOption

-- used on darwin only
data FrameworkOpts = FrameworkOpts
  { FrameworkOpts -> [String]
foFrameworkPaths    :: [String]
  , FrameworkOpts -> [String]
foCmdlineFrameworks :: [String]
  }

-- | External linker configuration
data LinkerConfig = LinkerConfig
  { LinkerConfig -> String
linkerProgram     :: String           -- ^ Linker program
  , LinkerConfig -> [Option]
linkerOptionsPre  :: [Option]         -- ^ Linker options (before user options)
  , LinkerConfig -> [Option]
linkerOptionsPost :: [Option]         -- ^ Linker options (after user options)
  , LinkerConfig -> TempDir
linkerTempDir     :: TempDir          -- ^ Temporary directory to use
  , LinkerConfig -> String -> String
linkerFilter      :: String -> String -- ^ Output filter
  }