Skip to content

Wire up library-dirs-static and extra-libraries-static in GHC

With the new fields library-dirs-static and extra-libraries-static InstalledPackageInfo supports a way to specify libraries for static linking separately from extra-libraries/library-dirs. This allows us to switch smoothly between dynamic and static linking of system libraries.

Cabal and cabal-install already do the right thing and populate the new fields when using pkg-config-depends.

What's left is the GHC side of things:

  • Bump GHC's Cabal dependency to support library-dirs-static and extra-libraries-static. This has been done.
  • Introduce library-dirs-static and extra-libraries-static to ghc-pkg
  • When statically linking an executable consult above fields for extra libraries to link (instead of always consulting extra-libraries/library-dirs as we do now)
Edited by Alex Biehl
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information