diff options
Diffstat (limited to 'hadrian/src/Oracles/Setting.hs')
-rw-r--r-- | hadrian/src/Oracles/Setting.hs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/hadrian/src/Oracles/Setting.hs b/hadrian/src/Oracles/Setting.hs index 5197b8ea54..02ac42e0c9 100644 --- a/hadrian/src/Oracles/Setting.hs +++ b/hadrian/src/Oracles/Setting.hs @@ -3,7 +3,7 @@ module Oracles.Setting ( getSettingList, anyTargetPlatform, anyTargetOs, anyTargetArch, anyHostOs, ghcWithInterpreter, ghcEnableTablesNextToCode, useLibFFIForAdjustors, ghcCanonVersion, cmdLineLengthLimit, iosHost, osxHost, windowsHost, - topDirectory, libsuf + hostSupportsRPaths, topDirectory, libsuf ) where import Hadrian.Expression @@ -166,6 +166,14 @@ iosHost = anyHostOs ["ios"] osxHost :: Action Bool osxHost = anyHostOs ["darwin"] +-- | 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"] + -- | Check whether the host OS setting is set to @"mingw32"@ or @"cygwin32"@. windowsHost :: Action Bool windowsHost = anyHostOs ["mingw32", "cygwin32"] |