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
# Generate Makefile using settings suitable for an experimental compiler
38
+
../rust/configure \
39
+
--enable-debug \
40
+
--disable-docs \
41
+
--enable-llvm-assertions \
42
+
--enable-debug-assertions \
43
+
--enable-optimize \
44
+
--enable-llvm-release-debuginfo \
45
+
--experimental-targets=AVR \
46
+
--prefix=/opt/avr-rust
47
+
48
+
# Build the compiler, optionally install it to /opt/avr-rust
49
+
make
50
+
make install
51
+
52
+
# Register the toolchain with rustup
53
+
rustup toolchain link avr-toolchain $(realpath $(find . -name 'stage2'))
54
+
55
+
# Optionally enable the avr toolchain globally
56
+
rustup default avr-toolchain
57
+
```
28
58
### Notes for macOS
29
59
30
60
The conventional install directory for macOS is `/usr/local/avr-rust` rather than the Linux default `/opt/avr-rust`, so before the steps below, you must:
31
61
32
-
1. Edit `build/config.toml` to set `prefix = '/usr/local/avr-rust'`.
33
-
2. Ensure `/usr/local/avr-rust` exists and has the correct permissions: `sudo mkdir /usr/local/avr-rust && sudo chown $USER:admin /usr/local/avr-rust`
62
+
1.~~Edit `build/config.toml` to set `prefix = '/usr/local/avr-rust'`.~~
63
+
2. Ensure `/usr/local/avr-rust` exists and has the correct permissions: `sudo mkdir /usr/local/avr-rust && sudo chown ${USER}:admin /usr/local/avr-rust`
34
64
35
65
Finally, `realpath` isn't included by default on macOS but is included in GNU Coreutils, so you can either `brew install coreutils` so the `rustup toolchain...` step works properly, or just use the explicit path (`rustup toolchain link avr-toolchain /usr/local/avr-rust`).
0 commit comments