Skip to content

Instantly share code, notes, and snippets.

@christiaanb
Last active October 16, 2016 17:54
Show Gist options
  • Save christiaanb/c62b4f688aef786f00f15cbb849b3a0c to your computer and use it in GitHub Desktop.
Save christiaanb/c62b4f688aef786f00f15cbb849b3a0c to your computer and use it in GitHub Desktop.

Goal

Dynamic libraries (.so/.dll/.dylib) go into a single shared directory (per package database)

Things that need to be done

  • Split the library-dirs field of the package database into static-library-dirs and dynamic-library-dirs
  • Update Cabal and GHCs RPATH calculation mechanism to use the dynamic-library-dirs field of the package database
  • Reinvigorate haskell/cabal#3979 which adds a --dylibdir setting to Cabal, which specifies where dynamic libraries get copied
    • Update the Cabal RPATH calculation as mentioned above
    • Cabal's extralibdir configuration field gets added to both the static-library-dirs and dynamic-library-dirs fields of the package database.
@dcoutts
Copy link

dcoutts commented Oct 16, 2016

Split the library-dirs field of the package database into static-library-dirs and dynamic-library-dirs

Working on it. This bit is mostly in ghc/ghc-pkg.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment