[Git][ghc/ghc][wip/hadrian-windows-bindist] hadrian: Add error when trying to build binary-dist target on windows

Matthew Pickering (@mpickering) gitlab at gitlab.haskell.org
Fri Aug 18 09:32:31 UTC 2023



Matthew Pickering pushed to branch wip/hadrian-windows-bindist at Glasgow Haskell Compiler / GHC


Commits:
70a649cd by Matthew Pickering at 2023-08-18T10:28:56+01:00
hadrian: Add error when trying to build binary-dist target on windows

The binary dist produced by `binary-dist` target doesn't work on windows
because of the wrapper script the makefile installs. In order to not
surprise any packagers we just give an error if someone tries to build
the old binary-dist target rather than the reloc-binary-dist target.

- - - - -


1 changed file:

- hadrian/src/Rules/BinaryDist.hs


Changes:

=====================================
hadrian/src/Rules/BinaryDist.hs
=====================================
@@ -290,7 +290,10 @@ bindistRules = do
               IO.removeFile unversioned_wrapper_path <|> return ()
               IO.createFileLink versioned_wrapper unversioned_wrapper_path
 
-    let buildBinDist = buildBinDistX "binary-dist-dir" "bindist"
+    let buildBinDist compressor = do
+          win_target <- isWinTarget
+          when win_target (error "normal binary-dist does not work for windows target, use `reloc-binary-dist-*` target instead.")
+          buildBinDistX "binary-dist-dir" "bindist" compressor
         buildBinDistReloc = buildBinDistX "reloc-binary-dist-dir" "reloc-bindist"
 
         buildBinDistX :: String -> FilePath -> Compressor -> Action ()



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/70a649cd917ce2688b9dbb5ba0c9f91dd5df8eff

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/70a649cd917ce2688b9dbb5ba0c9f91dd5df8eff
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230818/a657d3b1/attachment.html>


More information about the ghc-commits mailing list