Don't use mmap symbols when !RTS_LINKER_USE_MMAP
authorShea Levy <shea@shealevy.com>
Wed, 16 Nov 2016 03:01:20 +0000 (22:01 -0500)
committerBen Gamari <ben@smart-cactus.org>
Wed, 16 Nov 2016 03:01:37 +0000 (22:01 -0500)
commita637eeb7a1852adfd99b06d2c0a3496e4f238a0c
treecab7490a0d78ed776c7caadc6a8d779c8f7b50bb
parent4a835f0890b4848b32129ab11ceb29cb0a0769f6
Don't use mmap symbols when !RTS_LINKER_USE_MMAP

Some usages of symbols from sys/mman.h are guarded by
RTS_LINKER_USE_MMAP by C conditionals, not CPP conditionals. Since those
branches are dead anyway when !RTS_LINKER_USE_MMAP, we just stub out the
relevant symbols rather than increasing CPP branching.

Fixes #12839.

Reviewers: simonmar, austin, bgamari, erikd

Reviewed By: simonmar, bgamari, erikd

Subscribers: thomie

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

GHC Trac Issues: #12839
rts/LinkerInternals.h