diff options
author | Ayke van Laethem <[email protected]> | 2019-02-01 13:05:08 +0100 |
---|---|---|
committer | Ayke van Laethem <[email protected]> | 2019-02-01 13:26:32 +0100 |
commit | 930de54dc5696323918b28fc8c0b419ce799c139 (patch) | |
tree | bc078c37c586f7b3832f1f283a380ab73df32957 /BUILDING.md | |
parent | 25cd98226399922f6586515ee3d69592633725a7 (diff) | |
download | tinygo-930de54dc5696323918b28fc8c0b419ce799c139.tar.gz tinygo-930de54dc5696323918b28fc8c0b419ce799c139.zip |
main: add instructions how to build a release tarballv0.1
Diffstat (limited to 'BUILDING.md')
-rw-r--r-- | BUILDING.md | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/BUILDING.md b/BUILDING.md index 55b9f74d6..d50eb28a2 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -7,7 +7,8 @@ because it is fast and works almost out of the box on Debian-based systems with the right libraries installed. This guide describes how to statically link TinyGo against LLVM, libclang and -lld so that the binary can be easily moved between systems. +lld so that the binary can be easily moved between systems. It also shows how to +build a release tarball that includes this binary and all necessary extra files. ## Dependencies @@ -105,3 +106,20 @@ using `ldd` (not to be confused with `lld`): ldd ./build/tinygo The result should not contain libclang or libLLVM. + +## Make a release tarball + +Now that we have a working static build, it's time to make a release tarball. +This is just a slight change from the command to build TinyGo: + + cd $HOME/go/src/github.com/tinygo-org/tinygo + make release LLVM_BUILDDIR=$HOME/src/llvm-build CLANG_SRC=$HOME/src/llvm/tools/clang LLD_SRC=$HOME/src/llvm/tools/lld + +The release tarball is stored in build/release.tar.gz, and can be extracted with +the following command: + + tar -xvf path/to/release.tar.gz + +TinyGo will get extracted to a `tinygo` directory. You can then call it with: + + ./tinygo/bin/tinygo |