[Git][ghc/ghc][wip/9.4.8-backports] 4 commits: hadrian: Add no_split_sections tranformer
Zubin (@wz1000)
gitlab at gitlab.haskell.org
Mon Nov 6 19:14:08 UTC 2023
Zubin pushed to branch wip/9.4.8-backports at Glasgow Haskell Compiler / GHC
Commits:
938f48dc by Matthew Pickering at 2023-11-07T00:43:55+05:30
hadrian: Add no_split_sections tranformer
This transformer reverts the effect of `split_sections`, which we intend
to use for platforms which don't support split sections.
In order to achieve this we have to modify the implemntation of the
split_sections transformer to store whether we are enabling
split_sections directly in the `Flavour` definition. This is because
otherwise there's no convenient way to turn off split_sections due to
having to pass additional linker scripts when merging objects.
(cherry picked from commit fec6638e2468c78f136f2363d8b3239a9bfd4f91)
- - - - -
85835aca by Matthew Pickering at 2023-11-07T00:43:55+05:30
packaging: Build perf builds with -split-sections
In 8f71d958 the make build system was made to use split-sections on
linux systems but it appears this logic never made it to hadrian.
There is the split_sections flavour transformer but this doesn't appear
to be used for perf builds on linux.
This is disbled on deb9 and windows due to #21670
Closes #21135
(cherry picked from commit be9dd9b03479070ba6387c251541f4569392c4bb)
- - - - -
bf8fd7c8 by Zubin Duggal at 2023-11-07T00:43:55+05:30
Prepare release 9.4.8
- - - - -
d06c456e by Cheng Shao at 2023-11-07T00:43:55+05:30
testsuite: add the req_process predicate
This patch adds the req_process predicate to the testsuite to assert
the platform has a process model, also marking tests that involve
spawning processes as req_process. Also bumps hpc & process submodule.
(cherry picked from commit ce580426ce3052e3b3d2847d0312652ea9087994)
- - - - -
17 changed files:
- .gitlab/gen_ci.hs
- .gitlab/jobs.yaml
- configure.ac
- docs/users_guide/9.4.7-notes.rst
- + docs/users_guide/9.4.8-notes.rst
- docs/users_guide/release-notes.rst
- hadrian/doc/flavours.md
- hadrian/hadrian.cabal
- hadrian/src/Flavour.hs
- hadrian/src/Flavour/Type.hs
- + hadrian/src/Settings/Builders/SplitSections.hs
- hadrian/src/Settings/Default.hs
- hadrian/src/Settings/Flavours/Performance.hs
- libraries/base/base.cabal
- libraries/base/changelog.md
- testsuite/driver/testglobals.py
- testsuite/driver/testlib.py
Changes:
=====================================
.gitlab/gen_ci.hs
=====================================
@@ -119,6 +119,7 @@ data BuildConfig
, fullyStatic :: Bool
, tablesNextToCode :: Bool
, threadSanitiser :: Bool
+ , noSplitSections :: Bool
}
-- Extra arguments to pass to ./configure due to the BuildConfig
@@ -134,13 +135,14 @@ mkJobFlavour BuildConfig{..} = Flavour buildFlavour opts
opts = [Llvm | llvmBootstrap] ++
[Dwarf | withDwarf] ++
[FullyStatic | fullyStatic] ++
- [ThreadSanitiser | threadSanitiser]
+ [ThreadSanitiser | threadSanitiser] ++
+ [NoSplitSections | noSplitSections, buildFlavour == Release ]
data Flavour = Flavour BaseFlavour [FlavourTrans]
-data FlavourTrans = Llvm | Dwarf | FullyStatic | ThreadSanitiser
+data FlavourTrans = Llvm | Dwarf | FullyStatic | ThreadSanitiser | NoSplitSections
-data BaseFlavour = Release | Validate | SlowValidate
+data BaseFlavour = Release | Validate | SlowValidate deriving Eq
-----------------------------------------------------------------------------
-- Build Configs
@@ -159,8 +161,12 @@ vanilla = BuildConfig
, fullyStatic = False
, tablesNextToCode = True
, threadSanitiser = False
+ , noSplitSections = False
}
+splitSectionsBroken :: BuildConfig -> BuildConfig
+splitSectionsBroken bc = bc { noSplitSections = True }
+
nativeInt :: BuildConfig
nativeInt = vanilla { bignumBackend = Native }
@@ -267,6 +273,7 @@ flavourString (Flavour base trans) = baseString base ++ concatMap (("+" ++) . fl
flavourString Dwarf = "debug_info"
flavourString FullyStatic = "fully_static"
flavourString ThreadSanitiser = "thread_sanitizer"
+ flavourString NoSplitSections = "no_split_sections"
-- The path to the docker image (just for linux builders)
dockerImage :: Arch -> Opsys -> Maybe String
@@ -771,9 +778,9 @@ jobs = M.fromList $ concatMap flattenJobGroup $
, disableValidate (standardBuilds Amd64 (Linux Debian11))
-- We still build Deb9 bindists for now due to Ubuntu 18 and Linux Mint 19
-- not being at EOL until April 2023 and they still need tinfo5.
- , disableValidate (standardBuilds Amd64 (Linux Debian9))
+ , disableValidate (standardBuildsWithConfig Amd64 (Linux Debian9) (splitSectionsBroken vanilla))
, disableValidate (standardBuilds Amd64 (Linux Ubuntu2004))
- , disableValidate (standardBuilds Amd64 (Linux Centos7))
+ , disableValidate (standardBuildsWithConfig Amd64 (Linux Centos7) (splitSectionsBroken vanilla))
-- Fedora33 job is always built with perf so there's one job in the normal
-- validate pipeline which is built with perf.
, (standardBuildsWithConfig Amd64 (Linux Fedora33) releaseConfig)
@@ -781,16 +788,16 @@ jobs = M.fromList $ concatMap flattenJobGroup $
-- This job is only for generating head.hackage docs
, hackage_doc_job (disableValidate (standardBuildsWithConfig Amd64 (Linux Fedora33) releaseConfig))
, disableValidate (standardBuildsWithConfig Amd64 (Linux Fedora33) dwarf)
- , fastCI (standardBuilds Amd64 Windows)
+ , fastCI (standardBuildsWithConfig Amd64 Windows vanilla)
, disableValidate (standardBuildsWithConfig Amd64 Windows nativeInt)
, standardBuilds Amd64 Darwin
, allowFailureGroup (addValidateRule FreeBSDLabel (standardBuilds Amd64 FreeBSD13))
, standardBuilds AArch64 Darwin
, standardBuilds AArch64 (Linux Debian10)
, allowFailureGroup (addValidateRule ARMLabel (standardBuilds ARMv7 (Linux Debian10)))
- , standardBuilds I386 (Linux Debian9)
+ , standardBuildsWithConfig I386 (Linux Debian9) (splitSectionsBroken vanilla)
-- Fully static build, in theory usable on any linux distribution.
- , allowFailureGroup (fullyStaticBrokenTests (standardBuildsWithConfig Amd64 (Linux Alpine) static))
+ , allowFailureGroup (fullyStaticBrokenTests (standardBuildsWithConfig Amd64 (Linux Alpine) (splitSectionsBroken static)))
, disableValidate (fullyStaticBrokenTests (allowFailureGroup (standardBuildsWithConfig Amd64 (Linux Alpine) staticNativeInt)))
-- Dynamically linked build, suitable for building your own static executables on alpine
, disableValidate (standardBuildsWithConfig Amd64 (Linux Alpine) vanilla)
=====================================
.gitlab/jobs.yaml
=====================================
@@ -2057,7 +2057,7 @@
"XZ_OPT": "-9"
}
},
- "release-i386-linux-deb9-release": {
+ "release-i386-linux-deb9-release+no_split_sections": {
"after_script": [
".gitlab/ci.sh save_cache",
".gitlab/ci.sh clean",
@@ -2067,7 +2067,7 @@
"artifacts": {
"expire_in": "1 year",
"paths": [
- "ghc-i386-linux-deb9-release.tar.xz",
+ "ghc-i386-linux-deb9-release+no_split_sections.tar.xz",
"junit.xml"
],
"reports": {
@@ -2109,11 +2109,11 @@
],
"variables": {
"BIGNUM_BACKEND": "gmp",
- "BIN_DIST_NAME": "ghc-i386-linux-deb9-release",
- "BUILD_FLAVOUR": "release",
+ "BIN_DIST_NAME": "ghc-i386-linux-deb9-release+no_split_sections",
+ "BUILD_FLAVOUR": "release+no_split_sections",
"CONFIGURE_ARGS": "",
"IGNORE_PERF_FAILURES": "all",
- "TEST_ENV": "i386-linux-deb9-release",
+ "TEST_ENV": "i386-linux-deb9-release+no_split_sections",
"XZ_OPT": "-9"
}
},
@@ -2371,7 +2371,7 @@
"XZ_OPT": "-9"
}
},
- "release-x86_64-linux-alpine3_12-release+fully_static": {
+ "release-x86_64-linux-alpine3_12-release+fully_static+no_split_sections": {
"after_script": [
".gitlab/ci.sh save_cache",
".gitlab/ci.sh clean",
@@ -2381,7 +2381,7 @@
"artifacts": {
"expire_in": "1 year",
"paths": [
- "ghc-x86_64-linux-alpine3_12-release+fully_static.tar.xz",
+ "ghc-x86_64-linux-alpine3_12-release+fully_static+no_split_sections.tar.xz",
"junit.xml"
],
"reports": {
@@ -2423,18 +2423,18 @@
],
"variables": {
"BIGNUM_BACKEND": "gmp",
- "BIN_DIST_NAME": "ghc-x86_64-linux-alpine3_12-release+fully_static",
+ "BIN_DIST_NAME": "ghc-x86_64-linux-alpine3_12-release+fully_static+no_split_sections",
"BROKEN_TESTS": "ghcilink002 encoding004 T10458 linker_unload_native",
- "BUILD_FLAVOUR": "release+fully_static",
+ "BUILD_FLAVOUR": "release+fully_static+no_split_sections",
"CONFIGURE_ARGS": "--disable-ld-override ",
"HADRIAN_ARGS": "--docs=no-sphinx",
"IGNORE_PERF_FAILURES": "all",
"INSTALL_CONFIGURE_ARGS": "--disable-ld-override",
- "TEST_ENV": "x86_64-linux-alpine3_12-release+fully_static",
+ "TEST_ENV": "x86_64-linux-alpine3_12-release+fully_static+no_split_sections",
"XZ_OPT": "-9"
}
},
- "release-x86_64-linux-centos7-release": {
+ "release-x86_64-linux-centos7-release+no_split_sections": {
"after_script": [
".gitlab/ci.sh save_cache",
".gitlab/ci.sh clean",
@@ -2444,7 +2444,7 @@
"artifacts": {
"expire_in": "1 year",
"paths": [
- "ghc-x86_64-linux-centos7-release.tar.xz",
+ "ghc-x86_64-linux-centos7-release+no_split_sections.tar.xz",
"junit.xml"
],
"reports": {
@@ -2486,12 +2486,12 @@
],
"variables": {
"BIGNUM_BACKEND": "gmp",
- "BIN_DIST_NAME": "ghc-x86_64-linux-centos7-release",
- "BUILD_FLAVOUR": "release",
+ "BIN_DIST_NAME": "ghc-x86_64-linux-centos7-release+no_split_sections",
+ "BUILD_FLAVOUR": "release+no_split_sections",
"CONFIGURE_ARGS": "",
"HADRIAN_ARGS": "--docs=no-sphinx",
"IGNORE_PERF_FAILURES": "all",
- "TEST_ENV": "x86_64-linux-centos7-release",
+ "TEST_ENV": "x86_64-linux-centos7-release+no_split_sections",
"XZ_OPT": "-9"
}
},
@@ -2675,7 +2675,7 @@
"XZ_OPT": "-9"
}
},
- "release-x86_64-linux-deb9-release": {
+ "release-x86_64-linux-deb9-release+no_split_sections": {
"after_script": [
".gitlab/ci.sh save_cache",
".gitlab/ci.sh clean",
@@ -2685,7 +2685,7 @@
"artifacts": {
"expire_in": "1 year",
"paths": [
- "ghc-x86_64-linux-deb9-release.tar.xz",
+ "ghc-x86_64-linux-deb9-release+no_split_sections.tar.xz",
"junit.xml"
],
"reports": {
@@ -2727,11 +2727,11 @@
],
"variables": {
"BIGNUM_BACKEND": "gmp",
- "BIN_DIST_NAME": "ghc-x86_64-linux-deb9-release",
- "BUILD_FLAVOUR": "release",
+ "BIN_DIST_NAME": "ghc-x86_64-linux-deb9-release+no_split_sections",
+ "BUILD_FLAVOUR": "release+no_split_sections",
"CONFIGURE_ARGS": "",
"IGNORE_PERF_FAILURES": "all",
- "TEST_ENV": "x86_64-linux-deb9-release",
+ "TEST_ENV": "x86_64-linux-deb9-release+no_split_sections",
"XZ_OPT": "-9"
}
},
=====================================
configure.ac
=====================================
@@ -13,7 +13,7 @@ dnl
# see what flags are available. (Better yet, read the documentation!)
#
-AC_INIT([The Glorious Glasgow Haskell Compilation System], [9.4.7], [glasgow-haskell-bugs at haskell.org], [ghc-AC_PACKAGE_VERSION])
+AC_INIT([The Glorious Glasgow Haskell Compilation System], [9.4.8], [glasgow-haskell-bugs at haskell.org], [ghc-AC_PACKAGE_VERSION])
# Version on master must be X.Y (not X.Y.Z) for ProjectVersionMunged variable
# to be useful (cf #19058). However, the version must have three components
# (X.Y.Z) on stable branches (e.g. ghc-9.2) to ensure that pre-releases are
=====================================
docs/users_guide/9.4.7-notes.rst
=====================================
@@ -1,4 +1,4 @@
-.. _release-9-4-6:
+.. _release-9-4-7:
Version 9.4.7
==============
=====================================
docs/users_guide/9.4.8-notes.rst
=====================================
@@ -0,0 +1,99 @@
+.. _release-9-4-8:
+
+Version 9.4.8
+==============
+
+The significant changes to the various parts of the compiler are listed in the
+following sections.
+
+The :ghc-flag:`LLVM backend <-fllvm>` of this release is to be used with LLVM
+10, 11, 12, 13, or 14.
+
+Significant Changes
+~~~~~~~~~~~~~~~~~~~~
+
+Issues fixed in this release include:
+
+Compiler
+--------
+
+- Fix a recompilation checking bug where GHC may miss changes in transitive
+ dependencies when deciding to relink a program (:ghc-ticket:`23724`).
+- Fix a compiler panic resulting from incorrect eta-reduction of join points
+ (:ghc-ticket:`23922`).
+- Fix a code generator bug on AArch64 platforms resulting in invalid conditional
+ jumps (:ghc-ticket:`23746`).
+- Improve STG code generation in certain scenarios (:ghc-ticket:`23783`).
+- Fix a bug where we could silently truncate 64 bit values to 32 bit on
+ 32 bit architectures.
+- Fix ``-split-sections`` on Windows (:ghc-ticket:`22834`).
+
+Runtime system
+--------------
+
+- Remove an assertion prone to race conditions (:ghc-ticket:`22563`).
+- Fix some crashes and loops with the non-moving GC (:ghc-ticket:`24042, :ghc-ticket:`23003`).
+- Properly escape characters when writing JSON profiles (``-pJ``) (:ghc-ticket:`23924`).
+
+Build system and packaging
+--------------------------
+
+- Ensure ``-split-sections`` is enabled while building binary distributions for
+ all platforms where this is supported (:ghc-ticket:`21135`).
+- Make the configure script use ``AC_PATH_TOOL`` instead of ``AC_PATH_PROG`` to
+ detect tools, making cross-compilation easier (:ghc-ticket:`21601`).
+- Fix a bug where ``-DNOSMP`` wasn't being passed to the C compiler even if the
+ target doesn't support SMP (:ghc-ticket:`24082`).
+
+Core libraries
+--------------
+
+- Bump ``base`` to 4.17.2.1
+- Bump ``bytestring`` to 0.11.5.3
+- Bump ``process`` to 1.6.18.0
+
+Included libraries
+------------------
+
+The package database provided with this distribution also contains a number of
+packages other than GHC itself. See the changelogs provided with these packages
+for further change information.
+
+.. ghc-package-list::
+
+ libraries/array/array.cabal: Dependency of ``ghc`` library
+ libraries/base/base.cabal: Core library
+ libraries/binary/binary.cabal: Dependency of ``ghc`` library
+ libraries/bytestring/bytestring.cabal: Dependency of ``ghc`` library
+ libraries/Cabal/Cabal/Cabal.cabal: Dependency of ``ghc-pkg`` utility
+ libraries/Cabal/Cabal-syntax/Cabal-syntax.cabal: Dependency of ``ghc-pkg`` utility
+ libraries/containers/containers/containers.cabal: Dependency of ``ghc`` library
+ libraries/deepseq/deepseq.cabal: Dependency of ``ghc`` library
+ libraries/directory/directory.cabal: Dependency of ``ghc`` library
+ libraries/exceptions/exceptions.cabal: Dependency of ``ghc`` and ``haskeline`` library
+ libraries/filepath/filepath.cabal: Dependency of ``ghc`` library
+ compiler/ghc.cabal: The compiler itself
+ libraries/ghci/ghci.cabal: The REPL interface
+ libraries/ghc-boot/ghc-boot.cabal: Internal compiler library
+ libraries/ghc-boot-th/ghc-boot-th.cabal: Internal compiler library
+ libraries/ghc-compact/ghc-compact.cabal: Core library
+ libraries/ghc-heap/ghc-heap.cabal: GHC heap-walking library
+ libraries/ghc-prim/ghc-prim.cabal: Core library
+ libraries/haskeline/haskeline.cabal: Dependency of ``ghci`` executable
+ libraries/hpc/hpc.cabal: Dependency of ``hpc`` executable
+ libraries/integer-gmp/integer-gmp.cabal: Core library
+ libraries/libiserv/libiserv.cabal: Internal compiler library
+ libraries/mtl/mtl.cabal: Dependency of ``Cabal`` library
+ libraries/parsec/parsec.cabal: Dependency of ``Cabal`` library
+ libraries/pretty/pretty.cabal: Dependency of ``ghc`` library
+ libraries/process/process.cabal: Dependency of ``ghc`` library
+ libraries/stm/stm.cabal: Dependency of ``haskeline`` library
+ libraries/template-haskell/template-haskell.cabal: Core library
+ libraries/terminfo/terminfo.cabal: Dependency of ``haskeline`` library
+ libraries/text/text.cabal: Dependency of ``Cabal`` library
+ libraries/time/time.cabal: Dependency of ``ghc`` library
+ libraries/transformers/transformers.cabal: Dependency of ``ghc`` library
+ libraries/unix/unix.cabal: Dependency of ``ghc`` library
+ libraries/Win32/Win32.cabal: Dependency of ``ghc`` library
+ libraries/xhtml/xhtml.cabal: Dependency of ``haddock`` executable
+
=====================================
docs/users_guide/release-notes.rst
=====================================
@@ -4,6 +4,7 @@ Release notes
.. toctree::
:maxdepth: 1
+ 9.4.8-notes
9.4.7-notes
9.4.6-notes
9.4.5-notes
=====================================
hadrian/doc/flavours.md
=====================================
@@ -15,6 +15,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH
<table>
<tr>
<th rowspan="3">Flavour</th>
+ <th rowspan="3">Split Sections</th>
<th colspan="8">Extra arguments</th>
</tr>
<tr>
@@ -35,6 +36,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH
</tr>
<tr>
<th>default<br></td>
+ <td> </td>
<td>-O<br>-H32m<br></td>
<td>-O2<br>-H32m</td>
<td></td>
@@ -46,6 +48,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH
</tr>
<tr>
<th>quick</td>
+ <td> </td>
<td>-O0<br>-H64m</td>
<td>-O0<br>-H64m</td>
<td></td>
@@ -57,6 +60,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH
</tr>
<tr>
<th>quick-validate</td>
+ <td></td>
<td>-O0<br>-H64m<br>-Werror</td>
<td>-O0<br>-H64m<br>-Werror</td>
<td></td>
@@ -68,6 +72,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH
</tr>
<tr>
<th>quick-debug</td>
+ <td></td>
<td>-O0<br>-H64m</td>
<td>-O0<br>-H64m</td>
<td></td>
@@ -79,6 +84,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH
</tr>
<tr>
<th>quickest</td>
+ <td></td>
<td>-O0<br>-H64m</td>
<td>-O0<br>-H64m</td>
<td></td>
@@ -90,6 +96,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH
</tr>
<tr>
<th>perf</td>
+ <td> Yes (on supported platforms) </td>
<td>-O<br>-H64m</td>
<td>-O<br>-H64m</td>
<td></td>
@@ -113,6 +120,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH
</tr>
<tr>
<th>bench</td>
+ <td></td>
<td>-O<br>-H64m</td>
<td>-O<br>-H64m</td>
<td></td>
@@ -124,6 +132,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH
</tr>
<tr>
<th>devel1</td>
+ <td></td>
<td>-O<br>-H64m</td>
<td>-O<br>-H64m</td>
<td></td>
@@ -135,6 +144,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH
</tr>
<tr>
<th>devel2</td>
+ <td></td>
<td>-O<br>-H64m</td>
<td>-O<br>-H64m</td>
<td></td>
@@ -146,6 +156,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH
</tr>
<tr>
<th>validate</td>
+ <td></td>
<td>-O0<br>-H64m</td>
<td>-fllvm-fill-undef-with-garbage</td>
<td></td>
@@ -157,6 +168,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH
</tr>
<tr>
<th>slow-validate</td>
+ <td></td>
<td>-O0<br>-H64m</td>
<td>-fllvm-fill-undef-with-garbage</td>
<td></td>
@@ -168,6 +180,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH
</tr>
<tr>
<th>static</td>
+ <td></td>
<td>-O<br>-H64m<br>-fPIC -static</td>
<td>-O<br>-H64m<br>-fPIC -static</td>
<td></td>
@@ -217,6 +230,10 @@ The supported transformers are listed below:
<td>Enable section splitting for all libraries (except for the GHC
library due to the long linking times that this causes).</td>
</tr>
+ <tr>
+ <td><code>no_split_sections</code></td>
+ <td>Disable section splitting for all libraries.</td>
+ </tr>
<tr>
<td><code>thread_sanitizer</code></td>
<td>Build the runtime system with ThreadSanitizer support</td>
=====================================
hadrian/hadrian.cabal
=====================================
@@ -112,6 +112,7 @@ executable hadrian
, Settings.Builders.Ld
, Settings.Builders.Make
, Settings.Builders.MergeObjects
+ , Settings.Builders.SplitSections
, Settings.Builders.RunTest
, Settings.Builders.Win32Tarballs
, Settings.Builders.Xelatex
=====================================
hadrian/src/Flavour.hs
=====================================
@@ -5,7 +5,7 @@ module Flavour
-- * Flavour transformers
, flavourTransformers
, addArgs
- , splitSections, splitSectionsIf
+ , splitSections
, enableThreadSanitizer
, enableDebugInfo, enableTickyGhc
, viaLlvmBackend
@@ -31,7 +31,6 @@ import Text.Parsec.Combinator as P
import Text.Parsec.Char as P
import Control.Monad.Except
import UserSettings
-import Oracles.Setting
flavourTransformers :: Map String (Flavour -> Flavour)
@@ -40,6 +39,7 @@ flavourTransformers = M.fromList
, "debug_info" =: enableDebugInfo
, "ticky_ghc" =: enableTickyGhc
, "split_sections" =: splitSections
+ , "no_split_sections" =: noSplitSections
, "thread_sanitizer" =: enableThreadSanitizer
, "llvm" =: viaLlvmBackend
, "profiled_ghc" =: enableProfiledGhc
@@ -142,27 +142,13 @@ enableHaddock =
]
-- | Transform the input 'Flavour' so as to build with
--- @-split-sections@ whenever appropriate. You can
--- select which package gets built with split sections
--- by passing a suitable predicate. If the predicate holds
--- for a given package, then @split-sections@ is used when
--- building it. Note that this transformer doesn't do anything
+-- @-split-sections@ whenever appropriate.
+-- Note that this transformer doesn't do anything
-- on darwin because on darwin platforms we always enable subsections
-- via symbols.
-splitSectionsIf :: (Package -> Bool) -> Flavour -> Flavour
-splitSectionsIf pkgPredicate = addArgs $ do
- pkg <- getPackage
- osx <- expr isOsxTarget
- not osx ? -- osx doesn't support split sections
- pkgPredicate pkg ? -- Only apply to these packages
- builder (Ghc CompileHs) ? arg "-split-sections"
-
--- | Like 'splitSectionsIf', but with a fixed predicate: use
--- split sections for all packages but the GHC library.
-splitSections :: Flavour -> Flavour
-splitSections = splitSectionsIf (/=ghc)
--- Disable section splitting for the GHC library. It takes too long and
--- there is little benefit.
+splitSections, noSplitSections :: Flavour -> Flavour
+splitSections f = f { ghcSplitSections = True }
+noSplitSections f = f { ghcSplitSections = False }
enableThreadSanitizer :: Flavour -> Flavour
enableThreadSanitizer = addArgs $ mconcat
=====================================
hadrian/src/Flavour/Type.hs
=====================================
@@ -38,6 +38,7 @@ data Flavour = Flavour {
ghcDebugAssertions :: Bool,
-- | Build the GHC executable against the threaded runtime system.
ghcThreaded :: Bool,
+ ghcSplitSections :: Bool, -- ^ Whether to enable split sections
-- | Whether to build docs and which ones
-- (haddocks, user manual, haddock manual)
ghcDocs :: Action DocTargets }
=====================================
hadrian/src/Settings/Builders/SplitSections.hs
=====================================
@@ -0,0 +1,36 @@
+-- | Settings required when split-sections is enabled.
+module Settings.Builders.SplitSections where
+
+import Expression
+import Packages
+import Settings
+import Flavour.Type
+
+import Oracles.Setting
+
+-- | Does it make sense to enable or disable split sections?
+splitSectionsArgs :: Args
+splitSectionsArgs = do
+ pkg <- getPackage
+ osx <- expr isOsxTarget
+ notSt0 <- notStage0
+ flav <- expr flavour
+ if ( ghcSplitSections flav
+ -- Flavour enables split-sections
+ && not osx
+ -- OS X doesn't support split sections
+ && notSt0
+ -- Disable for stage 0 because we aren't going to ship
+ -- the resulting binaries and consequently there is no
+ -- reason to minimize size.
+ && (pkg /= ghc)
+ -- Disable section splitting for the GHC library.
+ -- It takes too long and there is little benefit.
+ ) then
+ ( mconcat
+ [ builder (Ghc CompileHs) ? arg "-split-sections"
+ , builder MergeObjects ? ifM (expr isWinTarget)
+ (pure ["-t", "driver/utils/merge_sections_pe.ld"])
+ (pure ["-t", "driver/utils/merge_sections.ld"])
+ ]
+ ) else mempty
=====================================
hadrian/src/Settings/Default.hs
=====================================
@@ -39,6 +39,7 @@ import Settings.Builders.Ar
import Settings.Builders.Ld
import Settings.Builders.Make
import Settings.Builders.MergeObjects
+import Settings.Builders.SplitSections
import Settings.Builders.RunTest
import Settings.Builders.Xelatex
import Settings.Packages
@@ -245,6 +246,7 @@ defaultFlavour = Flavour
, ghcDebugged = False
, ghcDebugAssertions = False
, ghcThreaded = True
+ , ghcSplitSections = False
, ghcDocs = cmdDocsArgs }
-- | Default logic for determining whether to build
@@ -281,6 +283,7 @@ defaultBuilderArgs = mconcat
, validateBuilderArgs
, xelatexBuilderArgs
, win32TarballsArgs
+ , splitSectionsArgs
-- Generic builders from the Hadrian library:
, builder (Sphinx HtmlMode ) ? Hadrian.Builder.Sphinx.args HtmlMode
, builder (Sphinx LatexMode) ? Hadrian.Builder.Sphinx.args LatexMode
=====================================
hadrian/src/Settings/Flavours/Performance.hs
=====================================
@@ -6,7 +6,7 @@ import {-# SOURCE #-} Settings.Default
-- Please update doc/flavours.md when changing this file.
performanceFlavour :: Flavour
-performanceFlavour = defaultFlavour
+performanceFlavour = splitSections $ defaultFlavour
{ name = "perf"
, args = defaultBuilderArgs <> performanceArgs <> defaultPackageArgs }
=====================================
libraries/base/base.cabal
=====================================
@@ -1,6 +1,6 @@
cabal-version: 3.0
name: base
-version: 4.17.2.0
+version: 4.17.2.1
-- NOTE: Don't forget to update ./changelog.md
license: BSD-3-Clause
=====================================
libraries/base/changelog.md
=====================================
@@ -1,5 +1,11 @@
# Changelog for [`base` package](http://hackage.haskell.org/package/base)
+## 4.17.2.1 *November 2023*
+
+ * Add missing int64/word64-to-double/float rules ([CLC Proposal #203](https://github.com/haskell/core-libraries-committee/issues/203))
+
+ * Improve String & IsString documentation.
+
## 4.17.2.0 *August 2023*
* Restore `mingwex` dependency on Windows (#23309).
=====================================
testsuite/driver/testglobals.py
=====================================
@@ -134,6 +134,8 @@ class TestConfig:
# Do we have interpreter support?
self.have_interp = False
+ # Do we even have processes?
+ self.have_process = True
# Does the platform support loading of dynamic shared libraries? e.g.
# some musl-based environments do not.
self.supports_dynamic_libs = True
=====================================
testsuite/driver/testlib.py
=====================================
@@ -274,6 +274,9 @@ def req_smp( name, opts ):
if not config.have_smp:
opts.expect = 'fail'
+def req_process( name, opts ):
+ if not config.have_process:
+ opts.skip = True
def ignore_stdout(name, opts):
opts.ignore_stdout = True
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/cb149c64b0c0349671ba0a3363edb95455a25051...d06c456e6e812656a8fa52fb624129b2c0f09b0e
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/cb149c64b0c0349671ba0a3363edb95455a25051...d06c456e6e812656a8fa52fb624129b2c0f09b0e
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/20231106/3a7ea521/attachment-0001.html>
More information about the ghc-commits
mailing list