Commit 0c1ccf3c authored by James Foster's avatar James Foster Committed by Marge Bot

hadrian: Refactor file patterns for future Shake changes (fixes #17005)

Shake will be moving from its current implementation of ?== to one from
System.FilePattern. Support for `//` is being dropped, leaving only `*`
and `**` as special forms. This commit converts the existing file
patterns in Hadrian to the new format. It also removes all occurances
of <//> and changes the user-settings docs to remove references to //
and add **.

The conversion is as follows:

- //a ==> **/a

- a// ==> a/**

- a//b ==> a/**/b
parent ea16f6cb
......@@ -99,13 +99,13 @@ You can combine several custom command line settings using `mconcat`:
userArgs :: Args
userArgs = mconcat
[ builder Ghc ? package cabal ? arg "-O0"
, package rts ? input "//PrimOps.c" ? pure ["-fno-PIC", "-static"] ]
, package rts ? input "**/PrimOps.c" ? pure ["-fno-PIC", "-static"] ]
```
You can match any combination of the `builder`, `stage`, `package`, `way`, `input`
and `output` predicates when specifying custom command line arguments. File
patterns such as `"//Prelude.*"` can be used when matching input and output files,
where `//` matches an arbitrary number of path components and `*` matches an entire
path component, excluding any separators.
patterns such as `"**/Prelude.*"` can be used when matching input and output files,
where `**` matches an arbitrary number of path components, but not absolute path
prefixes, and `*` matches an entire path component, excluding any separators.
#### Enabling -Werror
......@@ -245,7 +245,7 @@ verboseCommand = builder (Ghc Link)
verboseCommand = builder (Gcc Compile) &&^ package compiler
-- Use patterns when matching files:
verboseCommand = output "//rts/sm/*" &&^ way threaded
verboseCommand = output "**/rts/sm/*" &&^ way threaded
-- Print all commands:
verboseCommand = return True
......
......@@ -28,9 +28,9 @@ instance NFData TarMode
args :: (ShakeValue c, ShakeValue b) => TarMode -> Args c b
args Create = mconcat
[ arg "-c"
, output "//*.gz" ? arg "--gzip"
, output "//*.bz2" ? arg "--bzip2"
, output "//*.xz" ? arg "--xz"
, output "**/*.gz" ? arg "--gzip"
, output "**/*.bz2" ? arg "--bzip2"
, output "**/*.xz" ? arg "--xz"
, arg "-f", arg =<< getOutput
, getInputs ]
args Extract = mconcat
......
......@@ -148,9 +148,9 @@ configurePackage context@Context {..} = do
(argList ++ ["--flags=" ++ unwords flagList, v])
dir <- Context.buildPath context
files <- liftIO $ getDirectoryFilesIO "." [ dir -/- "include" <//> "*"
files <- liftIO $ getDirectoryFilesIO "." [ dir -/- "include" -/- "**"
, dir -/- "*.buildinfo"
, dir -/- "lib" <//> "*"
, dir -/- "lib" -/- "**"
, dir -/- "config.*" ]
produces files
......
......@@ -212,7 +212,7 @@ makeRelativeNoSysLink a b
isDot _ = False
-- | Like Shake's '%>' but gives higher priority to longer patterns. Useful
-- in situations when a family of build rules, e.g. @"//*.a"@ and @"//*_p.a"@
-- in situations when a family of build rules, e.g. @"**/*.a"@ and @"**/*_p.a"@
-- can be matched by the same file, such as @library_p.a@. We break the tie
-- by preferring longer matches, which correpond to longer patterns.
(%%>) :: FilePattern -> (FilePath -> Action ()) -> Rules ()
......
......@@ -29,7 +29,7 @@ main = do
BuildRoot buildRoot = CommandLine.lookupBuildRoot argsMap
rebuild = [ (RebuildLater, buildRoot -/- "stage0//*")
rebuild = [ (RebuildLater, buildRoot -/- "stage0/**")
| CommandLine.lookupFreeze1 argsMap ]
cwd <- getCurrentDirectory
......@@ -60,11 +60,11 @@ main = do
, shakeLintIgnore =
-- Ignore access to the package database caches.
-- They are managed externally by the ghc-pkg tool.
[ buildRoot -/- "//package.conf.d/package.cache"
[ buildRoot -/- "**/package.conf.d/package.cache"
-- Ignore access to autom4te.cache directories.
-- They are managed externally by auto tools.
, "//autom4te.cache//*"
, "**/autom4te.cache/**"
]
}
......
......@@ -50,12 +50,12 @@ toolArgsTarget = do
root <- buildRoot
let dir = buildDir (vanillaContext Stage0 compiler)
need [ root <//> dir -/- "Config.hs" ]
need [ root <//> dir -/- "Fingerprint.hs" ]
need [ root <//> dir -/- "Parser.hs" ]
need [ root <//> dir -/- "Lexer.hs" ]
need [ root <//> dir -/- "CmmParse.hs" ]
need [ root <//> dir -/- "CmmLex.hs" ]
need [ root -/- dir -/- "Config.hs" ]
need [ root -/- dir -/- "Fingerprint.hs" ]
need [ root -/- dir -/- "Parser.hs" ]
need [ root -/- dir -/- "Lexer.hs" ]
need [ root -/- dir -/- "CmmParse.hs" ]
need [ root -/- dir -/- "CmmLex.hs" ]
-- Find out the arguments that are needed to load a module into the
-- session
......
......@@ -182,8 +182,8 @@ compileHsObjectAndHi rs objpath = do
-- Allow such reads (see https://gitlab.haskell.org/ghc/ghc/wikis/Developing-Hadrian#haskell-object-files-and-hi-inputs)
-- Note that this may allow too many *.hi and *.hi-boot files, but
-- calculating the exact set of direct inputs is not feasible.
trackAllow [ "//*." ++ hisuf way
, "//*." ++ hibootsuf way
trackAllow [ "**/*." ++ hisuf way
, "**/*." ++ hibootsuf way
]
buildWithResources rs $ target ctx (Ghc CompileHs stage) [src] [objpath]
......
......@@ -96,7 +96,7 @@ generatePackageCode :: Context -> Rules ()
generatePackageCode context@(Context stage pkg _) = do
root <- buildRootRules
let dir = buildDir context
generated f = (root -/- dir ++ "//*.hs") ?== f && not ("//autogen/*" ?== f)
generated f = (root -/- dir -/- "**/*.hs") ?== f && not ("**/autogen/*" ?== f)
go gen file = generate file context gen
generated ?> \file -> do
let unpack = fromMaybe . error $ "No generator for " ++ file ++ "."
......@@ -111,13 +111,13 @@ generatePackageCode context@(Context stage pkg _) = do
priority 2.0 $ do
when (pkg == compiler) $ do
root <//> dir -/- "Config.hs" %> go generateConfigHs
root <//> dir -/- "*.hs-incl" %> genPrimopCode context
root -/- "**" -/- dir -/- "Config.hs" %> go generateConfigHs
root -/- "**" -/- dir -/- "*.hs-incl" %> genPrimopCode context
when (pkg == ghcPrim) $ do
root <//> dir -/- "GHC/Prim.hs" %> genPrimopCode context
root <//> dir -/- "GHC/PrimopWrappers.hs" %> genPrimopCode context
root -/- "**" -/- dir -/- "GHC/Prim.hs" %> genPrimopCode context
root -/- "**" -/- dir -/- "GHC/PrimopWrappers.hs" %> genPrimopCode context
when (pkg == ghcBoot) $
root <//> dir -/- "GHC/Version.hs" %> go generateVersionHs
root -/- "**" -/- dir -/- "GHC/Version.hs" %> go generateVersionHs
when (pkg == compiler) $ do
root -/- primopsTxt stage %> \file -> do
......@@ -125,17 +125,17 @@ generatePackageCode context@(Context stage pkg _) = do
need $ [primopsSource] ++ includes
build $ target context HsCpp [primopsSource] [file]
root -/- stageString stage <//> "ghc_boot_platform.h" %>
root -/- stageString stage -/- "**" -/- "ghc_boot_platform.h" %>
go generateGhcBootPlatformH
when (pkg == rts) $ do
root <//> dir -/- "cmm/AutoApply.cmm" %> \file ->
root -/- "**" -/- dir -/- "cmm/AutoApply.cmm" %> \file ->
build $ target context GenApply [] [file]
-- TODO: This should be fixed properly, e.g. generated here on demand.
(root <//> dir -/- "DerivedConstants.h") <~ (buildRoot <&> (-/- generatedDir))
(root <//> dir -/- "ghcautoconf.h") <~ (buildRoot <&> (-/- generatedDir))
(root <//> dir -/- "ghcplatform.h") <~ (buildRoot <&> (-/- generatedDir))
(root <//> dir -/- "ghcversion.h") <~ (buildRoot <&> (-/- generatedDir))
(root -/- "**" -/- dir -/- "DerivedConstants.h") <~ (buildRoot <&> (-/- generatedDir))
(root -/- "**" -/- dir -/- "ghcautoconf.h") <~ (buildRoot <&> (-/- generatedDir))
(root -/- "**" -/- dir -/- "ghcplatform.h") <~ (buildRoot <&> (-/- generatedDir))
(root -/- "**" -/- dir -/- "ghcversion.h") <~ (buildRoot <&> (-/- generatedDir))
where
pattern <~ mdir = pattern %> \file -> do
dir <- mdir
......@@ -165,8 +165,8 @@ copyRules = do
prefix -/- "platformConstants" <~ (buildRoot <&> (-/- generatedDir))
prefix -/- "template-hsc.h" <~ return (pkgPath hsc2hs)
prefix -/- "html//*" <~ return "utils/haddock/haddock-api/resources"
prefix -/- "latex//*" <~ return "utils/haddock/haddock-api/resources"
prefix -/- "html/**" <~ return "utils/haddock/haddock-api/resources"
prefix -/- "latex/**" <~ return "utils/haddock/haddock-api/resources"
generateRules :: Rules ()
generateRules = do
......@@ -184,7 +184,7 @@ generateRules = do
priority 2.0 $ (prefix -/- "settings") %> go generateSettings
-- TODO: simplify, get rid of fake rts context
root -/- generatedDir ++ "//*" %> \file -> do
root -/- generatedDir -/- "**" %> \file -> do
withTempDir $ \dir -> build $
target (rtsContext Stage1) DeriveConstants [] [file, dir]
where
......
......@@ -140,7 +140,7 @@ needLibfffiArchive buildPath = do
. fromSingleton "Exactly one LibFFI tarball is expected"
<$> getDirectoryFiles top ["libffi-tarballs/libffi*.tar.gz"]
need [top -/- tarball]
trackAllow [buildPath -/- "//*"]
trackAllow [buildPath -/- "**"]
return tarball
libffiRules :: Rules ()
......@@ -195,12 +195,12 @@ libffiRules = do
build $ target context (Tar Extract) [tarball] [path]
moveDirectory (path -/- libname) libffiPath) $
-- And finally:
removeFiles (path) [libname <//> "*"]
removeFiles (path) [libname -/- "**"]
top <- topDirectory
fixFile mkIn (fixLibffiMakefile top)
files <- liftIO $ getDirectoryFilesIO "." [libffiPath <//> "*"]
files <- liftIO $ getDirectoryFilesIO "." [libffiPath -/- "**"]
produces files
fmap (libffiPath -/-) ["Makefile", "config.guess", "config.sub"] &%> \[mk, _, _] -> do
......@@ -218,5 +218,5 @@ libffiRules = do
target context (Configure libffiPath) [mk <.> "in"] [mk]
dir <- setting BuildPlatform
files <- liftIO $ getDirectoryFilesIO "." [libffiPath -/- dir <//> "*"]
files <- liftIO $ getDirectoryFilesIO "." [libffiPath -/- dir -/- "**"]
produces files
......@@ -20,15 +20,15 @@ import Utilities
libraryRules :: Rules ()
libraryRules = do
root <- buildRootRules
root -/- "//libHS*-*.dylib" %> buildDynamicLibUnix root "dylib"
root -/- "//libHS*-*.so" %> buildDynamicLibUnix root "so"
root -/- "//*.a" %> buildStaticLib root
root -/- "**/libHS*-*.dylib" %> buildDynamicLibUnix root "dylib"
root -/- "**/libHS*-*.so" %> buildDynamicLibUnix root "so"
root -/- "**/*.a" %> buildStaticLib root
priority 2 $ do
root -/- "stage*/lib//libHS*-*.dylib" %> registerDynamicLibUnix root "dylib"
root -/- "stage*/lib//libHS*-*.so" %> registerDynamicLibUnix root "so"
root -/- "stage*/lib//*.a" %> registerStaticLib root
root -/- "//HS*-*.o" %> buildGhciLibO root
root -/- "//HS*-*.p_o" %> buildGhciLibO root
root -/- "stage*/lib/**/libHS*-*.dylib" %> registerDynamicLibUnix root "dylib"
root -/- "stage*/lib/**/libHS*-*.so" %> registerDynamicLibUnix root "so"
root -/- "stage*/lib/**/*.a" %> registerStaticLib root
root -/- "**/HS*-*.o" %> buildGhciLibO root
root -/- "**/HS*-*.p_o" %> buildGhciLibO root
-- * 'Action's for building libraries
......
......@@ -13,10 +13,10 @@ rtsRules = priority 3 $ do
-- This is for backwards compatibility (the old make build system omitted the
-- dummy version number).
root <- buildRootRules
[ root -/- "//libHSrts_*-ghc*.so",
root -/- "//libHSrts_*-ghc*.dylib",
root -/- "//libHSrts-ghc*.so",
root -/- "//libHSrts-ghc*.dylib"]
[ root -/- "**/libHSrts_*-ghc*.so",
root -/- "**/libHSrts_*-ghc*.dylib",
root -/- "**/libHSrts-ghc*.so",
root -/- "**/libHSrts-ghc*.dylib"]
|%> \ rtsLibFilePath' -> createFileLink
(addRtsDummyVersion $ takeFileName rtsLibFilePath')
rtsLibFilePath'
......
......@@ -61,20 +61,20 @@ prepareTree dest = do
cpFile a = copyFile a (dest -/- a)
cpDir a = copyDirectoryContents (Not excluded) a (dest -/- a)
excluded = Or
[ Test "//.*"
, Test "//#*"
, Test "//*-SAVE"
, Test "//*.orig"
, Test "//*.rej"
, Test "//*~"
, Test "//autom4te*"
, Test "//dist"
, Test "//dist-install"
, Test "//log"
, Test "//stage0"
, Test "//stage1"
, Test "//stage2"
, Test "//stage3"
[ Test "**/.*"
, Test "**/#*"
, Test "**/*-SAVE"
, Test "**/*.orig"
, Test "**/*.rej"
, Test "**/*~"
, Test "**/autom4te*"
, Test "**/dist"
, Test "**/dist-install"
, Test "**/log"
, Test "**/stage0"
, Test "**/stage1"
, Test "**/stage2"
, Test "**/stage3"
, Test "hadrian/.cabal-sandbox"
, Test "hadrian/.stack-work"
, Test "hadrian/UserSettings.hs"
......@@ -83,12 +83,12 @@ prepareTree dest = do
, Test "hadrian/bin"
, Test "hadrian/dist"
, Test "hadrian/dist-newstyle"
, Test "libraries//*.buildinfo"
, Test "libraries//GNUmakefile"
, Test "libraries//config.log"
, Test "libraries//config.status"
, Test "libraries//ghc.mk"
, Test "libraries//include/Hs*Config.h"
, Test "libraries/**/*.buildinfo"
, Test "libraries/**/GNUmakefile"
, Test "libraries/**/config.log"
, Test "libraries/**/config.status"
, Test "libraries/**/ghc.mk"
, Test "libraries/**/include/Hs*Config.h"
, Test "libraries/dph"
, Test "libraries/primitive"
, Test "libraries/random"
......
......@@ -12,11 +12,11 @@ deriveConstantsBuilderArgs = builder DeriveConstants ? do
[a, b] -> (a, b)
_ -> error $ "DeriveConstants: expected two outputs, got " ++ show outs
mconcat
[ output "//DerivedConstants.h" ? arg "--gen-header"
, output "//GHCConstantsHaskellType.hs" ? arg "--gen-haskell-type"
, output "//platformConstants" ? arg "--gen-haskell-value"
, output "//GHCConstantsHaskellWrappers.hs" ? arg "--gen-haskell-wrappers"
, output "//GHCConstantsHaskellExports.hs" ? arg "--gen-haskell-exports"
[ output "**/DerivedConstants.h" ? arg "--gen-header"
, output "**/GHCConstantsHaskellType.hs" ? arg "--gen-haskell-type"
, output "**/platformConstants" ? arg "--gen-haskell-value"
, output "**/GHCConstantsHaskellWrappers.hs" ? arg "--gen-haskell-wrappers"
, output "**/GHCConstantsHaskellExports.hs" ? arg "--gen-haskell-exports"
, arg "-o", arg outputFile
, arg "--tmpdir", arg tempDir
, arg "--gcc-program", arg =<< getBuilderPath (Cc CompileC Stage1)
......
......@@ -4,21 +4,21 @@ import Settings.Builders.Common
genPrimopCodeBuilderArgs :: Args
genPrimopCodeBuilderArgs = builder GenPrimopCode ? mconcat
[ output "//PrimopWrappers.hs" ? arg "--make-haskell-wrappers"
, output "//Prim.hs" ? arg "--make-haskell-source"
, output "//primop-data-decl.hs-incl" ? arg "--data-decl"
, output "//primop-tag.hs-incl" ? arg "--primop-tag"
, output "//primop-list.hs-incl" ? arg "--primop-list"
, output "//primop-has-side-effects.hs-incl" ? arg "--has-side-effects"
, output "//primop-out-of-line.hs-incl" ? arg "--out-of-line"
, output "//primop-commutable.hs-incl" ? arg "--commutable"
, output "//primop-code-size.hs-incl" ? arg "--code-size"
, output "//primop-can-fail.hs-incl" ? arg "--can-fail"
, output "//primop-strictness.hs-incl" ? arg "--strictness"
, output "//primop-fixity.hs-incl" ? arg "--fixity"
, output "//primop-primop-info.hs-incl" ? arg "--primop-primop-info"
, output "//primop-vector-uniques.hs-incl" ? arg "--primop-vector-uniques"
, output "//primop-vector-tys.hs-incl" ? arg "--primop-vector-tys"
, output "//primop-vector-tys-exports.hs-incl" ? arg "--primop-vector-tys-exports"
, output "//primop-vector-tycons.hs-incl" ? arg "--primop-vector-tycons"
, output "//primop-usage.hs-incl" ? arg "--usage" ]
[ output "**/PrimopWrappers.hs" ? arg "--make-haskell-wrappers"
, output "**/Prim.hs" ? arg "--make-haskell-source"
, output "**/primop-data-decl.hs-incl" ? arg "--data-decl"
, output "**/primop-tag.hs-incl" ? arg "--primop-tag"
, output "**/primop-list.hs-incl" ? arg "--primop-list"
, output "**/primop-has-side-effects.hs-incl" ? arg "--has-side-effects"
, output "**/primop-out-of-line.hs-incl" ? arg "--out-of-line"
, output "**/primop-commutable.hs-incl" ? arg "--commutable"
, output "**/primop-code-size.hs-incl" ? arg "--code-size"
, output "**/primop-can-fail.hs-incl" ? arg "--can-fail"
, output "**/primop-strictness.hs-incl" ? arg "--strictness"
, output "**/primop-fixity.hs-incl" ? arg "--fixity"
, output "**/primop-primop-info.hs-incl" ? arg "--primop-primop-info"
, output "**/primop-vector-uniques.hs-incl" ? arg "--primop-vector-uniques"
, output "**/primop-vector-tys.hs-incl" ? arg "--primop-vector-tys"
, output "**/primop-vector-tys-exports.hs-incl" ? arg "--primop-vector-tys-exports"
, output "**/primop-vector-tycons.hs-incl" ? arg "--primop-vector-tycons"
, output "**/primop-usage.hs-incl" ? arg "--usage" ]
......@@ -6,6 +6,6 @@ import Expression
-- https://phabricator.haskell.org/D4880
naturalInBaseFixArgs :: Args
naturalInBaseFixArgs = mconcat
[ input "//Natural.hs" ? pure ["-fno-omit-interface-pragmas"]
, input "//Num.hs" ? pure ["-fno-ignore-interface-pragmas"]
[ input "**/Natural.hs" ? pure ["-fno-omit-interface-pragmas"]
, input "**/Num.hs" ? pure ["-fno-ignore-interface-pragmas"]
]
......@@ -48,13 +48,13 @@ packageArgs = do
[ builder Alex ? arg "--latin1"
, builder (Ghc CompileHs) ? mconcat
[ inputs ["//GHC.hs", "//GhcMake.hs"] ? arg "-fprof-auto"
, input "//Parser.hs" ?
[ inputs ["**/GHC.hs", "**/GhcMake.hs"] ? arg "-fprof-auto"
, input "**/Parser.hs" ?
pure ["-fno-ignore-interface-pragmas", "-fcmm-sink"]
-- These files take a very long time to compile with -O1,
-- so we use -O0 for them just in Stage0 to speed up the
-- build but not affect Stage1+ executables
, inputs ["//HsInstances.hs", "//DynFlags.hs"] ? stage0 ?
, inputs ["**/HsInstances.hs", "**/DynFlags.hs"] ? stage0 ?
pure ["-O0"] ]
, builder (Cabal Setup) ? mconcat
......@@ -110,7 +110,7 @@ packageArgs = do
[ builder (Cabal Flags) ? arg "include-ghc-prim"
, builder (Cc CompileC) ? (not <$> flag GccIsClang) ?
input "//cbits/atomic.c" ? arg "-Wno-sync-nand" ]
input "**/cbits/atomic.c" ? arg "-Wno-sync-nand" ]
--------------------------------- ghci ---------------------------------
-- TODO: This should not be @not <$> flag CrossCompiling@. Instead we
......@@ -163,7 +163,7 @@ packageArgs = do
-------------------------------- runGhc --------------------------------
, package runGhc ?
builder Ghc ? input "//Main.hs" ?
builder Ghc ? input "**/Main.hs" ?
(\version -> ["-cpp", "-DVERSION=" ++ show version]) <$> getSetting ProjectVersion
--------------------------------- text ---------------------------------
......@@ -231,10 +231,10 @@ rtsPackageArgs = package rts ? do
, Profiling `wayUnit` way ? arg "-DPROFILING"
, Threaded `wayUnit` way ? arg "-DTHREADED_RTS"
, inputs ["//RtsMessages.c", "//Trace.c"] ?
, inputs ["**/RtsMessages.c", "**/Trace.c"] ?
arg ("-DProjectVersion=" ++ show projectVersion)
, input "//RtsUtils.c" ? pure
, input "**/RtsUtils.c" ? pure
[ "-DProjectVersion=" ++ show projectVersion
, "-DHostPlatform=" ++ show hostPlatform
, "-DHostArch=" ++ show hostArch
......@@ -253,46 +253,46 @@ rtsPackageArgs = package rts ? do
-- We're after pur performance here. So make sure fast math and
-- vectorization is enabled.
, input "//xxhash.c" ? pure
, input "**/xxhash.c" ? pure
[ "-O3"
, "-ffast-math"
, "-ftree-vectorize" ]
, inputs ["//Evac.c", "//Evac_thr.c"] ? arg "-funroll-loops"
, inputs ["**/Evac.c", "**/Evac_thr.c"] ? arg "-funroll-loops"
, speedHack ?
inputs [ "//Evac.c", "//Evac_thr.c"
, "//Scav.c", "//Scav_thr.c"
, "//Compact.c", "//GC.c" ] ? arg "-fno-PIC"
inputs [ "**/Evac.c", "**/Evac_thr.c"
, "**/Scav.c", "**/Scav_thr.c"
, "**/Compact.c", "**/GC.c" ] ? arg "-fno-PIC"
-- @-static@ is necessary for these bits, as otherwise the NCG
-- generates dynamic references.
, speedHack ?
inputs [ "//Updates.c", "//StgMiscClosures.c"
, "//PrimOps.c", "//Apply.c"
, "//AutoApply.c" ] ? pure ["-fno-PIC", "-static"]
inputs [ "**/Updates.c", "**/StgMiscClosures.c"
, "**/PrimOps.c", "**/Apply.c"
, "**/AutoApply.c" ] ? pure ["-fno-PIC", "-static"]
-- inlining warnings happen in Compact
, inputs ["//Compact.c"] ? arg "-Wno-inline"
, inputs ["**/Compact.c"] ? arg "-Wno-inline"
-- emits warnings about call-clobbered registers on x86_64
, inputs [ "//RetainerProfile.c", "//StgCRun.c"
, "//win32/ConsoleHandler.c", "//win32/ThrIOManager.c"] ? arg "-w"
, inputs [ "**/RetainerProfile.c", "**/StgCRun.c"
, "**/win32/ConsoleHandler.c", "**/win32/ThrIOManager.c"] ? arg "-w"
-- The above warning suppression flags are a temporary kludge.
-- While working on this module you are encouraged to remove it and fix
-- any warnings in the module. See:
-- https://gitlab.haskell.org/ghc/ghc/wikis/working-conventions#Warnings
, (not <$> flag GccIsClang) ?
inputs ["//Compact.c"] ? arg "-finline-limit=2500"
inputs ["**/Compact.c"] ? arg "-finline-limit=2500"
, input "//RetainerProfile.c" ? flag GccIsClang ?
, input "**/RetainerProfile.c" ? flag GccIsClang ?
arg "-Wno-incompatible-pointer-types"
, windowsHost ? arg ("-DWINVER=" ++ windowsVersion)
-- libffi's ffi.h triggers various warnings
, inputs [ "//Interpreter.c", "//Storage.c", "//Adjustor.c" ] ?
, inputs [ "**/Interpreter.c", "**/Storage.c", "**/Adjustor.c" ] ?
arg "-Wno-strict-prototypes"
, inputs ["//Interpreter.c", "//Adjustor.c", "//sm/Storage.c"] ?
, inputs ["**/Interpreter.c", "**/Adjustor.c", "**/sm/Storage.c"] ?
anyTargetArch ["powerpc"] ? arg "-Wno-undef" ]
mconcat
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment