Add thin library support to Windows too
authorTamar Christina <tamar@zhox.com>
Mon, 13 Jun 2016 11:29:17 +0000 (13:29 +0200)
committerTamar Christina <tamar@zhox.com>
Mon, 13 Jun 2016 11:35:21 +0000 (13:35 +0200)
commit5cee88d766723929f789ffcd2ef24d8b5ef62a16
treeb5547621eabd5bc8435b5c79cd3cc0497273c0a0
parent1dcb32ddba605bced2e0e0ce3f52b58e8ff33f5b
Add thin library support to Windows too

Summary:
Code already existed in the RTS to add thin library support for non-Windows
operating systems. This adds it to Windows as well.

ar thin libraries have the exact same format as normal archives except they
have a different magic string and they don't copy the object files into the
archive.

Instead each header entry points to the location of the object file on disk.
This is useful when a library is only created to satisfy a compile time dependency
instead of to be distributed. This saves the time required for copying.

Test Plan: ./validate and new test T11788

Reviewers: austin, bgamari, simonmar, erikd

Reviewed By: bgamari, simonmar

Subscribers: thomie, #ghc_windows_task_force

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

GHC Trac Issues: #11788
rts/Linker.c
testsuite/tests/rts/Makefile
testsuite/tests/rts/T11788.c [new file with mode: 0644]
testsuite/tests/rts/T11788.hs [new file with mode: 0644]
testsuite/tests/rts/T11788.stdout [new file with mode: 0644]
testsuite/tests/rts/all.T