Skip to content

Commit

Permalink
Add comment clarifying disabling check for scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
bacchanalia authored and wismill committed May 26, 2024
1 parent 6ba3257 commit 32c03b0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Cabal/src/Distribution/PackageDescription/Check/Target.hs
Original file line number Diff line number Diff line change
Expand Up @@ -825,9 +825,10 @@ checkGHCOptions title t opts = do
checkFlags
["-prof"]
(PackageBuildWarning $ OptProf title)
-- Does not apply to scripts.
-- Why do we need this? See #8963.
pid <- asksCM (pnPackageId . ccNames)
-- Scripts add the -o flag in the fake-package.cabal in order to have the
-- executable name match the script name even when there are characters
-- in the script name which are illegal to have as a target name.
unless (pid == fakePackageId) $
checkFlags
["-o"]
Expand Down

0 comments on commit 32c03b0

Please sign in to comment.