Skip to content
Permalink
Browse files

main: add instructions how to build a release tarball

  • Loading branch information...
aykevl committed Feb 1, 2019
1 parent 25cd982 commit 930de54dc5696323918b28fc8c0b419ce799c139
Showing with 19 additions and 1 deletion.
  1. +19 −1 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

0 comments on commit 930de54

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.