Skip to content

Commit

Permalink
Fix how cpp-options are passed to ghci wrt #5532
Browse files Browse the repository at this point in the history
-DFOO options can be passed directly to ghc, but
cpp-options may include flags for the preprocessor,
so we need to pass it via -optP.
  • Loading branch information
hasufell committed Aug 23, 2021
1 parent 37cdf40 commit cb20a6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Stack/Package.hs
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ data BioInput = BioInput
generateBuildInfoOpts :: BioInput -> BuildInfoOpts
generateBuildInfoOpts BioInput {..} =
BuildInfoOpts
{ bioOpts = ghcOpts ++ cppOptions biBuildInfo
{ bioOpts = ghcOpts ++ fmap ("-optP" <>) (cppOptions biBuildInfo)
-- NOTE for future changes: Due to this use of nubOrd (and other uses
-- downstream), these generated options must not rely on multiple
-- argument sequences. For example, ["--main-is", "Foo.hs", "--main-
Expand Down

0 comments on commit cb20a6b

Please sign in to comment.