Skip to content
Snippets Groups Projects
Commit bff02c99 authored by Cheng Shao's avatar Cheng Shao
Browse files

hadrian: remove obsolete Patch logic

This commit removes obsolete Patch logic from hadrian, given we no
longer need to patch the gmp tarball when building in-tree GMP.

(cherry picked from commit 65b4b92f)
(cherry picked from commit 92065500)
parent d4c5936f
No related branches found
No related tags found
No related merge requests found
......@@ -8,10 +8,7 @@ module Builder (
-- * Builder properties
builderProvenance, systemBuilderPath, builderPath, isSpecified, needBuilders,
runBuilder, runBuilderWith, runBuilderWithCmdOptions, getBuilderPath,
builderEnvironment,
-- * Ad hoc builder invocation
applyPatch
builderEnvironment
) where
import Control.Exception.Extra (Partial)
......@@ -178,7 +175,6 @@ data Builder = Alex
| MergeObjects Stage -- ^ linker to be used to merge object files.
| Nm
| Objdump
| Patch
| Python
| Ranlib
| Testsuite TestMode
......@@ -441,7 +437,6 @@ systemBuilderPath builder = case builder of
Makeinfo -> fromKey "makeinfo"
Nm -> fromKey "nm"
Objdump -> fromKey "objdump"
Patch -> fromKey "patch"
Python -> fromKey "python"
Ranlib -> fromKey "ranlib"
Testsuite _ -> fromKey "python"
......@@ -493,15 +488,6 @@ systemBuilderPath builder = case builder of
isSpecified :: Builder -> Action Bool
isSpecified = fmap (not . null) . systemBuilderPath
-- | Apply a patch by executing the 'Patch' builder in a given directory.
applyPatch :: FilePath -> FilePath -> Action ()
applyPatch dir patch = do
let file = dir -/- patch
needBuilders [Patch]
path <- builderPath Patch
putBuild $ "| Apply patch " ++ file
quietly $ cmd' [Cwd dir, FileStdin file] [path, "-p0"]
-- Note [cmd wrapper]
-- ~~~~~~~~~~~~~~~~~~
-- `cmd'` is a wrapper for Shake's `cmd` that allows us to customize what is
......
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