commercialhaskell / commercialhaskell/stack

Adding --static flag for building static executables with stack?

Open
#3,420 18 comments 31 reactions 0 assignees View on GitHub
further investigation required help wanted in progress type: enhancement
Dominant language
Haskell
Stars
4.1k
Forks
850
Avg merge
10h 37m
Merged PRs (30d)
4

Description

A great question was posed in the comments to this article [https://www.fpcomplete.com/blog/2016/10/static-compilation-with-stack](https://www.fpcomplete.com/blog/2016/10/static-compilation-with-stack), although it seems to have been left unanswered.

Mainly, if it could be possible to have a `--static` flag in stack, that would set the flags necessary for building a statically linked binary, and perhaps be aware of the `crtbeginT` and suggest/link to the proposed fix.

This issue https://github.com/commercialhaskell/stack/issues/1032 which is still open, seems to be somewhat related, but has been left without any activity (except for a few semi-related comments) for quite a while.

Any thoughts if it is even feasible to begin such work?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.