nativeGen: Fix string merging on Windows
authorBen Gamari <bgamari.foss@gmail.com>
Thu, 8 Dec 2016 21:33:42 +0000 (16:33 -0500)
committerBen Gamari <ben@smart-cactus.org>
Thu, 8 Dec 2016 23:44:55 +0000 (18:44 -0500)
commit55361b381d14d8752f00d90868fcbe82f86c6b2d
treee0487a759369e8db308d9ea2dfa7b7d78fa9276c
parent1e5b7d701149dc20c9f92e722c32912c86d53081
nativeGen: Fix string merging on Windows

D1290 places string constants in the `.rodata.str` section with `aMS`
section flags so that the linker can merge them. However, it seems that
ld doesn't understand these flags. It appears that `gcc
-fmerge-constants` uses the `dr` flags on Windows. Make GHC do the same.

Test Plan: Validate on Windows

Reviewers: xnyhps, austin, Phyx

Reviewed By: Phyx

Subscribers: thomie, trommler

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

GHC Trac Issues: #9577
compiler/nativeGen/PprBase.hs