Build shared libraries without any dynamic dependencies
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
Currently library targets in Cabal are built with ghc flags "-shared" and "-dynamic". This makes perfect sense when building packages which will be used in further Haskell projects. However when building a library to subsequently be used in a different language environment then it is very convenient to build a library which is dynamically loadable but does not itself have any dynamic dependencies, i.e., all of its dependencies are statically linked. GHC achieves this conveniently with "-shared" "-static" flags.
Currently however there does not seem to be a mixture of options that will make Cabal issue this set of flags to GHC.
Contributor guide
Research direction
Start by tracing how Cabal library targets translate build options into GHC flags, focusing on the handling of shared and dynamic linking. Review any existing coverage for library linking, then define completion as a way for a library target to emit "-shared" and "-static" so its dependencies are statically linked, with regression coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100