Skip to content
  • Ben Gamari's avatar
    nativeGen: Fix string merging on Windows · 55361b38
    Ben Gamari authored and Ben Gamari's avatar Ben Gamari committed
    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
    55361b38