mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 15:21:12 +00:00
Update macOS installation instructions
This commit is contained in:
parent
8e19b8ecbb
commit
c090e1729b
1 changed files with 5 additions and 19 deletions
|
@ -54,13 +54,15 @@ If you want to install it manually, you can also download Zig directly [here](ht
|
||||||
### LLVM
|
### LLVM
|
||||||
**version: 12.0.x**
|
**version: 12.0.x**
|
||||||
|
|
||||||
|
For macOS, you can install LLVM 12 using `brew install llvm@12` and then adding
|
||||||
|
`/usr/local/opt/llvm/bin` to your `PATH`. You can confirm this worked by
|
||||||
|
running `llc --version` - it should mention "LLVM version 12.0.0" at the top.
|
||||||
|
|
||||||
For Ubuntu and Debian, you can use the `Automatic installation script` at [apt.llvm.org](https://apt.llvm.org):
|
For Ubuntu and Debian, you can use the `Automatic installation script` at [apt.llvm.org](https://apt.llvm.org):
|
||||||
```
|
```
|
||||||
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
|
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
|
||||||
```
|
```
|
||||||
|
|
||||||
For macOS, check the troubleshooting section below.
|
|
||||||
|
|
||||||
There are also plenty of alternative options at http://releases.llvm.org/download.html
|
There are also plenty of alternative options at http://releases.llvm.org/download.html
|
||||||
|
|
||||||
## Using Nix
|
## Using Nix
|
||||||
|
@ -143,31 +145,15 @@ If you encounter `cannot find -lz` run `sudo apt install zlib1g-dev`.
|
||||||
|
|
||||||
### LLVM installation on macOS
|
### LLVM installation on macOS
|
||||||
|
|
||||||
By default homebrew will try to install llvm 11, which is currently
|
If installing LLVM fails, it might help to run `sudo xcode-select -r` before installing again.
|
||||||
unsupported. You need to install an older version (10.0.0_3) by doing:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ brew edit llvm
|
|
||||||
|
|
||||||
# Replace the contents of the file with https://raw.githubusercontent.com/Homebrew/homebrew-core/6616d50fb0b24dbe30f5e975210bdad63257f517/Formula/llvm.rb
|
|
||||||
|
|
||||||
# we expect llvm-as-10 to be present
|
|
||||||
$ ln -s /usr/local/opt/llvm/bin/{llvm-as,llvm-as-10}
|
|
||||||
|
|
||||||
# "pinning" ensures that homebrew doesn't update it automatically
|
|
||||||
$ brew pin llvm
|
|
||||||
```
|
|
||||||
|
|
||||||
It might also be useful to add these exports to your shell:
|
It might also be useful to add these exports to your shell:
|
||||||
|
|
||||||
```
|
```
|
||||||
export PATH="/usr/local/opt/llvm/bin:$PATH"
|
|
||||||
export LDFLAGS="-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib"
|
export LDFLAGS="-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib"
|
||||||
export CPPFLAGS="-I/usr/local/opt/llvm/include"
|
export CPPFLAGS="-I/usr/local/opt/llvm/include"
|
||||||
```
|
```
|
||||||
|
|
||||||
If installing LLVM still fails, it might help to run `sudo xcode-select -r` before installing again.
|
|
||||||
|
|
||||||
### LLVM installation on Windows
|
### LLVM installation on Windows
|
||||||
|
|
||||||
Installing LLVM's prebuilt binaries doesn't seem to be enough for the `llvm-sys` crate that Roc depends on, so I had to build LLVM from source
|
Installing LLVM's prebuilt binaries doesn't seem to be enough for the `llvm-sys` crate that Roc depends on, so I had to build LLVM from source
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue