diff --git a/.github/actions/setup-deps/action.yml b/.github/actions/setup-deps/action.yml index 9fb11631..dec5ac4f 100644 --- a/.github/actions/setup-deps/action.yml +++ b/.github/actions/setup-deps/action.yml @@ -4,7 +4,7 @@ inputs: llvm-version: description: "LLVM version to install" required: true - default: "18" + default: "19" runs: using: "composite" diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 98220048..7c17724a 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -5,9 +5,9 @@ name: Go on: push: - branches: [ "**" ] + branches: ["**"] pull_request: - branches: [ "**" ] + branches: ["**"] jobs: test: @@ -17,7 +17,7 @@ jobs: os: - macos-latest - ubuntu-24.04 - llvm: [18] + llvm: [19] runs-on: ${{matrix.os}} defaults: run: @@ -38,7 +38,7 @@ jobs: - name: Set up Go uses: ./.github/actions/setup-go with: - go-version: '1.24.0' + go-version: "1.24.0" - name: Build run: go build -v ./... diff --git a/.github/workflows/llgo.yml b/.github/workflows/llgo.yml index 50756e0e..104d741b 100644 --- a/.github/workflows/llgo.yml +++ b/.github/workflows/llgo.yml @@ -5,9 +5,9 @@ name: LLGo on: push: - branches: [ "**" ] + branches: ["**"] pull_request: - branches: [ "**" ] + branches: ["**"] jobs: download-model: @@ -33,8 +33,8 @@ jobs: os: - macos-latest - ubuntu-24.04 - llvm: [18] - go: ['1.20.14', '1.21.13', '1.22.12', '1.23.6', '1.24.0'] + llvm: [19] + go: ["1.20.14", "1.21.13", "1.22.12", "1.23.6", "1.24.0"] runs-on: ${{matrix.os}} steps: - uses: actions/checkout@v4 @@ -58,7 +58,7 @@ jobs: - name: Set up Go for build uses: ./.github/actions/setup-go with: - go-version: '1.24.0' + go-version: "1.24.0" - name: Install working-directory: compiler @@ -121,8 +121,8 @@ jobs: os: - macos-latest - ubuntu-24.04 - llvm: [18] - go: ['1.24.0'] + llvm: [19] + go: ["1.24.0"] runs-on: ${{matrix.os}} steps: - uses: actions/checkout@v4 @@ -141,7 +141,7 @@ jobs: - name: Set up Go for build uses: ./.github/actions/setup-go with: - go-version: '1.24.0' + go-version: "1.24.0" - name: Install working-directory: compiler @@ -174,8 +174,8 @@ jobs: strategy: matrix: os: [ubuntu-24.04, macos-latest] - llvm: [18] - go: ['1.20.14', '1.21.13', '1.22.12', '1.23.6', '1.24.0'] + llvm: [19] + go: ["1.20.14", "1.21.13", "1.22.12", "1.23.6", "1.24.0"] runs-on: ${{matrix.os}} steps: - uses: actions/checkout@v4 @@ -187,7 +187,7 @@ jobs: - name: Set up Go 1.23 for building llgo uses: ./.github/actions/setup-go with: - go-version: '1.24.0' + go-version: "1.24.0" - name: Install llgo working-directory: compiler @@ -205,32 +205,32 @@ jobs: uses: ./.github/actions/test-helloworld with: go-version: ${{matrix.go}} - mod-version: '1.20' + mod-version: "1.20" - name: Test Hello World with go.mod 1.21 if: startsWith(matrix.go, '1.21') || startsWith(matrix.go, '1.22') || startsWith(matrix.go, '1.23') || startsWith(matrix.go, '1.24') uses: ./.github/actions/test-helloworld with: go-version: ${{matrix.go}} - mod-version: '1.21' + mod-version: "1.21" - name: Test Hello World with go.mod 1.22 if: startsWith(matrix.go, '1.22') || startsWith(matrix.go, '1.23') || startsWith(matrix.go, '1.24') uses: ./.github/actions/test-helloworld with: go-version: ${{matrix.go}} - mod-version: '1.22' + mod-version: "1.22" - name: Test Hello World with go.mod 1.23 if: startsWith(matrix.go, '1.23') || startsWith(matrix.go, '1.24') uses: ./.github/actions/test-helloworld with: go-version: ${{matrix.go}} - mod-version: '1.23' + mod-version: "1.23" - name: Test Hello World with go.mod 1.24 if: startsWith(matrix.go, '1.24') uses: ./.github/actions/test-helloworld with: go-version: ${{matrix.go}} - mod-version: '1.24' + mod-version: "1.24" diff --git a/.github/workflows/populate_darwin_sysroot.sh b/.github/workflows/populate_darwin_sysroot.sh index b9d567ad..f0eaaab4 100755 --- a/.github/workflows/populate_darwin_sysroot.sh +++ b/.github/workflows/populate_darwin_sysroot.sh @@ -6,12 +6,12 @@ TMPDIR="$(mktemp -d)" export TMPDIR trap 'rm -rf "${TMPDIR}"' EXIT -DARWIN_AMD64_LLVM_PREFIX=.sysroot/darwin/amd64/usr/local/opt/llvm@18 -DARWIN_ARM64_LLVM_PREFIX=.sysroot/darwin/arm64/opt/homebrew/opt/llvm@18 +DARWIN_AMD64_LLVM_PREFIX=.sysroot/darwin/amd64/usr/local/opt/llvm@19 +DARWIN_ARM64_LLVM_PREFIX=.sysroot/darwin/arm64/opt/homebrew/opt/llvm@19 mkdir -p "${DARWIN_AMD64_LLVM_PREFIX}" "${DARWIN_ARM64_LLVM_PREFIX}" BREW_LLVM_FORMULA_JSON="$(mktemp)" -curl -fsSL https://formulae.brew.sh/api/formula/llvm@18.json > "${BREW_LLVM_FORMULA_JSON}" +curl -fsSL https://formulae.brew.sh/api/formula/llvm@19.json > "${BREW_LLVM_FORMULA_JSON}" BREW_LLVM_AMD64_BOTTLE_URL=$(jq -r '.bottle.stable.files.sonoma.url' "${BREW_LLVM_FORMULA_JSON}") BREW_LLVM_ARM64_BOTTLE_URL=$(jq -r '.bottle.stable.files.arm64_sonoma.url' "${BREW_LLVM_FORMULA_JSON}") curl -fsSL -H "Authorization: Bearer QQ==" "${BREW_LLVM_AMD64_BOTTLE_URL}" | tar -xzf - --strip-components=2 -C "${DARWIN_AMD64_LLVM_PREFIX}" diff --git a/.github/workflows/populate_linux_sysroot.sh b/.github/workflows/populate_linux_sysroot.sh index 1bc1d935..15a7303c 100755 --- a/.github/workflows/populate_linux_sysroot.sh +++ b/.github/workflows/populate_linux_sysroot.sh @@ -19,10 +19,10 @@ export DEBIAN_FRONTEND=noninteractive apt-get update apt-get install -y lsb-release gnupg2 wget rsync -echo "deb http://apt.llvm.org/\$(lsb_release -cs)/ llvm-toolchain-\$(lsb_release -cs)-18 main" | tee /etc/apt/sources.list.d/llvm.list +echo "deb http://apt.llvm.org/\$(lsb_release -cs)/ llvm-toolchain-\$(lsb_release -cs)-19 main" | tee /etc/apt/sources.list.d/llvm.list wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - apt-get update -apt-get install -y llvm-18-dev +apt-get install -y llvm-19-dev error() { echo -e "\$1" >&2 diff --git a/.gitignore b/.gitignore index 3300f527..3d29051e 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,7 @@ _tinygo/ _output/ build.dir/ .vscode/ +.venv/ # Test binary, built with `go test -c` *.test diff --git a/README.md b/README.md index 72c49e89..2f2fa335 100644 --- a/README.md +++ b/README.md @@ -359,7 +359,7 @@ Follow these steps to generate the `llgo` command (its usage is the same as the ```sh brew update -brew install llvm@18 bdw-gc openssl cjson libffi libuv pkg-config +brew install llvm@19 bdw-gc openssl cjson libffi libuv pkg-config brew install python@3.12 # optional brew link --force libffi curl https://raw.githubusercontent.com/goplus/llgo/refs/heads/main/install.sh | bash @@ -373,12 +373,13 @@ curl https://raw.githubusercontent.com/goplus/llgo/refs/heads/main/install.sh | ```sh -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 +echo "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-19 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 -sudo apt-get install -y llvm-18-dev clang-18 libclang-18-dev lld-18 pkg-config libgc-dev libssl-dev zlib1g-dev libcjson-dev libsqlite3-dev libunwind-dev libuv1-dev +sudo apt-get install -y llvm-19-dev clang-19 libclang-19-dev lld-19 pkg-config libgc-dev libssl-dev zlib1g-dev libcjson-dev libsqlite3-dev libunwind-dev libuv1-dev sudo apt-get install -y python3.12-dev # optional curl https://raw.githubusercontent.com/goplus/llgo/refs/heads/main/install.sh | bash + ``` #### Alpine Linux diff --git a/doc/_readme/scripts/install_macos.sh b/doc/_readme/scripts/install_macos.sh index a850fcea..6258bed8 100644 --- a/doc/_readme/scripts/install_macos.sh +++ b/doc/_readme/scripts/install_macos.sh @@ -1,6 +1,6 @@ # shellcheck disable=all brew update -brew install llvm@18 bdw-gc openssl cjson libffi libuv pkg-config +brew install llvm@19 bdw-gc openssl cjson libffi libuv pkg-config brew install python@3.12 # optional brew link --force libffi curl https://raw.githubusercontent.com/goplus/llgo/refs/heads/main/install.sh | bash diff --git a/doc/_readme/scripts/install_ubuntu.sh b/doc/_readme/scripts/install_ubuntu.sh index e379f998..9fa854b9 100644 --- a/doc/_readme/scripts/install_ubuntu.sh +++ b/doc/_readme/scripts/install_ubuntu.sh @@ -1,7 +1,7 @@ # shellcheck disable=all -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 +echo "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-19 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 -sudo apt-get install -y llvm-18-dev clang-18 libclang-18-dev lld-18 pkg-config libgc-dev libssl-dev zlib1g-dev libcjson-dev libsqlite3-dev libunwind-dev libuv1-dev +sudo apt-get install -y llvm-19-dev clang-19 libclang-19-dev lld-19 pkg-config libgc-dev libssl-dev zlib1g-dev libcjson-dev libsqlite3-dev libunwind-dev libuv1-dev sudo apt-get install -y python3.12-dev # optional curl https://raw.githubusercontent.com/goplus/llgo/refs/heads/main/install.sh | bash