Commit ce481361 authored by Ben Gamari's avatar Ben Gamari 🐢 Committed by Marge Bot

hadrian: Use --export-dynamic when linking iserv

As noticed in #17962, the make build system currently does this (see
3ce0e0ba) but the change was never ported to Hadrian.
parent 7802fa17
...@@ -122,6 +122,14 @@ packageArgs = do ...@@ -122,6 +122,14 @@ packageArgs = do
[ notStage0 ? builder (Cabal Flags) ? arg "ghci" [ notStage0 ? builder (Cabal Flags) ? arg "ghci"
, cross ? stage0 ? builder (Cabal Flags) ? arg "ghci" ] , cross ? stage0 ? builder (Cabal Flags) ? arg "ghci" ]
--------------------------------- iserv --------------------------------
-- Add -Wl,--export-dynamic enables GHCi to load dynamic objects that
-- refer to the RTS. This is harmless if you don't use it (adds a bit
-- of overhead to startup and increases the binary sizes) but if you
-- need it there's no alternative.
, package iserv ? mconcat
[ builder (Ghc LinkHs) ? arg "-optl-Wl,--export-dynamic" ]
-------------------------------- haddock ------------------------------- -------------------------------- haddock -------------------------------
, package haddock ? , package haddock ?
builder (Cabal Flags) ? arg "in-ghc-tree" builder (Cabal Flags) ? arg "in-ghc-tree"
......
  • @bgamari This patch causes build failures on my macOS 10.14.6 machine because the macOS ld doesn’t support --export-dynamic. It looks like the make build system guards this with ifeq "$(TargetElf)" "YES", but I am not sure what the equivalent guard is in Hadrian.

  • Thanks for the heads-up @lexi.lambda! Fix coming.

  • Fix in !3068 (closed).

Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment