• Tamar Christina's avatar
    Align GHCi's library search order more closely with LDs · 95b6affc
    Tamar Christina authored
    Summary:
    Given a static library and an import library in the same folder. e.g.
    
    ```
    libfoo.a
    libfoo.dll.a
    ```
    
    running `ghci -lfoo` we should prefer the import library `libfoo.dll.a`
    over `libfoo.a` because we prefer having to just load the DLL.
    And not having to do any linking.
    
    This also more closely emulated the behaviour of LD, which has a search order of
    
    ```
    libxxx.dll.a
    xxx.dll.a
    libxxx.a
    cygxxx.dll (*)
    libxxx.dll
    xxx.dll
    ```
    
    Test Plan: ./validate
    
    Reviewers: RyanGlScott, austin, hvr, bgamari, erikd, simonmar
    
    Reviewed By: RyanGlScott
    
    Subscribers: thomie, #ghc_windows_task_force
    
    Differential Revision: https://phabricator.haskell.org/D2651
    
    GHC Trac Issues: #12771
    
    (cherry picked from commit 795be0ea)
    95b6affc
main.hs 79 Bytes