• Eric Conlon's avatar
    Pass -optcxx for GHC >= 8.10 · 28380790
    Eric Conlon authored
    Fixes https://github.com/haskell/cabal/issues/6421
    To summarize, Cabal passes all C and C++ flags through GHC to the underlying C or C++ compiler using -optc. This works for GHC < 8.10, but now GHC expects C++ flags to come through -optcxx. This means that anything through -optc is ignored, so we cannot pass any flags to the C++ compiler. This change simply detects the GHC version and uses the correct arguments.
    This PR has been tested manually and two PackageTests have been added to cabal-testsuite. They pass under GHC 8.8.4 and GHC 8.10.2.