From 0e182841322f67cef7e03a9b266759d426a9ba4c Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sun, 4 Feb 2024 14:26:20 +0100 Subject: haskellPackages.mkDerivation: pass -split-sections when cross-compiling This works around #286285 by passing --enable-split-sections instead of ghc-options. --- pkgs/development/haskell-modules/generic-builder.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'pkgs/development/haskell-modules') diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix index a248b5b11b22..b772dc434e60 100644 --- a/pkgs/development/haskell-modules/generic-builder.nix +++ b/pkgs/development/haskell-modules/generic-builder.nix @@ -238,8 +238,7 @@ let (enableFeature doBenchmark "benchmarks") "--enable-library-vanilla" # TODO: Should this be configurable? (enableFeature enableLibraryForGhci "library-for-ghci") - ] ++ optionals (enableDeadCodeElimination) [ - "--ghc-option=-split-sections" + (enableFeature enableDeadCodeElimination "split-sections") ] ++ optionals dontStrip [ "--disable-library-stripping" "--disable-executable-stripping" -- cgit 1.4.1