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
andextra-libraries-static
. This has been done. -
Introduce library-dirs-static
andextra-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)