Building a DLL causes cabal to build every module twice.
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
Consider the following cabal file:
```
cabal-version: >=1.10
name: bug
version: 0.1.0.0
license-file: LICENSE
build-type: Simple
extra-source-files: CHANGELOG.md
foreign-library bug
type: native-shared
options: standalone
other-modules: Lib
build-depends: base
c-sources: wrapper.c
default-language: Haskell2010
```
This file is similar to the ones provided by the user guides.
By default, cabal first builds the modules, _builds the same modules again_, and then links.
Inserting `ghc-options: -fPIC` into the file mitigates this issue.
Tested with cabal 3.2.0.0 and ghc 8.10.1.
Contributor guide
Assessment
This issue has not been assessed yet.