[Git][ghc/ghc][wip/hadrian-cross-stage2] wip

Matthew Pickering (@mpickering) gitlab at gitlab.haskell.org
Wed Oct 4 19:50:26 UTC 2023



Matthew Pickering pushed to branch wip/hadrian-cross-stage2 at Glasgow Haskell Compiler / GHC


Commits:
bb8990ea by GHC GitLab CI at 2023-10-04T19:50:14+00:00
wip

- - - - -


3 changed files:

- hadrian/bindist/Makefile
- hadrian/src/Rules/BinaryDist.hs
- testsuite/driver/testlib.py


Changes:

=====================================
hadrian/bindist/Makefile
=====================================
@@ -116,7 +116,7 @@ lib/settings : config.mk
 	@echo ',("install_name_tool command", "$(SettingsInstallNameToolCommand)")' >> $@
 	@echo ',("touch command", "$(SettingsTouchCommand)")' >> $@
 	@echo ',("windres command", "$(SettingsWindresCommand)")' >> $@
-	@echo ',("unlit command", "$$topdir/bin/$(CrossCompilePrefix)unlit")' >> $@
+	@echo ',("unlit command", "$$topdir/../bin/$(CrossCompilePrefix)unlit")' >> $@
 	@echo ',("cross compiling", "$(CrossCompiling)")' >> $@
 	@echo ',("target platform string", "$(TARGETPLATFORM)")' >> $@
 	@echo ',("target os", "$(HaskellTargetOs)")' >> $@
@@ -187,9 +187,6 @@ install_lib: lib/settings
 		    $(INSTALL_DATA) $$i "$$dest/`dirname $$i`" ;; \
 		esac; \
 	done; \
-	if [ -d "$$dest/bin" ]; then \
-		chmod ugo+rx "$$dest"/bin/*;  \
-	fi
 	# Work around #17418 on Darwin
 	if [ -e "${XATTR}" ]; then \
 		"${XATTR}" -c -r "$(DESTDIR)$(ActualLibsDir)"; \


=====================================
hadrian/src/Rules/BinaryDist.hs
=====================================
@@ -20,6 +20,7 @@ import GHC.Toolchain.Program (prgFlags)
 import qualified Data.Set as Set
 import Oracles.Flavour
 import Debug.Trace
+import qualified System.Directory.Extra as IO
 
 {-
 Note [Binary distributions]
@@ -171,6 +172,7 @@ buildBinDistDir root conf at BindistConfig{..} = do
     -- let rtsDir  = "rts"
 
     let ghcBuildDir      = root -/- stageString library_stage
+	ghcLibBinBuildDir = root -/- stageString executable_stage -/- "lib" -/- "bin"
         bindistFilesDir  = root -/- "bindist" -/- ghcVersionPretty
         ghcVersionPretty = "ghc-" ++ version ++ "-" ++ targetPlatform
         rtsIncludeDir    = ghcBuildDir -/- "lib" -/- distDir -/- rtsDir
@@ -181,6 +183,7 @@ buildBinDistDir root conf at BindistConfig{..} = do
     createDirectory bindistFilesDir
     createDirectory (bindistFilesDir -/- "bin")
     createDirectory (bindistFilesDir -/- "lib")
+    createDirectory (bindistFilesDir -/- "lib" -/- "bin")
     -- Also create wrappers with version suffixes (#20074)
     forM_ (bin_targets ++ iserv_targets) $ \(pkg, prog_path) -> do
         let orig_filename = takeFileName prog_path
@@ -227,6 +230,9 @@ buildBinDistDir root conf at BindistConfig{..} = do
               IO.createFileLink version_prog versioned_runhaskell_path
 
     copyDirectory (ghcBuildDir -/- "lib") bindistFilesDir
+    ld <- liftIO $ IO.listDirectory ghcLibBinBuildDir
+    traceShowM ld
+    copyDirectory ghcLibBinBuildDir bindistFilesDir
     copyDirectory (rtsIncludeDir)         bindistFilesDir
     when windowsHost $ createGhcii (bindistFilesDir -/- "bin")
 


=====================================
testsuite/driver/testlib.py
=====================================
@@ -144,7 +144,6 @@ def js_skip( name, opts ):
 
 # expect broken for the JS backend
 def js_broken( bug: IssueNumber ):
-    print ("js_broken", js_arch())
     if js_arch():
         return expect_broken(bug);
     else:
@@ -728,7 +727,6 @@ def opsys( os: str ) -> bool:
     return config.os == os
 
 def arch( arch: str ) -> bool:
-    print(arch, config.arch)
     return config.arch == arch
 
 def wordsize( ws: int ) -> bool:



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/bb8990ea3c247bd407239d07cafc082f6ef1b66f
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/20231004/9215584b/attachment-0001.html>


More information about the ghc-commits mailing list