a.out generated to CWD with c-sources and -shared
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
**Describe the bug**
When building a project with both `c-sources` and `ghc-options: -shared`, `a.out` is generated to the current directory instead of being dumped to `dist-newstyle/` or somewhere else not visible. Perhaps GHC needs to be passed an additional option?
Note: this happens with both cabal-install and Cabal the library, so Stack shows the same behavior. A fix should be applied to both of these places.
**To Reproduce**
Steps to reproduce the behavior:
```bash
cat > foo.cabal < Foo.hs
touch bar.c
cabal v2-build
```
Please use version-prefixed commands (e.g. `v2-build` or `v1-build`) to avoid ambiguity.
**Expected behavior**
Should not see `a.out`
**System information**
- Operating system
- Cabal: 3.10.1.0, GHC: 9.2.8
**Additional context**
Add any other context about the problem here.
Contributor guide
Assessment
This issue has not been assessed yet.