aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2019-02-01 13:05:08 +0100
committerAyke van Laethem <[email protected]>2019-02-01 13:26:32 +0100
commit930de54dc5696323918b28fc8c0b419ce799c139 (patch)
treebc078c37c586f7b3832f1f283a380ab73df32957
parent25cd98226399922f6586515ee3d69592633725a7 (diff)
downloadtinygo-930de54dc5696323918b28fc8c0b419ce799c139.tar.gz
tinygo-930de54dc5696323918b28fc8c0b419ce799c139.zip
main: add instructions how to build a release tarballv0.1
-rw-r--r--BUILDING.md20
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