diff --git a/.github/workflows/build-revive-wasm.yml b/.github/workflows/build-revive-wasm.yml index a3bd802..394aeb1 100644 --- a/.github/workflows/build-revive-wasm.yml +++ b/.github/workflows/build-revive-wasm.yml @@ -29,24 +29,27 @@ jobs: # Use a unique key based on LLVM version or configuration files to avoid cache invalidation key: llvm-build-${{ runner.os }}-${{ hashFiles('clone-llvm.sh', 'emscripten-build-llvm.sh') }} - - name: Install Dependencies + - name: Install LLVM Dependencies if: steps.cache-llvm.outputs.cache-hit != 'true' run: | - # Install LLVM - curl -sSL --output llvm.tar.xz https://github.com/llvm/llvm-project/releases/download/llvmorg-18.1.4/clang+llvm-18.1.4-x86_64-linux-gnu-ubuntu-18.04.tar.xz - tar Jxf llvm.tar.xz - mv clang+llvm-18.1.4-x86_64-linux-gnu-ubuntu-18.04 llvm18/ - echo "$(pwd)/llvm18/bin" >> $GITHUB_PATH # wget https://cmake.org/files/v3.20/cmake-3.20.0-linux-x86_64.sh && chmod +x cmake-3.20.0-linux-x86_64.sh && ./cmake-3.20.0-linux-x86_64.sh --prefix=/usr/local --skip-license # alias cmake='/usr/local/bin/cmake' sudo apt-get update && sudo apt-get install -y cmake ninja-build - rustup target add wasm32-unknown-emscripten # Install Emscripten git clone https://github.com/emscripten-core/emsdk.git cd emsdk ./emsdk install ${{ env.EMSCRIPTEN_VERSION }} ./emsdk activate ${{ env.EMSCRIPTEN_VERSION }} + - name: Install Dependencies + run: | + rustup target add wasm32-unknown-emscripten + # Install LLVM + curl -sSL --output llvm.tar.xz https://github.com/llvm/llvm-project/releases/download/llvmorg-18.1.4/clang+llvm-18.1.4-x86_64-linux-gnu-ubuntu-18.04.tar.xz + tar Jxf llvm.tar.xz + mv clang+llvm-18.1.4-x86_64-linux-gnu-ubuntu-18.04 llvm18/ + echo "$(pwd)/llvm18/bin" >> $GITHUB_PATH + - run: | rustup show cargo --version @@ -54,6 +57,7 @@ jobs: cargo +nightly --version cmake --version bash --version + llvm-config --version - name: Build LLVM if: steps.cache-llvm.outputs.cache-hit != 'true' diff --git a/README.md b/README.md index 74ee16f..8165f3d 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ resolc --version ### LLVM -`revive` requires a build of LLVM 18.1.4 or later including `compiler-rt`. Use the provided [build-llvm.sh](build-llvm.sh) build script to compile a compatible LLVM build locally in `$PWD/llvm18.0` (don't forget to add that to `$PATH` afterwards). +`revive` requires a build of LLVM 18.1.4 or later including `compiler-rt`. Use the provided [build-llvm.sh](build-llvm.sh) build script to compile a compatible LLVM build locally in `$PWD/llvm18.0` (don't forget to add that to `$PATH` afterwards). ### Cross-compilation to WASM