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
Zoe Zuser committed May 24, 2024
1 parent d1a6ced commit d03137e
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 d03137e

Please sign in to comment.