Skip to content

Commit

Permalink
inline-c-cpp: Clarify ghc >= 8.10 conditional on -optcxx=-std=c++11
Browse files Browse the repository at this point in the history
  • Loading branch information
roberth committed Nov 23, 2020
1 parent dd6d45f commit 3b9a0b8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions inline-c-cpp/inline-c-cpp.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ library
-- cxx-options is for .cxx _file_ compilation whereas -optcxx is
-- for TemplateHaskell, so we duplicate the options
cxx-options: -Wall -std=c++11
-- GHC < 8.10 do not provide proper means to set C++ options specifically.
-- On those versions you might be able to use -pgmc=clang++ instead.
-- This also means that we don't specify the C++ language version on GHC < 8.10,
-- which should be harmless because compilers strive to be ABI compatible
-- regardless of C++ language version (except perhaps experimental features).
-- By setting it to C++11 on GHC >= 8.10, we can expect incompatibilities to
-- be caught.
if impl(ghc >= 8.10)
ghc-options: -optcxx=-Wall
-optcxx=-std=c++11
Expand Down

0 comments on commit 3b9a0b8

Please sign in to comment.