Clearer docs for building
Summary: Per title. Reviewed By: fabiomassimo Differential Revision: D28284707 fbshipit-source-id: 60dde8653acd6bc05a570d622490f4632fc9f59a
This commit is contained in:
committed by
Facebook GitHub Bot
parent
0df76e7267
commit
df369f426f
@@ -54,3 +54,43 @@ can be quite effective in reducing it:
|
||||
build:
|
||||
split-objs: true
|
||||
```
|
||||
|
||||
## Updating the binaries
|
||||
|
||||
The platform-specific binaries in the parent directory (`bump.lnx64` and `bump.mac`)
|
||||
need to be manually updated after every change to the source here.
|
||||
|
||||
To do this, first build the binary for Mac:
|
||||
|
||||
```
|
||||
stack build
|
||||
cp .stack-work/install/x86_64-osx/<build_id>/8.6.5/bin/bump ../bump.mac
|
||||
```
|
||||
|
||||
(The build ID is printed as part of the stack build run.)
|
||||
|
||||
Then, add this to the options from above to produce static binaries on Linux
|
||||
(otherwise, there's a good chance Sandcastle won't run it). The binary section
|
||||
should then look like this:
|
||||
|
||||
*package.yaml*
|
||||
```diff
|
||||
diff --git a/xplat/sonar/scripts/bump/package.yaml b/xplat/sonar/scripts/bump/package.yaml
|
||||
--- a/xplat/sonar/scripts/bump/package.yaml
|
||||
+++ b/xplat/sonar/scripts/bump/package.yaml
|
||||
@@ -12,3 +12,4 @@
|
||||
bump:
|
||||
source-dirs: .
|
||||
main: bump.hs
|
||||
+ ghc-options: -optl-static -optl-pthread -fPIC
|
||||
|
||||
```
|
||||
|
||||
With the docker daemon running, execute:
|
||||
|
||||
```
|
||||
stack build --docker
|
||||
cp .stack-work/install/x86_64-linux-<image_id>/<build_id>/8.6.5/bin/bump ../bump.lnx64
|
||||
```
|
||||
|
||||
Commit the changes, done.
|
||||
|
||||
Reference in New Issue
Block a user