mirror of
https://github.com/urbit/shrub.git
synced 2024-12-03 05:43:18 +03:00
Some preliminary work on static linking.
This commit is contained in:
parent
351eaca628
commit
e5c0174800
@ -2,6 +2,12 @@ name: king
|
||||
version: 0.1.0
|
||||
license: AGPL-3.0-only
|
||||
|
||||
flags:
|
||||
Release:
|
||||
description: "Produce statically-linked executables"
|
||||
default: false
|
||||
manual: true
|
||||
|
||||
library:
|
||||
source-dirs: lib
|
||||
ghc-options:
|
||||
@ -138,9 +144,16 @@ executables:
|
||||
main: Main.hs
|
||||
source-dirs: app
|
||||
dependencies: ["king"]
|
||||
when:
|
||||
- condition: flag(Release)
|
||||
then:
|
||||
cc-options: -static
|
||||
ld-options: -static -pthread
|
||||
else: {}
|
||||
ghc-options:
|
||||
- -threaded
|
||||
- -rtsopts
|
||||
- -static
|
||||
- -O2
|
||||
- "-with-rtsopts=-N"
|
||||
- -fwarn-incomplete-patterns
|
||||
- -O0
|
||||
|
@ -18,6 +18,10 @@ nix:
|
||||
ghc-options:
|
||||
king: -fobject-code
|
||||
|
||||
flags:
|
||||
king:
|
||||
Release: false
|
||||
|
||||
# build:
|
||||
# executable-profiling: true
|
||||
# executable-stripping: false
|
||||
|
Loading…
Reference in New Issue
Block a user