Fix linker interaction between Template Haskell and HPC (#9762)
authorReid Barton <rwbarton@gmail.com>
Tue, 23 Dec 2014 21:53:16 +0000 (16:53 -0500)
committerReid Barton <rwbarton@gmail.com>
Wed, 24 Dec 2014 00:41:21 +0000 (19:41 -0500)
commit3e3aa9258b521d362d3a51cb48969df3eeab4981
treedc897d4432e02d55535707e650941b04f34b635d
parentcc510b46b4f6046115cd74acc2c8726c91823bcf
Fix linker interaction between Template Haskell and HPC (#9762)

Summary:
I'm not really happy about perpetuating the hackish fix for #8696,
but at least in the context of building with -fhpc, the performance
cost should be negligible.

I'm suspicious about PlainModuleInitLabel and the Windows stuff too,
but I don't know what it does / can't test it (respectively) so I'll
leave those alone for now.

Hopefully out-of-process TH will save us from these hacks some day.

The test is an adaptation of T8696. It's a bit more awkward since
I couldn't think of a way to get cross-module tickbox references
without optimizations (inlining), but ghci doesn't permit -O for
some reason.

Test Plan: harbormaster; validate

Reviewers: austin

Reviewed By: austin

Subscribers: carter, thomie

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

GHC Trac Issues: #9762

Conflicts:
testsuite/tests/ghci/scripts/all.T
compiler/cmm/CLabel.hs
testsuite/tests/ghci/scripts/Makefile
testsuite/tests/ghci/scripts/T9762.script [new file with mode: 0644]
testsuite/tests/ghci/scripts/T9762.stdout [new file with mode: 0644]
testsuite/tests/ghci/scripts/T9762A.hs [new file with mode: 0644]
testsuite/tests/ghci/scripts/T9762B.hs [new file with mode: 0644]
testsuite/tests/ghci/scripts/all.T