Skip to content
Snippets Groups Projects
Commit 3a09b789 authored by Ben Gamari's avatar Ben Gamari Committed by Marge Bot
Browse files

hadrian: Only pass -Wno-nonportable-include-path on Darwin

This flag, which was introduced due to #17798, is only understood by
Clang and consequently throws warnings on platforms using gcc. Sadly,
there is no good way to treat such warnings as non-fatal with `-Werror`
so for now we simply make this flag specific to platforms known to use
Clang and case-insensitive filesystems (Darwin and Windows).

See #23577.
parent ec55035f
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@ module Settings.Warnings (defaultGhcWarningsArgs, ghcWarningsArgs) where
import Expression
import Oracles.Flag
import Oracles.Setting (isOsxTarget, isWinTarget)
import Packages
-- See @mk/warnings.mk@ for warning-related arguments in the Make build system.
......@@ -12,7 +13,11 @@ defaultGhcWarningsArgs = mconcat
[ notStage0 ? arg "-Wnoncanonical-monad-instances"
, notM (flag CcLlvmBackend) ? arg "-optc-Wno-error=inline"
, flag CcLlvmBackend ? arg "-optc-Wno-unknown-pragmas"
, arg "-optP-Wno-nonportable-include-path" -- #17798
-- Cabal can seemingly produce filepaths with incorrect case on filesystems
-- with case-insensitive names. Ignore such issues for now as they seem benign.
-- See #17798.
, isOsxTarget ? arg "-optP-Wno-nonportable-include-path"
, isWinTarget ? arg "-optP-Wno-nonportable-include-path"
]
-- | Package-specific warnings-related arguments, mostly suppressing various warnings.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment