File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,8 @@ because it is fast and works almost out of the box on Debian-based systems with
77the right libraries installed.
88
99This 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
107108The 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
You can’t perform that action at this time.
0 commit comments