Fix abort and import lib search on Windows
authorTamar Christina <tamar@zhox.com>
Sun, 15 Jan 2017 13:07:36 +0000 (13:07 +0000)
committerTamar Christina <tamar@zhox.com>
Sun, 15 Jan 2017 13:07:36 +0000 (13:07 +0000)
commit331f88d0d878eae926b3c1c61a3ff344916b62ed
treeaa58aa1558ad924c4bb01ca77bc34943866c9a71
parentf63c8ef33ec9666688163abe4ccf2d6c0428a7e7
Fix abort and import lib search on Windows

Summary:
Apparently `sysErrorBelch` doesn't terminate the program anymore making
previously unreachable code now execute. If a dll is not found the error
message we return needs to be a heap value.

Secondly also allow the pattern `lib<name>` to be allowed for finding an
import library with the name `lib<name>.dll.a`.

Test Plan: ./validate, new tests T13082_good and T13082_fail

Reviewers: austin, RyanGlScott, hvr, erikd, simonmar, bgamari

Reviewed By: RyanGlScott, bgamari

Subscribers: thomie, #ghc_windows_task_force

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

GHC Trac Issues: #13082
compiler/ghci/Linker.hs
rts/linker/PEi386.c
testsuite/tests/rts/T13082/Makefile [new file with mode: 0644]
testsuite/tests/rts/T13082/T13082_fail.stderr [new file with mode: 0644]
testsuite/tests/rts/T13082/T13082_good.stdout [new file with mode: 0644]
testsuite/tests/rts/T13082/all.T [new file with mode: 0644]
testsuite/tests/rts/T13082/main.hs [new file with mode: 0644]