Skip to content

Commit 930de54

Browse files
committed
main: add instructions how to build a release tarball
1 parent 25cd982 commit 930de54

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

BUILDING.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ because it is fast and works almost out of the box on Debian-based systems with
77
the right libraries installed.
88

99
This guide describes how to statically link TinyGo against LLVM, libclang and
10-
lld so that the binary can be easily moved between systems.
10+
lld so that the binary can be easily moved between systems. It also shows how to
11+
build a release tarball that includes this binary and all necessary extra files.
1112

1213
## Dependencies
1314

@@ -105,3 +106,20 @@ using `ldd` (not to be confused with `lld`):
105106
ldd ./build/tinygo
106107

107108
The result should not contain libclang or libLLVM.
109+
110+
## Make a release tarball
111+
112+
Now that we have a working static build, it's time to make a release tarball.
113+
This is just a slight change from the command to build TinyGo:
114+
115+
cd $HOME/go/src/github.com/tinygo-org/tinygo
116+
make release LLVM_BUILDDIR=$HOME/src/llvm-build CLANG_SRC=$HOME/src/llvm/tools/clang LLD_SRC=$HOME/src/llvm/tools/lld
117+
118+
The release tarball is stored in build/release.tar.gz, and can be extracted with
119+
the following command:
120+
121+
tar -xvf path/to/release.tar.gz
122+
123+
TinyGo will get extracted to a `tinygo` directory. You can then call it with:
124+
125+
./tinygo/bin/tinygo

0 commit comments

Comments
 (0)