From 172fd5d1b2a88ce77a6d75ca0d96e5b28ad59f7c Mon Sep 17 00:00:00 2001
From: Matthew Pickering <matthewtpickering@gmail.com>
Date: Wed, 7 Jul 2021 09:08:27 +0100
Subject: [PATCH] hadrian: Remove special haddock copying rule

---
 hadrian/src/Rules/BinaryDist.hs | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/hadrian/src/Rules/BinaryDist.hs b/hadrian/src/Rules/BinaryDist.hs
index 9a52b0cec081..8a09389a2a27 100644
--- a/hadrian/src/Rules/BinaryDist.hs
+++ b/hadrian/src/Rules/BinaryDist.hs
@@ -42,11 +42,6 @@ It does so by following the steps below.
   to
     <build root>/bindist/ghc-<X>.<Y>.<Z>-<arch>-<os>/docs/
 
-- copy haddock (built by our stage2 compiler):
-    <build root>/stage2/bin/haddock
-  to
-    <build root>/bindist/ghc-<X>.<Y>.<Z>-<arch>-<os>/bin/haddock
-
 - use autoreconf to generate a `configure` script from
   aclocal.m4 and distrib/configure.ac, that we move to:
     <build root>/bindist/ghc-<X>.<Y>.<Z>-<arch>-<os>/configure
@@ -169,13 +164,6 @@ bindistRules = do
           -- shipping it
           removeFile (bindistFilesDir -/- mingwStamp)
 
-        -- We copy the binary (<build root>/stage1/bin/haddock[.exe]) to
-        -- the bindist's bindir (<build root>/bindist/ghc-.../bin/).
-        unless cross $ do
-          haddockPath <- programPath (vanillaContext Stage1 haddock)
-          copyFile haddockPath
-                   (bindistFilesDir -/- "bin" -/- takeFileName haddockPath)
-
         -- We then 'need' all the files necessary to configure and install
         -- (as in, './configure [...] && make install') this build on some
         -- other machine.
-- 
GitLab