Allow building static libs.
authorMoritz Angermann <moritz.angermann@gmail.com>
Sat, 25 Jun 2016 16:07:57 +0000 (17:07 +0100)
committerTamar Christina <tamar@zhox.com>
Sat, 25 Jun 2016 16:11:10 +0000 (17:11 +0100)
commit8c1ceddd50158f79f9ff103f8f34be9856d4da1d
tree45c13228d0714112ebbcce207a53c433da13438d
parent4cc5a39ec79af7dcc4a5ac96823c704c34c5c202
Allow building static libs.

Summary:
Commit 90538d86af579595987826cd893828d6f379f35a, seems to have broken static linking.
The introduction of `argFixup` in `runLink` rearranges libs, and considers
anything with an `-l` prefix or `.a` suffix a lib, which fails for libs that are
just being linked together (e.g. `-o lib.a`).

The proposed solution explicitly checks for the existance of the `-o` flag.

Reviewers: rwbarton, erikd, Phyx, bgamari, austin

Reviewed By: Phyx

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2362
compiler/main/SysTools.hs