Skip to content
  • awson's avatar
    RTS linker: don't crash early when not finding extra-libraries · 21339c9f
    awson authored and Ben Gamari's avatar Ben Gamari committed
    Allow GHCi to not crash when no assumed DLL is found in the standard
    location.  E.g. when loading the package built "dyn" way, we may well
    have the package's DLL around, and it's the system linker which loads
    necessary dependencies.
    
    Why does this (partially) fix #11042? It's because we often (and when
    having packages built `dyn` way -- almost always) don't need to load
    anything recorded in the `extra-libraries` stanza, since if the package
    DLL exists, GHCi linker simply calls the system linker (via `dlopen`/
    `LoadLibrary` APIs) to load it and doesn't bother to load package
    prelinked object file (if any) or package static library.
    
    Thus, all "regular" (with no fancy low-level package content
    manipulation) packages built "dyn" way should be OK after this fix.
    
    Reviewers: hvr, bgamari, int-index
    
    Reviewed By: bgamari, int-index
    
    Subscribers: Phyx, int-index, rwbarton, carter
    
    GHC Trac Issues: #11042
    
    Differential Revision: https://phabricator.haskell.org/D5170
    21339c9f