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.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/docs/guides/build.md
+21-5Lines changed: 21 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,27 +35,43 @@ You need to build LLVM manually in the following cases:
35
35
36
36
Using a system-installed version of LLVM depends on your system, of course.
37
37
38
-
For Debian or Ubuntu you can install LLVM by adding a new apt repository (please replace `buster` with the appropriate codename). For more information about this method, see [apt.llvm.org](https://apt.llvm.org/).
38
+
For **Debian** or **Ubuntu** you can install LLVM by adding a new apt repository. For more information about this method, see [apt.llvm.org](https://apt.llvm.org/). *Before copying the command below, please replace `xxxxx` with your distribution's codename*.
39
+
40
+
| Distro | Version | Codename |
41
+
|--------|------- |-----------|
42
+
| Ubuntu | 18.04 |`bionic`|
43
+
| Ubuntu | 20.04 |`focal`|
44
+
| Ubuntu | 20.10 |`groovy`|
45
+
| Ubuntu | 21.04 |`hirsute`|
46
+
| Debian | 10 |`buster`|
47
+
| Debian | 11 |`bullseye`|
48
+
| Debian | sid |`unstable`|
39
49
40
50
```shell
41
-
echo'deb http://apt.llvm.org/buster/ llvm-toolchain-buster-11 main'| sudo tee /etc/apt/sources.list.d/llvm.list
51
+
echo'deb http://apt.llvm.org/xxxxx/ llvm-toolchain-xxxxx-11 main'| sudo tee /etc/apt/sources.list.d/llvm.list
52
+
```
53
+
54
+
After adding the apt repository for your distribution you may install the LLVM toolchain packages:
For MacOS, you can install LLVM through [Homebrew](https://formulae.brew.sh/formula/llvm). The Clang/LLVM version from Apple is not supported by TinyGo.
62
+
For **MacOS**, you can install LLVM through [Homebrew](https://formulae.brew.sh/formula/llvm). The Clang/LLVM version from Apple is not supported by TinyGo.
48
63
49
64
```shell
50
65
brew install llvm@11
51
66
```
52
67
53
-
After LLVM has been installed, installing TinyGo should be as easy as running the following command:
68
+
After LLVM has been installed, installing TinyGo should be as easy as running the following command (cgo must be enabled so that the compile does not fail):
54
69
55
70
```shell
56
-
go install
71
+
CGO_ENABLED=1 go install
57
72
```
58
73
74
+
59
75
Note that you should not use `make` when you want to build using a system-installed LLVM, just use the Go toolchain. `make` is used when you want to use a self-built LLVM, as in the next section.
60
76
61
77
If you have gotten this far, please skip over to [Additional requirements](#additional-requirements) below to further set up TinyGo.
0 commit comments