GHC.Linker.Static

ghc-9.2.0.20210422: The GHC API

Safe Haskell | Safe-Inferred
Language | Haskell2010

GHC.Linker.Static

Synopsis

- linkBinary :: Logger -> TmpFs -> DynFlags -> UnitEnv -> [FilePath] -> [UnitId] -> IO ()
- linkBinary' :: Bool -> Logger -> TmpFs -> DynFlags -> UnitEnv -> [FilePath] -> [UnitId] -> IO ()
- linkStaticLib :: Logger -> DynFlags -> UnitEnv -> [String] -> [UnitId] -> IO ()
- exeFileName :: Platform -> Bool -> Maybe FilePath -> FilePath

# Documentation

linkBinary :: Logger -> TmpFs -> DynFlags -> UnitEnv -> [FilePath] -> [UnitId] -> IO () Source #

linkBinary' :: Bool -> Logger -> TmpFs -> DynFlags -> UnitEnv -> [FilePath] -> [UnitId] -> IO () Source #

linkStaticLib :: Logger -> DynFlags -> UnitEnv -> [String] -> [UnitId] -> IO () Source #

Linking a static lib will not really link anything. It will merely produce a static archive of all dependent static libraries. The resulting library will still need to be linked with any remaining link flags.

exeFileName :: Platform -> Bool -> Maybe FilePath -> FilePath Source #

Compute the output file name of a program.

StaticLink boolean is used to indicate if the program is actually a static library (e.g., on iOS).

Use the provided filename (if any), otherwise use "main.exe" (Windows), "a.out (otherwise without StaticLink set), "liba.a". In every case, add the extension if it is missing.