Extend Windows runtime loader libsearch

Authored by Phyx on Mar 2 2017, 2:14 PM.


Extend Windows runtime loader libsearch

This adds .obj extension to the list of valid
object file (we really shouldn't be using extensions
but instead trying to read the file and see if the header
makes sense.). Microsoft compilers use .obj instead of .o
for object files.

This also adds support to finding static archives when the
"lib" prefix is already in the filename. e.g. -llibfoo to
find libfoo.a. This is inline with binutils.

Test Plan: ./validate

Reviewers: simonmar, erikd, bgamari, hvr, austin

Reviewed By: bgamari

Subscribers: RyanGlScott, thomie, #ghc_windows_task_force

Differential Revision: https://phabricator.haskell.org/D3082