From ab4d7420589ad06d2eb084a787b9175d8c0e5c51 Mon Sep 17 00:00:00 2001 From: Matthew Pickering Date: Fri, 6 May 2022 15:17:11 +0100 Subject: 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. Closes #21135 (cherry picked from commit 699f593532a3cd5ca1c2fab6e6e4ce9d53be2c1f) --- hadrian/doc/flavours.md | 13 +++++++++++++ hadrian/src/Settings/Flavours/Performance.hs | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/hadrian/doc/flavours.md b/hadrian/doc/flavours.md index f0d34ddc90..9525b7bca4 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 + @@ -35,6 +36,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH @@ -46,6 +48,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH @@ -57,6 +60,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH @@ -68,6 +72,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH @@ -79,6 +84,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH @@ -90,6 +96,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH @@ -101,6 +108,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH @@ -112,6 +120,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH @@ -123,6 +132,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH @@ -134,6 +144,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH @@ -145,6 +156,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH @@ -156,6 +168,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH diff --git a/hadrian/src/Settings/Flavours/Performance.hs b/hadrian/src/Settings/Flavours/Performance.hs index fc46920703..17fb22b6ec 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 } -- cgit v1.2.1
FlavourSplit Sections Extra arguments
default
+
-O
-H32m
-O2
-H32m
quick + -O0
-H64m
-O0
-H64m
quick-validate + -O0
-H64m
-Werror
-O0
-H64m
-Werror
quick-debug + -O0
-H64m
-O0
-H64m
quickest + -O0
-H64m
-O0
-H64m
perf + Yes (on supported platforms) -O
-H64m
-O
-H64m
bench + -O
-H64m
-O
-H64m
devel1 + -O
-H64m
-O
-H64m
devel2 + -O
-H64m
-O
-H64m
validate + -O0
-H64m
-fllvm-fill-undef-with-garbage
slow-validate + -O0
-H64m
-fllvm-fill-undef-with-garbage
static + -O
-H64m
-fPIC -static
-O
-H64m
-fPIC -static