[Git][ghc/ghc][wip/andreask/bindist_liblib] Remove ad-hoc installation of mingw toolchain in relocatable bindists

Matthew Pickering (@mpickering) gitlab at gitlab.haskell.org
Mon May 20 08:38:39 UTC 2024



Matthew Pickering pushed to branch wip/andreask/bindist_liblib at Glasgow Haskell Compiler / GHC


Commits:
6982ab57 by Matthew Pickering at 2024-05-20T09:35:45+01:00
Remove ad-hoc installation of mingw toolchain in relocatable bindists

This reverts 616ac30026e8dd7d2ebb98d92dde071eedf5d951

The choice about whether to install mingw is taken in the installation
makefile.

This is also broken on non-windows systems.

The actual issue was the EnableDistroToolchain variable wasn't declared
in mk/config.mk and therefore the check to install mingw was failing.

- - - - -


3 changed files:

- hadrian/bindist/Makefile
- hadrian/bindist/config.mk.in
- hadrian/src/Rules/BinaryDist.hs


Changes:

=====================================
hadrian/bindist/Makefile
=====================================
@@ -55,10 +55,11 @@ show:
 
 .PHONY: install_extra
 ifeq "$(EnableDistroToolchain)" "NO"
+ifeq "$(Windows_Host)" "YES"
 install_extra: install_mingw
-else
-install_extra:
 endif
+endif
+install_extra:
 
 .PHONY: install_bin
 ifeq "$(RelocatableBuild)" "YES"


=====================================
hadrian/bindist/config.mk.in
=====================================
@@ -133,6 +133,7 @@ INSTALL_DIR     = $(INSTALL) -m 755 -d
 CrossCompiling        = @CrossCompiling@
 CrossCompilePrefix    = @CrossCompilePrefix@
 GhcUnregisterised     = @Unregisterised@
+EnableDistroToolchain = @SettingsUseDistroMINGW@
 
 # The THREADED_RTS requires `BaseReg` to be in a register and the
 # `GhcUnregisterised` mode doesn't allow that.
@@ -226,3 +227,4 @@ SettingsOptCommand = @SettingsOptCommand@
 SettingsLlvmAsCommand = @SettingsLlvmAsCommand@
 SettingsUseDistroMINGW = @SettingsUseDistroMINGW@
 
+


=====================================
hadrian/src/Rules/BinaryDist.hs
=====================================
@@ -135,8 +135,6 @@ bindistRules = do
         let ghcVersionPretty = "ghc-" ++ version ++ "-" ++ targetPlatform
         let prefix = cwd -/- root -/- "reloc-bindist" -/- ghcVersionPretty
         installTo Relocatable prefix
-        copyDirectory (root -/- "mingw") prefix
-        liftIO $ IO.removeDirectoryRecursive (prefix -/- "lib" -/- "mingw")
 
     phony "install" $ do
         need ["binary-dist-dir"]



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6982ab578833bb66d627b1cfc69d142448c506a3

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6982ab578833bb66d627b1cfc69d142448c506a3
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/20240520/7bf317a8/attachment-0001.html>


More information about the ghc-commits mailing list