diff options
author | Tamar Christina <tamar@zhox.com> | 2016-06-13 13:29:17 +0200 |
---|---|---|
committer | Tamar Christina <tamar@zhox.com> | 2016-06-13 13:35:21 +0200 |
commit | 5cee88d766723929f789ffcd2ef24d8b5ef62a16 (patch) | |
tree | b5547621eabd5bc8435b5c79cd3cc0497273c0a0 /testsuite/tests/rts/T11788.c | |
parent | 1dcb32ddba605bced2e0e0ce3f52b58e8ff33f5b (diff) | |
download | haskell-5cee88d766723929f789ffcd2ef24d8b5ef62a16.tar.gz |
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
Diffstat (limited to 'testsuite/tests/rts/T11788.c')
-rw-r--r-- | testsuite/tests/rts/T11788.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/tests/rts/T11788.c b/testsuite/tests/rts/T11788.c new file mode 100644 index 0000000000..cd6e4aca4c --- /dev/null +++ b/testsuite/tests/rts/T11788.c @@ -0,0 +1,14 @@ +int a() +{ + return 4; +} + +int b() +{ + return a()*a(); +} + +int c() +{ + return a()*b(); +} |