Skip to content

Commit 75ffb45

Browse files
committed
Do not check for OptO in scripts
See haskell#8963 for reason and clarification requests.
1 parent 9276c8b commit 75ffb45

File tree

1 file changed

+7
-3
lines changed
  • Cabal/src/Distribution/PackageDescription/Check

1 file changed

+7
-3
lines changed

Cabal/src/Distribution/PackageDescription/Check/Target.hs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -796,9 +796,13 @@ checkGHCOptions title t opts = do
796796
checkFlags
797797
["-prof"]
798798
(PackageBuildWarning $ OptProf title)
799-
checkFlags
800-
["-o"]
801-
(PackageBuildWarning $ OptO title)
799+
-- Does not apply to scripts.
800+
-- Why do we need this? See #8963.
801+
pid <- asksCM (pnPackageId . ccNames)
802+
unless (pid == fakePackageId) $
803+
checkFlags
804+
["-o"]
805+
(PackageBuildWarning $ OptO title)
802806
checkFlags
803807
["-hide-package"]
804808
(PackageBuildWarning $ OptHide title)

0 commit comments

Comments
 (0)