ghc-lib-parser 8.10.5.20210606 → 8.10.6.20210814
raw patch · 5 files changed
+45/−40 lines, 5 filesdep −hpcPVP ok
version bump matches the API change (PVP)
Dependencies removed: hpc
API changes (from Hackage documentation)
+ DynFlags: useXLinkerRPath :: DynFlags -> OS -> Bool
Files
- compiler/main/DynFlags.hs +37/−26
- ghc-lib-parser.cabal +2/−4
- ghc-lib/stage0/lib/ghcautoconf.h +2/−2
- ghc-lib/stage0/libraries/ghc-boot/build/GHC/Version.hs +4/−4
- includes/ghcconfig.h +0/−4
compiler/main/DynFlags.hs view
@@ -235,6 +235,7 @@ -- * Linker/compiler information LinkerInfo(..), CompilerInfo(..),+ useXLinkerRPath, -- * File cleanup FilesToClean(..), emptyFilesToClean,@@ -4606,7 +4607,8 @@ Opt_ProfCountEntries, Opt_SharedImplib, Opt_SimplPreInlining,- Opt_VersionMacros+ Opt_VersionMacros,+ Opt_RPath ] ++ [f | (ns,f) <- optLevelFlags, 0 `elem` ns]@@ -4614,8 +4616,6 @@ ++ default_PIC platform - ++ default_RPath platform- ++ concatMap (wayGeneralFlags platform) (defaultWays settings) ++ validHoleFitDefaults @@ -4671,29 +4671,6 @@ -- information. _ -> [] ---- We usually want to use RPath, except on macOS (OSDarwin). On recent macOS--- versions the number of load commands we can embed in a dynamic library is--- restricted. Hence since b592bd98ff2 we rely on -dead_strip_dylib to only--- link the needed dylibs instead of linking the full dependency closure.------ If we split the library linking into injecting -rpath and -l @rpath/...--- components, we will reduce the number of libraries we link, however we will--- still inject one -rpath entry for each library, independent of their use.--- That is, we even inject -rpath values for libraries that we dead_strip in--- the end. As such we can run afoul of the load command size limit simply--- by polluting the load commands with RPATH entries.------ Thus, we disable Opt_RPath by default on OSDarwin. The savvy user can always--- enable it with -use-rpath if they so wish.------ See Note [Dynamic linking on macOS]--default_RPath :: Platform -> [GeneralFlag]-default_RPath platform | platformOS platform == OSDarwin = []-default_RPath _ = [Opt_RPath]-- -- General flags that are switched on/off when other general flags are switched -- on impliedGFlags :: [(GeneralFlag, TurnOnFlag, GeneralFlag)]@@ -5924,6 +5901,40 @@ | AppleClang51 | UnknownCC deriving Eq+++-- | Should we use `-XLinker -rpath` when linking or not?+-- See Note [-fno-use-rpaths]+useXLinkerRPath :: DynFlags -> OS -> Bool+useXLinkerRPath _ OSDarwin = False -- See Note [Dynamic linking on macOS]+useXLinkerRPath dflags _ = gopt Opt_RPath dflags++{-+Note [-fno-use-rpaths]+~~~~~~~~~~~~~~~~~~~~~~++First read, Note [Dynamic linking on macOS] to understand why on darwin we never+use `-XLinker -rpath`.++The specification of `Opt_RPath` is as follows:++The default case `-fuse-rpaths`:+* On darwin, never use `-Xlinker -rpath -Xlinker`, always inject the rpath+ afterwards, see `runInjectRPaths`. There is no way to use `-Xlinker` on darwin+ as things stand but it wasn't documented in the user guide before this patch how+ `-fuse-rpaths` should behave and the fact it was always disabled on darwin.+* Otherwise, use `-Xlinker -rpath -Xlinker` to set the rpath of the executable,+ this is the normal way you should set the rpath.++The case of `-fno-use-rpaths`+* Never inject anything into the rpath.++When this was first implemented, `Opt_RPath` was disabled on darwin, but+the rpath was still always augmented by `runInjectRPaths`, and there was no way to+stop this. This was problematic because you couldn't build an executable in CI+with a clean rpath.++-} -- ----------------------------------------------------------------------------- -- RTS hooks
ghc-lib-parser.cabal view
@@ -1,7 +1,7 @@ cabal-version: >=1.22 build-type: Simple name: ghc-lib-parser-version: 8.10.5.20210606+version: 8.10.6.20210814 license: BSD3 license-file: LICENSE category: Development@@ -43,7 +43,6 @@ ghc-lib/stage0/libraries/ghc-boot/build/GHC/Version.hs ghc-lib/stage0/compiler/build/Parser.hs ghc-lib/stage0/compiler/build/Lexer.hs- includes/ghcconfig.h includes/MachDeps.h includes/stg/MachRegs.h includes/CodeGen.Platform.hs@@ -81,8 +80,7 @@ pretty == 1.1.*, time >= 1.4 && < 1.10, transformers == 0.5.*,- process >= 1 && < 1.7,- hpc == 0.6.*+ process >= 1 && < 1.7 build-tools: alex >= 3.1, happy >= 1.19.4 other-extensions: BangPatterns
ghc-lib/stage0/lib/ghcautoconf.h view
@@ -598,10 +598,10 @@ /* #undef pid_t */ /* The maximum supported LLVM version number */-#define sUPPORTED_LLVM_VERSION_MAX (12)+#define sUPPORTED_LLVM_VERSION_MAX (13) /* The minimum supported LLVM version number */-#define sUPPORTED_LLVM_VERSION_MIN (10)+#define sUPPORTED_LLVM_VERSION_MIN (9) /* Define to `unsigned int' if <sys/types.h> does not define. */ /* #undef size_t */
ghc-lib/stage0/libraries/ghc-boot/build/GHC/Version.hs view
@@ -3,19 +3,19 @@ import Prelude -- See Note [Why do we import Prelude here?] cProjectGitCommitId :: String-cProjectGitCommitId = "a43a5650f51fdc04d757abc3d86b0a23ec518259"+cProjectGitCommitId = "f7b3359be12030d762b299681e1aeef0292417ce" cProjectVersion :: String-cProjectVersion = "8.10.5"+cProjectVersion = "8.10.6" cProjectVersionInt :: String cProjectVersionInt = "810" cProjectPatchLevel :: String-cProjectPatchLevel = "5"+cProjectPatchLevel = "6" cProjectPatchLevel1 :: String-cProjectPatchLevel1 = "5"+cProjectPatchLevel1 = "6" cProjectPatchLevel2 :: String cProjectPatchLevel2 = ""
− includes/ghcconfig.h
@@ -1,4 +0,0 @@-#pragma once--#include "ghcautoconf.h"-#include "ghcplatform.h"