Regression in handling C++ compiler flags in 8.10 series
Summary
C++ compiler flags are no longer passed correctly from cxx-options
to the underlying compiler. This is a regression from 8.8 to 8.10.
Steps to reproduce
There is a comprehensive repro and logs on OSX and Linux in this repository. The repro sets up a C++ file that requires that a preprocessor directive be defined (cxx-options: -D__LIFE_MEANING__=42
). Using GHC 8.8.4 lets us successfully set this directive and run our program. Using 8.10.2 does not.
Expected behavior
This is the expected output on OSX using GHC 8.8.4. You can see the program is built and runs correctly, printing the value that has been sent through the C++ preprocessor.
This shows the failure on OSX using GHC 8.10.2.
Environment
- GHC version used: 8.8.4 and 8.10.2
- Cabal version used: 3.2.0.0
Optional:
- Operating System: OSX, Debian Buster
- System Architecture: x86_64