diff options
-rw-r--r-- | .gitlab-ci.yml | 4 | ||||
-rwxr-xr-x | .gitlab/gen_ci.hs | 25 | ||||
-rw-r--r-- | .gitlab/jobs.yaml | 60 | ||||
-rw-r--r-- | compiler/GHC/Driver/Session.hs | 2 | ||||
-rw-r--r-- | hadrian/doc/flavours.md | 13 | ||||
-rw-r--r-- | hadrian/src/Settings/Flavours/Performance.hs | 2 |
6 files changed, 63 insertions, 43 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 18b9f00531..6a046205af 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -500,7 +500,7 @@ doc-tarball: optional: true - job: nightly-x86_64-windows-validate optional: true - - job: release-x86_64-windows-release + - job: release-x86_64-windows-release+no_split_sections optional: true tags: @@ -524,7 +524,7 @@ doc-tarball: || mv "ghc-x86_64-linux-deb10-release.tar.xz" "$LINUX_BINDIST" \ || true mv "ghc-x86_64-windows-validate.tar.xz" "$WINDOWS_BINDIST" \ - || mv "ghc-x86_64-windows-release.tar.xz" "$WINDOWS_BINDIST" \ + || mv "ghc-x86_64-windows-release+no_split_sections.tar.xz" "$WINDOWS_BINDIST" \ || true if [ ! -f "$LINUX_BINDIST" ]; then echo "Error: $LINUX_BINDIST does not exist. Did the Debian 9 job fail?" diff --git a/.gitlab/gen_ci.hs b/.gitlab/gen_ci.hs index 2e927f4f26..b9c809b271 100755 --- a/.gitlab/gen_ci.hs +++ b/.gitlab/gen_ci.hs @@ -130,6 +130,7 @@ data BuildConfig , fullyStatic :: Bool , tablesNextToCode :: Bool , threadSanitiser :: Bool + , noSplitSections :: Bool } -- Extra arguments to pass to ./configure due to the BuildConfig @@ -146,13 +147,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 @@ -174,8 +176,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 } @@ -290,6 +296,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 @@ -792,24 +799,24 @@ jobs = Map.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) -- 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) - , disableValidate (standardBuildsWithConfig Amd64 Windows nativeInt) + , fastCI (standardBuildsWithConfig Amd64 Windows (splitSectionsBroken vanilla)) + , disableValidate (standardBuildsWithConfig Amd64 Windows (splitSectionsBroken nativeInt)) , standardBuilds Amd64 Darwin , allowFailureGroup (addValidateRule FreeBSDLabel (standardBuilds Amd64 FreeBSD13)) , standardBuilds AArch64 Darwin , standardBuilds AArch64 (Linux Debian10) , disableValidate (standardBuildsWithConfig AArch64 (Linux Debian10) llvm) - , standardBuilds I386 (Linux Debian9) - , standardBuildsWithConfig Amd64 (Linux Alpine) static + , standardBuildsWithConfig I386 (Linux Debian9) (splitSectionsBroken vanilla) + , standardBuildsWithConfig Amd64 (Linux Alpine) (splitSectionsBroken static) , disableValidate (allowFailureGroup (standardBuildsWithConfig Amd64 (Linux Alpine) staticNativeInt)) , validateBuilds Amd64 (Linux Debian11) (crossConfig "aarch64-linux-gnu" (Emulator "qemu-aarch64 -L /usr/aarch64-linux-gnu") Nothing) , validateBuilds Amd64 (Linux Debian11) (crossConfig "js-unknown-ghcjs" NoEmulatorNeeded (Just "emconfigure") diff --git a/.gitlab/jobs.yaml b/.gitlab/jobs.yaml index c9b72f24d0..53f689bcdf 100644 --- a/.gitlab/jobs.yaml +++ b/.gitlab/jobs.yaml @@ -2046,7 +2046,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", @@ -2056,7 +2056,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": { @@ -2098,11 +2098,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" } }, @@ -2297,7 +2297,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", @@ -2307,7 +2307,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": { @@ -2349,18 +2349,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": "encoding004 T10458 ghcilink002 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", @@ -2370,7 +2370,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": { @@ -2412,12 +2412,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" } }, @@ -2601,7 +2601,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", @@ -2611,7 +2611,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": { @@ -2653,11 +2653,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" } }, @@ -2908,7 +2908,7 @@ "XZ_OPT": "-9" } }, - "release-x86_64-windows-int_native-release": { + "release-x86_64-windows-int_native-release+no_split_sections": { "after_script": [ "bash .gitlab/ci.sh save_cache", "bash .gitlab/ci.sh clean" @@ -2917,7 +2917,7 @@ "artifacts": { "expire_in": "1 year", "paths": [ - "ghc-x86_64-windows-int_native-release.tar.xz", + "ghc-x86_64-windows-int_native-release+no_split_sections.tar.xz", "junit.xml" ], "reports": { @@ -2955,8 +2955,8 @@ ], "variables": { "BIGNUM_BACKEND": "native", - "BIN_DIST_NAME": "ghc-x86_64-windows-int_native-release", - "BUILD_FLAVOUR": "release", + "BIN_DIST_NAME": "ghc-x86_64-windows-int_native-release+no_split_sections", + "BUILD_FLAVOUR": "release+no_split_sections", "CABAL_INSTALL_VERSION": "3.2.0.0", "CONFIGURE_ARGS": "", "GHC_VERSION": "9.2.2", @@ -2964,11 +2964,11 @@ "IGNORE_PERF_FAILURES": "all", "LANG": "en_US.UTF-8", "MSYSTEM": "MINGW64", - "TEST_ENV": "x86_64-windows-int_native-release", + "TEST_ENV": "x86_64-windows-int_native-release+no_split_sections", "XZ_OPT": "-9" } }, - "release-x86_64-windows-release": { + "release-x86_64-windows-release+no_split_sections": { "after_script": [ "bash .gitlab/ci.sh save_cache", "bash .gitlab/ci.sh clean" @@ -2977,7 +2977,7 @@ "artifacts": { "expire_in": "1 year", "paths": [ - "ghc-x86_64-windows-release.tar.xz", + "ghc-x86_64-windows-release+no_split_sections.tar.xz", "junit.xml" ], "reports": { @@ -3015,8 +3015,8 @@ ], "variables": { "BIGNUM_BACKEND": "gmp", - "BIN_DIST_NAME": "ghc-x86_64-windows-release", - "BUILD_FLAVOUR": "release", + "BIN_DIST_NAME": "ghc-x86_64-windows-release+no_split_sections", + "BUILD_FLAVOUR": "release+no_split_sections", "CABAL_INSTALL_VERSION": "3.2.0.0", "CONFIGURE_ARGS": "", "GHC_VERSION": "9.2.2", @@ -3024,7 +3024,7 @@ "IGNORE_PERF_FAILURES": "all", "LANG": "en_US.UTF-8", "MSYSTEM": "MINGW64", - "TEST_ENV": "x86_64-windows-release", + "TEST_ENV": "x86_64-windows-release+no_split_sections", "XZ_OPT": "-9" } }, diff --git a/compiler/GHC/Driver/Session.hs b/compiler/GHC/Driver/Session.hs index 07106c7c8c..ad71ee27a0 100644 --- a/compiler/GHC/Driver/Session.hs +++ b/compiler/GHC/Driver/Session.hs @@ -4799,7 +4799,7 @@ makeDynFlagsConsistent dflags | gopt Opt_SplitSections dflags , platformHasSubsectionsViaSymbols (targetPlatform dflags) - = let dflags' = gopt_unuset dflags Opt_SplitSections + = let dflags' = gopt_unset dflags Opt_SplitSections warn = "-fsplit-sections is not useful on this platform " ++ "since it uses subsections-via-symbols. Ignoring." in loop dflags' warn diff --git a/hadrian/doc/flavours.md b/hadrian/doc/flavours.md index af94fde32f..1b052266b4 100644 --- a/hadrian/doc/flavours.md +++ b/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> @@ -112,6 +119,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> @@ -123,6 +131,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> @@ -134,6 +143,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> @@ -145,6 +155,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> @@ -156,6 +167,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> @@ -167,6 +179,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> diff --git a/hadrian/src/Settings/Flavours/Performance.hs b/hadrian/src/Settings/Flavours/Performance.hs index 21de3c72fe..a856bc9d17 100644 --- a/hadrian/src/Settings/Flavours/Performance.hs +++ b/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 } |