Skip to content

Commit cb20a6b

Browse files
committed
Fix how cpp-options are passed to ghci wrt #5532
-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.
1 parent 37cdf40 commit cb20a6b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Stack/Package.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ data BioInput = BioInput
358358
generateBuildInfoOpts :: BioInput -> BuildInfoOpts
359359
generateBuildInfoOpts BioInput {..} =
360360
BuildInfoOpts
361-
{ bioOpts = ghcOpts ++ cppOptions biBuildInfo
361+
{ bioOpts = ghcOpts ++ fmap ("-optP" <>) (cppOptions biBuildInfo)
362362
-- NOTE for future changes: Due to this use of nubOrd (and other uses
363363
-- downstream), these generated options must not rely on multiple
364364
-- argument sequences. For example, ["--main-is", "Foo.hs", "--main-

0 commit comments

Comments
 (0)