Commit b989845e authored by Sylvain Henry's avatar Sylvain Henry Committed by Marge Bot

Hadrian: fix absolute buildroot support (#17822)

Shake's "**" wildcard doesn't match absolute root. We must use "//" instead.
parent c12a2ec5
Pipeline #16696 failed with stages
in 413 minutes and 2 seconds
......@@ -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
......
......@@ -64,7 +64,7 @@ main = do
-- Ignore access to autom4te.cache directories.
-- They are managed externally by auto tools.
, "**/autom4te.cache/**"
, "//autom4te.cache/**"
]
}
......
......@@ -98,7 +98,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 ++ "."
......
......@@ -24,7 +24,7 @@ deriveConstantsBuilderArgs = builder DeriveConstants ? do
_ -> error $ "DeriveConstants: expected two outputs, got " ++ show outs
mconcat
[ mconcat $ flip fmap deriveConstantsPairs $ \(fileName, flag) ->
output ("**/" ++ fileName) ? arg flag
output ("//" ++ fileName) ? arg flag
, 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" ]
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