Skip to content

Commit

Permalink
docs: update clang/llvm version to 17 (#10439)
Browse files Browse the repository at this point in the history
  • Loading branch information
boyer-victor authored Apr 22, 2024
1 parent 83e4aca commit 164b2f6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ endif()
# any case possible. Sorry for the complexity...
#
# Bun and WebKit must be compiled with the same compiler, so we do as much as we can to ensure that
# the compiler used for the prebuilt WebKit, LLVM 16, is the one that we detect in this process.
# the compiler used for the prebuilt WebKit is the same as we install as a dependency.
#
# It has to be done before project() is called, so that CMake doesnt pick a compiler for us, but even then
# we do some extra work afterwards to double-check, and we will rerun BUN_FIND_LLVM if the compiler did not match.
Expand Down
2 changes: 1 addition & 1 deletion docs/project/building-windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ By default, running unverified scripts are blocked.

After Visual Studio, you need the following:

- LLVM 16
- LLVM 17
- Go
- Rust
- NASM
Expand Down
13 changes: 7 additions & 6 deletions docs/project/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ $ brew install bun

## Install LLVM

Bun requires LLVM 16 and Clang 16 (`clang` is part of LLVM). This version requirement is to match WebKit (precompiled), as mismatching versions will cause memory allocation failures at runtime. In most cases, you can install LLVM through your system package manager:
Bun requires LLVM 17/Clang 17 (`clang` is part of LLVM). This version requirement is to match WebKit (precompiled), as mismatching versions will cause memory allocation failures at runtime. In most cases, you can install LLVM through your system package manager:

{% codetabs %}

Expand All @@ -63,7 +63,7 @@ $ brew install llvm@17

```bash#Ubuntu/Debian
$ # LLVM has an automatic installation script that is compatible with all versions of Ubuntu
$ wget https://apt.llvm.org/llvm.sh -O - | sudo bash -s -- 16 all
$ wget https://apt.llvm.org/llvm.sh -O - | sudo bash -s -- 17 all
```

```bash#Arch
Expand All @@ -77,31 +77,32 @@ $ sudo dnf install llvm clang lld
```

```bash#openSUSE Tumbleweed
$ sudo zypper install clang16 lld16 llvm16
$ sudo zypper install clang17 lld17 llvm17
```

{% /codetabs %}

If none of the above solutions apply, you will have to install it [manually](https://github.com/llvm/llvm-project/releases/tag/llvmorg-17.0.6).

Make sure LLVM 16 is in your path:
Make sure Clang/LLVM 17 is in your path:

```bash
$ which clang-17
```

If not, run this to manually link it:
If not, run this to manually add it:

{% codetabs %}

```bash#macOS (Homebrew)
# use fish_add_path if you're using fish
# use path+="$(brew --prefix llvm@17)/bin" if you are using zsh
$ export PATH="$(brew --prefix llvm@17)/bin:$PATH"
```

```bash#Arch
# use fish_add_path if you're using fish
$ export PATH="$PATH:/usr/lib/llvm16/bin"
$ export PATH="$PATH:/usr/lib/llvm17/bin"
```

{% /codetabs %}
Expand Down

0 comments on commit 164b2f6

Please sign in to comment.