ghc-9.15: The GHC API
Safe HaskellNone
LanguageGHC2024

GHC.Linker.ByteCode

Synopsis

Documentation

mkInterpreterLib :: HscEnv -> [FilePath] -> IO (Maybe InterpreterLibrary) Source #

Build a library suitable for loading into the interpreter.

This uses similar logic to how foreign stubs are compiler specifically for a specific interpeter way. If the interpreter is dynamic, we create a shared library and if it's static, create a static archive.

The objects which we use will already be compiled for this scheme. It doesn't appear exactly right to use interpreterDynamic here, but it's what is currently done for foreign stubs in GHC.Driver.ByteCode. Perhaps instead we should look at the build way to determine which kind of library to create.