summaryrefslogtreecommitdiff
path: root/rts/rts.cabal.in
diff options
context:
space:
mode:
authorAlp Mestanogullari <alp@well-typed.com>2018-11-22 11:47:48 -0500
committerBen Gamari <ben@smart-cactus.org>2018-11-22 13:14:01 -0500
commit561748cb507505bd5b7bd76bdc57796d896b62a2 (patch)
tree8e68f471e46a95cf0860faf177107ea2a017433e /rts/rts.cabal.in
parent19ffddc1f479fcd5a0f265330cc1041366e8c43d (diff)
downloadhaskell-561748cb507505bd5b7bd76bdc57796d896b62a2.tar.gz
rts.cabal.in: force inclusion of findPtr/_findPtr symbol only with debug flag
The previous strategy caused problems on Windows, as pointed out at [1] [1]: https://phabricator.haskell.org/rGHC900c47f88784#133905 Reviewers: Phyx, bgamari, erikd, simonmar Reviewed By: Phyx Subscribers: rwbarton, carter GHC Trac Issues: #15671 Differential Revision: https://phabricator.haskell.org/D5356
Diffstat (limited to 'rts/rts.cabal.in')
-rw-r--r--rts/rts.cabal.in16
1 files changed, 11 insertions, 5 deletions
diff --git a/rts/rts.cabal.in b/rts/rts.cabal.in
index 76fd353134..a20aa57186 100644
--- a/rts/rts.cabal.in
+++ b/rts/rts.cabal.in
@@ -260,9 +260,13 @@ library
"-Wl,-u,_hs_atomicwrite8"
"-Wl,-u,_hs_atomicwrite16"
"-Wl,-u,_hs_atomicwrite32"
- -- This symbol is useful in gdb, but not referred to anywhere,
- -- so we need to force it to be included in the binary.
"-Wl,-u,_findPtr"
+
+ if flag(debug)
+ -- This symbol is useful in gdb, but not referred to anywhere,
+ -- so we need to force it to be included in the binary.
+ ld-options: "-Wl,-u,_findPtr"
+
else
ld-options:
"-Wl,-u,base_GHCziTopHandler_runIO_closure"
@@ -333,9 +337,11 @@ library
"-Wl,-u,hs_atomicwrite8"
"-Wl,-u,hs_atomicwrite16"
"-Wl,-u,hs_atomicwrite32"
- -- This symbol is useful in gdb, but not referred to anywhere,
- -- so we need to force it to be included in the binary.
- "-Wl,-u,findPtr"
+
+ if flag(debug)
+ -- This symbol is useful in gdb, but not referred to anywhere,
+ -- so we need to force it to be included in the binary.
+ ld-options: "-Wl,-u,_findPtr"
if os(osx)
ld-options: "-Wl,-search_paths_first"