llvm: default to LLVM 18
This commit is contained in:
18
README.md
18
README.md
@@ -251,9 +251,9 @@ Here are the Go packages that can be imported correctly:
|
||||
## Dependencies
|
||||
|
||||
- [Go 1.20+](https://go.dev) (build only)
|
||||
- [LLVM 17](https://llvm.org)
|
||||
- [LLD 17](https://lld.llvm.org)
|
||||
- [Clang 17](https://clang.llvm.org)
|
||||
- [LLVM 18](https://llvm.org)
|
||||
- [LLD 18](https://lld.llvm.org)
|
||||
- [Clang 18](https://clang.llvm.org)
|
||||
- [pkg-config 0.29+](https://www.freedesktop.org/wiki/Software/pkg-config/)
|
||||
- [bdwgc/libgc 8.0+](https://www.hboehm.info/gc/)
|
||||
- [cJSON 1.7+](https://github.com/DaveGamble/cJSON) (optional, for [github.com/goplus/llgo/c/cjson](https://pkg.go.dev/github.com/goplus/llgo/c/cjson))
|
||||
@@ -268,10 +268,9 @@ Follow these steps to generate the `llgo` command (its usage is the same as the
|
||||
|
||||
```sh
|
||||
brew update # execute if needed
|
||||
brew install llvm@17 pkg-config libgc
|
||||
brew install llvm@18 pkg-config libgc
|
||||
brew install cjson sqlite python@3.12 # optional
|
||||
export PATH=$(brew --prefix llvm@17)/bin:$PATH # you may want to add this to your shell RC file, e.g. ~/.zshrc
|
||||
export CC=clang CXX=clang++ # only for go build; optional if you have other compatible compilers
|
||||
export PATH=$(brew --prefix llvm@18)/bin:$PATH # you may want to add this to your shell RC file, e.g. ~/.zshrc
|
||||
git clone https://github.com/goplus/llgo.git
|
||||
cd llgo
|
||||
export LLGOROOT="/path/to/llgo" # Replace this with the root directory of the llgo project
|
||||
@@ -281,13 +280,12 @@ go install -v ./...
|
||||
### on Linux (Debian/Ubuntu)
|
||||
|
||||
```sh
|
||||
echo "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-17 main" | sudo tee /etc/apt/sources.list.d/llvm.list
|
||||
echo "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-18 main" | sudo tee /etc/apt/sources.list.d/llvm.list
|
||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
||||
sudo apt-get update # execute if needed
|
||||
sudo apt-get install -y llvm-17-dev clang-17 lld-17 pkg-config libgc-dev
|
||||
sudo apt-get install -y llvm-18-dev clang-18 lld-18 pkg-config libgc-dev
|
||||
sudo apt-get install -y libcjson-dev libsqlite3-dev python3.12-dev # optional
|
||||
export PATH=/usr/lib/llvm-17/bin:$PATH # you may want to add this to your shell RC file, e.g. ~/.bashrc
|
||||
export CC=clang CXX=clang++ # only for go build; optional if you have other compatible compilers
|
||||
export PATH=/usr/lib/llvm-18/bin:$PATH # you may want to add this to your shell RC file, e.g. ~/.bashrc
|
||||
git clone https://github.com/goplus/llgo.git
|
||||
cd llgo
|
||||
export LLGOROOT="/path/to/llgo" # Replace this with the root directory of the llgo project
|
||||
|
||||
Reference in New Issue
Block a user