Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: 0491f08a by Sylvain Henry at 2026-01-22T03:44:26-05:00 GC: don't use CAS without PARALLEL_GC on If we're not using the parallel GC, there is no reason to do a costly CAS. This was flagged as taking time in a perf profile. - - - - - 211a8f56 by Sylvain Henry at 2026-01-22T03:44:26-05:00 GC: suffix parallel GC with "par" instead of "thr" Avoid some potential confusion (see discussion in !15351). - - - - - 77a23cbd by fendor at 2026-01-22T03:45:08-05:00 Remove blanket ignore that covers libraries/ - - - - - 7bc0a3f6 by Léana Jiang at 2026-01-22T04:18:13-05:00 doc: update Flavour type in hadrian user-settings - - - - - 385ff864 by Cheng Shao at 2026-01-22T04:18:14-05:00 hadrian: add missing notCross predicate for stage0 -O0 There are a few hard-coded hadrian args that pass -O0 when compiling some heavy modules in stage0, which only makes sense when not cross-compiling and when cross-compiling we need properly optimized stage0 packages. So this patch adds the missing `notCross` predicate in those places. - - - - - 285c2c47 by Matthew Pickering at 2026-01-22T04:18:15-05:00 Fix ghc-experimental GHC.Exception.Backtrace.Experimental module This module wasn't added to the cabal file so it was never compiled or included in the library. - - - - - ba24973b by Zubin Duggal at 2026-01-22T04:18:16-05:00 hadrian: Add ghc-{experimental,internal}.cabal to the list of dependencies of the doc target We need these files to detect the version of these libraries Fixes #26738 - - - - - 12 changed files: - .gitignore - hadrian/doc/user-settings.md - hadrian/src/Rules/Documentation.hs - hadrian/src/Settings/Packages.hs - libraries/ghc-experimental/ghc-experimental.cabal.in - libraries/ghc-experimental/src/GHC/Exception/Backtrace/Experimental.hs - rts/rts.cabal - rts/sm/Evac.c - rts/sm/Evac_thr.c → rts/sm/Evac_par.c - rts/sm/Scav_thr.c → rts/sm/Scav_par.c - testsuite/tests/interface-stability/ghc-experimental-exports.stdout - testsuite/tests/interface-stability/ghc-experimental-exports.stdout-mingw32 Changes: ===================================== .gitignore ===================================== @@ -261,7 +261,7 @@ dist-newstyle/ # CI # Windows CI -toolchain/ -ghc-*/ -inplace/ -tmp/ +/toolchain/ +/ghc-*/ +/inplace/ +/tmp/ ===================================== hadrian/doc/user-settings.md ===================================== @@ -19,14 +19,18 @@ A build _flavour_ is a collection of build settings that fully define a GHC buil data Flavour = Flavour { -- | Flavour name, to select this flavour from command line. name :: String, - -- | Use these command line arguments. - args :: Args, + -- | Use these extra command line arguments. + -- This can't depend on the result of configuring a package (ie, using readContextData) + extraArgs :: Args, -- | Build these packages. packages :: Stage -> Action [Package], -- | Bignum backend: 'native', 'gmp', 'ffi', etc. bignumBackend :: String, -- | Check selected bignum backend against native backend bignumCheck :: Bool, + -- | Build the @text@ package with @simdutf@ support. Disabled by + -- default due to packaging difficulties described in #20724. + textWithSIMDUTF :: Bool, -- | Build libraries these ways. libraryWays :: Ways, -- | Build RTS these ways. @@ -45,11 +49,18 @@ data Flavour = Flavour { -- | Build the GHC executable against the threaded runtime system. ghcThreaded :: Stage -- ^ stage of the /built/ compiler -> Bool, + + ghcSplitSections :: Bool, -- ^ Whether to enable split sections -- | Whether to build docs and which ones -- (haddocks, user manual, haddock manual) ghcDocs :: Action DocTargets, + + -- | Whether to uses hashes or inplace for unit ids + hashUnitIds :: Bool, + -- | Whether to generate .hie files ghcHieFiles :: Stage -> Bool + } ``` Hadrian provides several built-in flavours (`default`, `quick`, and a few ===================================== hadrian/src/Rules/Documentation.hs ===================================== @@ -74,6 +74,8 @@ needDocDeps = do let templatedCabalFiles = map pkgCabalFile [ ghcBoot , ghcBootTh + , ghcExperimental + , ghcInternal , ghci , compiler , ghcHeap ===================================== hadrian/src/Settings/Packages.hs ===================================== @@ -53,7 +53,7 @@ packageArgs = do -- for Stage0 only so we can link ghc-pkg against it, so there is little -- reason to spend the effort to optimise it. , package cabal ? - stage0 ? builder Ghc ? arg "-O0" + andM [stage0, notCross] ? builder Ghc ? arg "-O0" ------------------------------- compiler ------------------------------- , package compiler ? mconcat @@ -71,7 +71,7 @@ packageArgs = do -- These files take a very long time to compile with -O1, -- so we use -O0 for them just in Stage0 to speed up the -- build but not affect Stage1+ executables - , inputs ["**/GHC/Hs/Instances.hs", "**/GHC/Driver/Session.hs"] ? stage0 ? + , inputs ["**/GHC/Hs/Instances.hs", "**/GHC/Driver/Session.hs"] ? andM [stage0, notCross] ? pure ["-O0"] ] , builder (Cabal Setup) ? mconcat ===================================== libraries/ghc-experimental/ghc-experimental.cabal.in ===================================== @@ -44,6 +44,7 @@ library GHC.Stats.Experimental Prelude.Experimental System.Mem.Experimental + GHC.Exception.Backtrace.Experimental if arch(wasm32) exposed-modules: GHC.Wasm.Prim other-extensions: ===================================== libraries/ghc-experimental/src/GHC/Exception/Backtrace/Experimental.hs ===================================== @@ -15,7 +15,7 @@ module GHC.Exception.Backtrace.Experimental , getBacktraceMechanismState , setBacktraceMechanismState -- * Collecting backtraces - , Backtraces(..), + , Backtraces(..) , displayBacktraces , collectBacktraces -- * Collecting exception annotations on throwing 'Exception's ===================================== rts/rts.cabal ===================================== @@ -511,7 +511,7 @@ library sm/CNF.c sm/Compact.c sm/Evac.c - sm/Evac_thr.c + sm/Evac_par.c sm/GC.c sm/GCAux.c sm/GCUtils.c @@ -526,7 +526,7 @@ library sm/NonMovingSweep.c sm/Sanity.c sm/Scav.c - sm/Scav_thr.c + sm/Scav_par.c sm/Storage.c sm/Sweep.c fs.c ===================================== rts/sm/Evac.c ===================================== @@ -498,7 +498,7 @@ evacuate_static_object (StgClosure **link_field, StgClosure *q) // See Note [STATIC_LINK fields] for how the link field bits work if (((link & STATIC_BITS) | prev_static_flag) != 3) { StgWord new_list_head = (StgWord)q | static_flag; -#if !defined(THREADED_RTS) +#if !defined(PARALLEL_GC) *link_field = gct->static_objects; gct->static_objects = (StgClosure *)new_list_head; #else ===================================== rts/sm/Evac_thr.c → rts/sm/Evac_par.c ===================================== ===================================== rts/sm/Scav_thr.c → rts/sm/Scav_par.c ===================================== ===================================== testsuite/tests/interface-stability/ghc-experimental-exports.stdout ===================================== @@ -4454,6 +4454,22 @@ module Data.Tuple.Experimental where data Unit# = ... getSolo :: forall a. Solo a -> a +module GHC.Exception.Backtrace.Experimental where + -- Safety: None + type BacktraceMechanism :: * + data BacktraceMechanism = CostCentreBacktrace | HasCallStackBacktrace | ExecutionBacktrace | IPEBacktrace + type Backtraces :: * + data Backtraces = Backtraces {btrCostCentre :: GHC.Internal.Maybe.Maybe (GHC.Internal.Ptr.Ptr GHC.Internal.Stack.CCS.CostCentreStack), btrHasCallStack :: GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.CallStack, btrExecutionStack :: GHC.Internal.Maybe.Maybe GHC.Internal.ExecutionStack.Internal.StackTrace, btrIpe :: GHC.Internal.Maybe.Maybe GHC.Internal.Stack.CloneStack.StackSnapshot} + type CollectExceptionAnnotationMechanism :: * + data CollectExceptionAnnotationMechanism = ... + collectBacktraces :: (?callStack::GHC.Internal.Stack.Types.CallStack) => GHC.Internal.Types.IO Backtraces + collectExceptionAnnotation :: GHC.Internal.Stack.Types.HasCallStack => GHC.Internal.Types.IO GHC.Internal.Exception.Context.SomeExceptionAnnotation + displayBacktraces :: Backtraces -> GHC.Internal.Base.String + getBacktraceMechanismState :: BacktraceMechanism -> GHC.Internal.Types.IO GHC.Internal.Types.Bool + getCollectExceptionAnnotationMechanism :: GHC.Internal.Types.IO CollectExceptionAnnotationMechanism + setBacktraceMechanismState :: BacktraceMechanism -> GHC.Internal.Types.Bool -> GHC.Internal.Types.IO () + setCollectExceptionAnnotation :: forall a. GHC.Internal.Exception.Context.ExceptionAnnotation a => (GHC.Internal.Stack.Types.HasCallStack => GHC.Internal.Types.IO a) -> GHC.Internal.Types.IO () + module GHC.PrimOps where -- Safety: Unsafe (*#) :: Int# -> Int# -> Int# @@ -11182,6 +11198,7 @@ instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.DoTrace -- Defined in ‘ instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.GiveGCStats -- Defined in ‘GHC.Internal.RTS.Flags’ instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.IoManagerFlag -- Defined in ‘GHC.Internal.RTS.Flags’ instance GHC.Internal.Enum.Enum GHC.Internal.IO.SubSystem.IoSubSystem -- Defined in ‘GHC.Internal.IO.SubSystem’ +instance GHC.Internal.Exception.Context.ExceptionAnnotation GHC.Internal.Exception.Backtrace.Backtraces -- Defined in ‘GHC.Internal.Exception.Backtrace’ instance forall a. GHC.Internal.Float.Floating a => GHC.Internal.Float.Floating (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. GHC.Internal.Float.RealFloat a => GHC.Internal.Float.RealFloat (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. GHC.Internal.Foreign.Storable.Storable a => GHC.Internal.Foreign.Storable.Storable (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ ===================================== testsuite/tests/interface-stability/ghc-experimental-exports.stdout-mingw32 ===================================== @@ -4454,6 +4454,22 @@ module Data.Tuple.Experimental where data Unit# = ... getSolo :: forall a. Solo a -> a +module GHC.Exception.Backtrace.Experimental where + -- Safety: None + type BacktraceMechanism :: * + data BacktraceMechanism = CostCentreBacktrace | HasCallStackBacktrace | ExecutionBacktrace | IPEBacktrace + type Backtraces :: * + data Backtraces = Backtraces {btrCostCentre :: GHC.Internal.Maybe.Maybe (GHC.Internal.Ptr.Ptr GHC.Internal.Stack.CCS.CostCentreStack), btrHasCallStack :: GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.CallStack, btrExecutionStack :: GHC.Internal.Maybe.Maybe GHC.Internal.ExecutionStack.Internal.StackTrace, btrIpe :: GHC.Internal.Maybe.Maybe GHC.Internal.Stack.CloneStack.StackSnapshot} + type CollectExceptionAnnotationMechanism :: * + data CollectExceptionAnnotationMechanism = ... + collectBacktraces :: (?callStack::GHC.Internal.Stack.Types.CallStack) => GHC.Internal.Types.IO Backtraces + collectExceptionAnnotation :: GHC.Internal.Stack.Types.HasCallStack => GHC.Internal.Types.IO GHC.Internal.Exception.Context.SomeExceptionAnnotation + displayBacktraces :: Backtraces -> GHC.Internal.Base.String + getBacktraceMechanismState :: BacktraceMechanism -> GHC.Internal.Types.IO GHC.Internal.Types.Bool + getCollectExceptionAnnotationMechanism :: GHC.Internal.Types.IO CollectExceptionAnnotationMechanism + setBacktraceMechanismState :: BacktraceMechanism -> GHC.Internal.Types.Bool -> GHC.Internal.Types.IO () + setCollectExceptionAnnotation :: forall a. GHC.Internal.Exception.Context.ExceptionAnnotation a => (GHC.Internal.Stack.Types.HasCallStack => GHC.Internal.Types.IO a) -> GHC.Internal.Types.IO () + module GHC.PrimOps where -- Safety: Unsafe (*#) :: Int# -> Int# -> Int# @@ -11185,6 +11201,7 @@ instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.DoTrace -- Defined in ‘ instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.GiveGCStats -- Defined in ‘GHC.Internal.RTS.Flags’ instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.IoManagerFlag -- Defined in ‘GHC.Internal.RTS.Flags’ instance GHC.Internal.Enum.Enum GHC.Internal.IO.SubSystem.IoSubSystem -- Defined in ‘GHC.Internal.IO.SubSystem’ +instance GHC.Internal.Exception.Context.ExceptionAnnotation GHC.Internal.Exception.Backtrace.Backtraces -- Defined in ‘GHC.Internal.Exception.Backtrace’ instance forall a. GHC.Internal.Float.Floating a => GHC.Internal.Float.Floating (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. GHC.Internal.Float.RealFloat a => GHC.Internal.Float.RealFloat (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. GHC.Internal.Foreign.Storable.Storable a => GHC.Internal.Foreign.Storable.Storable (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/4cb5b6192098e93c2fa27c667dac549... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/4cb5b6192098e93c2fa27c667dac549... You're receiving this email because of your account on gitlab.haskell.org.