Skip to content

Commit 77a73ee

Browse files
aykevldeadprogram
authored andcommitted
getting-started: fix the docs for recent Go, LLVM and Debian versions
The biggest change is that `GO111MODULE` isn't necessary anymore with a go.mod file in the root directory.
1 parent 7941d4c commit 77a73ee

File tree

2 files changed

+14
-20
lines changed

2 files changed

+14
-20
lines changed

content/getting-started/linux.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -136,17 +136,11 @@ This should allow you to compile and flash TinyGo programs on an Arduino or othe
136136

137137
***If you have already followed the "Quick Install" instructions above for your distro, you do not need to perform a source install. You are now done with the needed installation. The "Source Install" is for when you want to contribute to TinyGo.***
138138

139-
Before installing make sure that you first turn on Go modules support, like this:
139+
Start with getting the source code:
140140

141141
```shell
142-
export GO111MODULE=on
143-
```
144-
145-
Now, obtain the TinyGo source code, which should also obtain the various needed dependencies:
146-
147-
```shell
148-
go get -d -u github.com/tinygo-org/tinygo
149-
cd $(go env GOPATH)/src/github.com/tinygo-org/tinygo
142+
git clone --recursive https://github.com/tinygo-org/tinygo.git
143+
cd tinygo
150144
```
151145

152146
You now have two options: build LLVM manually or use a LLVM distributed with
@@ -161,15 +155,21 @@ different distribution, please let us know how so we can add it here.
161155

162156
For Debian and Ubuntu, you can install the binaries provided by LLVM on
163157
[apt.llvm.org](http://apt.llvm.org/). For example, the following commands can be
164-
used to install LLVM 9 on Debian Stretch:
158+
used to install LLVM 10 on Debian Buster:
165159

166160
```shell
167-
echo 'deb http://apt.llvm.org/stretch/ llvm-toolchain-stretch-10 main' | sudo tee /etc/apt/sources.list.d/llvm.list
161+
echo 'deb http://apt.llvm.org/buster/ llvm-toolchain-buster-10 main' | sudo tee /etc/apt/sources.list.d/llvm.list
168162
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
169163
sudo apt-get update
170164
sudo apt-get install clang-10 llvm-10-dev lld-10 libclang-10-dev
171165
```
172166

167+
Installing TinyGo should now be as easy as:
168+
169+
```shell
170+
go install
171+
```
172+
173173
Note that you should not use `make` when you want to build using a
174174
system-installed LLVM, just use the Go toolchain. `make` is used when you want
175175
to use a self-built LLVM.

content/getting-started/macos.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,11 @@ brew install avrdude
5757

5858
***If you have already followed the "Quick Install" instructions above, you do not need to perform a source install. You are now done with the needed installation. The "Source Install" is for when you want to contribute to TinyGo.***
5959

60-
Make sure that you first turn on Go modules support, like this:
60+
Start with getting the source code:
6161

6262
```shell
63-
export GO111MODULE=on
64-
```
65-
66-
Now, obtain the TinyGo source code, which should also obtain the various needed dependencies:
67-
68-
```shell
69-
go get -d -u github.com/tinygo-org/tinygo
70-
cd $GOPATH/src/github.com/tinygo-org/tinygo
63+
git clone --recursive https://github.com/tinygo-org/tinygo.git
64+
cd tinygo
7165
```
7266

7367
You now have two options: build LLVM manually or use LLVM from Homebrew. The

0 commit comments

Comments
 (0)