File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,13 @@ flag disable-git-info
4141 -- should otherwise be avoided
4242 -- see: https://github.com/commercialhaskell/stack/issues/1425
4343
44+ flag static
45+ manual : True
46+ default : False
47+ description : Pass -static/-pthread to ghc when linking the stack binary.
48+ -- Not intended for general use. Simply makes it easier to
49+ -- build a fully static binary on Linux platforms that enable it.
50+
4451library
4552 hs-source-dirs : src/
4653 ghc-options : -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates
@@ -218,6 +225,8 @@ executable stack
218225 main-is : Main.hs
219226 ghc-options : -threaded -rtsopts -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates
220227 other-modules : Paths_stack
228+ if flag(static)
229+ ld-options : -static -pthread
221230
222231 build-depends : base >= 4.7 && < 5
223232 , bytestring >= 0.10.4.0
You can’t perform that action at this time.
0 commit comments