Skip to content
  • Sylvain Henry's avatar
    Add support for external static plugins (#20964) · f95bbdca
    Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
    
    
    This patch adds a new command-line flag:
    
      -fplugin-library=<file-path>;<unit-id>;<module>;<args>
    
    used like this:
    
      -fplugin-library=path/to/plugin.so;package-123;Plugin.Module;["Argument","List"]
    
    It allows a plugin to be loaded directly from a shared library. With
    this approach, GHC doesn't compile anything for the plugin and doesn't
    load any .hi file for the plugin and its dependencies. As such GHC
    doesn't need to support two environments (one for plugins, one for
    target code), which was the more ambitious approach tracked in #14335.
    
    Fix #20964
    
    Co-authored-by: default avatarJosh Meredith <joshmeredith2008@gmail.com>
    f95bbdca