[Git][ghc/ghc][master] hadrian: fix wasm backend post linker script permissions

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Mon Feb 19 12:15:11 UTC 2024



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
4696b966 by Cheng Shao at 2024-02-19T07:14:02-05:00
hadrian: fix wasm backend post linker script permissions

The post-link.mjs script was incorrectly copied and installed as a
regular data file without executable permission, this commit fixes it.

- - - - -


2 changed files:

- hadrian/bindist/Makefile
- hadrian/src/Rules/Generate.hs


Changes:

=====================================
hadrian/bindist/Makefile
=====================================
@@ -169,7 +169,7 @@ install_bin_direct:
 install_lib: lib/settings
 	@echo "Copying libraries to $(DESTDIR)$(ActualLibsDir)"
 	$(INSTALL_DIR) "$(DESTDIR)$(ActualLibsDir)"
-	
+
 	@dest="$(DESTDIR)$(ActualLibsDir)"; \
 	cd lib; \
 	for i in `$(FIND) . -type f`; do \
@@ -185,6 +185,8 @@ install_lib: lib/settings
 		    $(INSTALL_SHLIB) $$i "$$dest/`dirname $$i`" ;; \
 		  *.dylib) \
 		    $(INSTALL_SHLIB) $$i "$$dest/`dirname $$i`" ;; \
+		  *.mjs) \
+		    $(INSTALL_SCRIPT) $$i "$$dest/`dirname $$i`" ;; \
 		  *) \
 		    $(INSTALL_DATA) $$i "$$dest/`dirname $$i`" ;; \
 		esac; \


=====================================
hadrian/src/Rules/Generate.hs
=====================================
@@ -211,7 +211,10 @@ copyRules = do
         prefix -/- "ghc-interp.js"     <~ return "."
         prefix -/- "template-hsc.h" <~ return (pkgPath hsc2hs -/- "data")
 
-        prefix -/- "post-link.mjs"     <~ pure "utils/jsffi"
+        prefix -/- "post-link.mjs" %> \file -> do
+            copyFile ("utils/jsffi" -/- makeRelative prefix file) file
+            makeExecutable file
+
         prefix -/- "prelude.js"        <~ pure "utils/jsffi"
 
         prefix -/- "html/**"           <~ return "utils/haddock/haddock-api/resources"



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4696b9661b7b4da213b8daa42e70de57b794afbf
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/20240219/0b9b7501/attachment-0001.html>


More information about the ghc-commits mailing list