[Git][ghc/ghc][master] Assume platforms support rpaths if they use either ELF or Mach-O
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Tue Feb 14 16:28:59 UTC 2023
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
aa3a262d by PHO at 2023-02-14T11:28:29-05:00
Assume platforms support rpaths if they use either ELF or Mach-O
Not only Linux, Darwin, and FreeBSD support rpaths. Determine the usability
of rpaths based on the object format, not on OS.
- - - - -
1 changed file:
- hadrian/src/Oracles/Setting.hs
Changes:
=====================================
hadrian/src/Oracles/Setting.hs
=====================================
@@ -272,20 +272,28 @@ anyTargetArch = matchSetting TargetArch
anyHostOs :: [String] -> Action Bool
anyHostOs = matchSetting HostOs
--- | Check whether the target OS uses the ELF object format.
-isElfTarget :: Action Bool
-isElfTarget = anyTargetOs
+-- | List of OSes that use the ELF object format.
+elfOSes :: [String]
+elfOSes =
[ "linux", "freebsd", "dragonfly", "openbsd", "netbsd", "solaris2", "kfreebsdgnu"
, "haiku", "linux-android"
]
+-- | List of OSes that use the Mach-O object format.
+machoOSes :: [String]
+machoOSes = [ "darwin" ]
+
+-- | Check whether the target OS uses the ELF object format.
+isElfTarget :: Action Bool
+isElfTarget = anyTargetOs elfOSes
+
-- | Check whether the host OS supports the @-rpath@ linker option when
-- using dynamic linking.
--
-- TODO: Windows supports lazy binding (but GHC doesn't currently support
-- dynamic way on Windows anyways).
hostSupportsRPaths :: Action Bool
-hostSupportsRPaths = anyHostOs ["linux", "darwin", "freebsd"]
+hostSupportsRPaths = anyHostOs (elfOSes ++ machoOSes)
-- | Check whether the target supports GHCi.
ghcWithInterpreter :: Action Bool
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/aa3a262d1537b30c21a8b887385cc538440e7a44
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/aa3a262d1537b30c21a8b887385cc538440e7a44
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/20230214/9fbe41df/attachment-0001.html>
More information about the ghc-commits
mailing list