No way to pass options to C++ compiler invoked for `addForeignSource LangCxx`
I can embed some C++ code in my Haskell with TH feature
addForeignSource LangCxx. As far as I comprehend, this makes some GHC internals create a temporary C++ file and call C++ compiler to it.
When I do this with C code, I'm able to pass the C compiler any option with
But I have no such option for C++.
When I pass C++-specific options via
-optc, I get error
Linking .stack-work/dist/x86_64-osx/Cabal-184.108.40.206/build/foo/foo ... error: invalid argument '-std=c++11' not allowed with 'C' `gcc' failed in phase `C Compiler'. (Exit code: 1)