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 Mikolaj committed May 21, 2024
1 parent 4072eb8 commit 42c724f
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 42c724f

Please sign in to comment.