mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-20 12:29:03 +00:00
README: update build instructions
This commit is contained in:
+13
-5
@@ -114,11 +114,8 @@ You'll get an error like the following, this is expected:
|
|||||||
^~~~~~~~~~~~~~~~~~~
|
^~~~~~~~~~~~~~~~~~~
|
||||||
1 error generated.
|
1 error generated.
|
||||||
|
|
||||||
To continue, you'll need to build LLVM for Go. This will take about an hour and
|
To continue, you'll need to build LLVM. As a first step, modify
|
||||||
require a fair bit of RAM. In fact, I would recommend setting your `ld` binary
|
github.com/aykevl/llvm/bindings/go/build.sh:
|
||||||
to `gold` to speed up linking, especially on systems with less than 16GB RAM.
|
|
||||||
|
|
||||||
Also, I would recommend editing build.sh and set `cmake_flags` to:
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cmake_flags="../../../../.. $@ -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=AVR -DLLVM_LINK_LLVM_DYLIB=ON"
|
cmake_flags="../../../../.. $@ -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=AVR -DLLVM_LINK_LLVM_DYLIB=ON"
|
||||||
@@ -129,6 +126,17 @@ make sure `tinygo` links to a shared library instead of a static library,
|
|||||||
greatly improving link time on every rebuild. This is especially useful during
|
greatly improving link time on every rebuild. This is especially useful during
|
||||||
development.
|
development.
|
||||||
|
|
||||||
|
The next step is actually building LLVM. This is done by running this command
|
||||||
|
inside github.com/aykevl/llvm/bindings/go:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$ ./build.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
This will take about an hour and require a fair bit of RAM. In fact, I would
|
||||||
|
recommend setting your `ld` binary to `gold` to speed up linking, especially on
|
||||||
|
systems with less than 16GB RAM.
|
||||||
|
|
||||||
After LLVM has been built, you can run an example with:
|
After LLVM has been built, you can run an example with:
|
||||||
|
|
||||||
make run-test
|
make run-test
|
||||||
|
|||||||
Reference in New Issue
Block a user