Force findPtr to be included in the binary

Authored by simonmar on May 9 2018, 3:01 PM.



A better alternative to D4657.

Test Plan
cd testsuite/tests/codeGen/should_run
../../../../inplace/bin/ghc-stage2 -debug cgrun001
nm cgrun001 | grep findPtr

Diff Detail

rGHC Glasgow Haskell Compiler
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
simonmar created this revision.May 9 2018, 3:01 PM
simonmar updated this revision to Diff 16356.May 9 2018, 3:04 PM

also update

Phyx accepted this revision.May 9 2018, 4:59 PM

Thanks @simonmar ! I'm not sure what those backpack failures are about.. but they seem unrelated.

@bgamari have you seen those before?

This revision is now accepted and ready to land.May 9 2018, 4:59 PM

The backpack failures are from D4659 (I stacked this diff on top of that one in my tree)

Phyx added a comment.May 10 2018, 3:49 AM

Ah ok, that explains it. It seemed very strange to get an interface error from a new symbol

bgamari accepted this revision.May 15 2018, 12:20 PM

Indeed this is much better.

This revision was automatically updated to reflect the committed changes.
snowleopard added inline comments.

@simonmar @bgamari Should this also be conditional on DEBUG, as in rts/ Hadrian is currently failing as described here: I think the reason is that this flag is passed to the linker even when there really is no symbol _findPtr.

Indeed this symbol is currently only defined with -DDEBUG so either we should export a stub in the non-DEBUG case or make these conditional.


Yes it should. Good catch1


And the same here.