Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

Commit

Permalink
Upgrade llvm-sys to 17.0.1
Browse files Browse the repository at this point in the history
Fixes: #431
  • Loading branch information
ksolana committed Mar 13, 2024
1 parent 8af22c3 commit 38394a1
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 12 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/llvm-ci-pre-land.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
- name: cargo clippy
run: cargo xclippy --workspace --all-targets
env:
LLVM_SYS_150_PREFIX: ${{ env.MOVE_DEV_PATH }}
LLVM_SYS_170_PREFIX: ${{ env.MOVE_DEV_PATH }}
PLATFORM_TOOLS_ROOT: ${{ env.PLATFORM_TOOLS_PATH }}
- name: cargo fmt
run: cargo xfmt --check
Expand All @@ -85,7 +85,7 @@ jobs:
- name: run Solana-based move cli tests
run: "cargo test --features solana-backend -p move-cli --test build_testsuite_solana --test move_unit_tests_solana -- --test-threads 1"
env:
LLVM_SYS_150_PREFIX: ${{ env.MOVE_DEV_PATH }}
LLVM_SYS_170_PREFIX: ${{ env.MOVE_DEV_PATH }}
MOVE_NATIVE: ${{ env.MOVE_NATIVE_PATH }}
PLATFORM_TOOLS_ROOT: ${{ env.PLATFORM_TOOLS_PATH }}

Expand All @@ -107,7 +107,7 @@ jobs:
- name: run Solana-based move stdlib tests
run: "cargo run --features solana-backend -p move-cli --bin move -- test --solana -p language/move-stdlib"
env:
LLVM_SYS_150_PREFIX: ${{ env.MOVE_DEV_PATH }}
LLVM_SYS_170_PREFIX: ${{ env.MOVE_DEV_PATH }}
MOVE_NATIVE: ${{ env.MOVE_NATIVE_PATH }}
PLATFORM_TOOLS_ROOT: ${{ env.PLATFORM_TOOLS_PATH }}

Expand All @@ -129,6 +129,6 @@ jobs:
- name: run Solana-based move unit test framework tests
run: "cargo test --features solana-backend -p move-unit-test --test move_unit_test_testsuite -- --test-threads 1"
env:
LLVM_SYS_150_PREFIX: ${{ env.MOVE_DEV_PATH }}
LLVM_SYS_170_PREFIX: ${{ env.MOVE_DEV_PATH }}
MOVE_NATIVE: ${{ env.MOVE_NATIVE_PATH }}
PLATFORM_TOOLS_ROOT: ${{ env.PLATFORM_TOOLS_PATH }}
13 changes: 10 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion language/solana/llvm-extra-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ edition = "2021"

[dependencies]
libc = "0.2"
llvm-sys = "150.0.3"
llvm-sys = "170.0.1"

[build-dependencies]
cc = "1.0.78"
Expand Down
4 changes: 2 additions & 2 deletions language/solana/llvm-extra-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ use std::{path::PathBuf, process::Command};

fn main() -> anyhow::Result<()> {
// Get the path to llvm-config from the llvm-sys crate
let llvm_config_path = std::env::var("DEP_LLVM_15_CONFIG_PATH")
.context("DEP_LLVM_15_CONFIG_PATH not set")
let llvm_config_path = std::env::var("DEP_LLVM_17_CONFIG_PATH")
.context("DEP_LLVM_17_CONFIG_PATH not set")
.context("this probably means the llvm-sys build failed")?;
let llvm_config_path = PathBuf::from(llvm_config_path);
let llvm_config = LlvmConfig::new(llvm_config_path);
Expand Down
2 changes: 1 addition & 1 deletion language/solana/move-to-solana/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ extension-trait = "1.0.1"
itertools = "0.10"
libc = "0.2"
llvm-extra-sys = { path = "../llvm-extra-sys" }
llvm-sys = "150.0.3"
llvm-sys = "170.0.1"
log = "0.4.14"
move-binary-format = { path = "../../move-binary-format" }
move-bytecode-source-map = { path = "../../move-ir-compiler/move-bytecode-source-map" }
Expand Down
2 changes: 1 addition & 1 deletion language/tools/move-mv-llvm-compiler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ move-to-solana = { path = "../../solana/move-to-solana" }
clap = { version = "3.1.8", features = ["derive"] }
#inkwell = { git = "https://github.com/TheDan64/inkwell", branch = "master", features = ["llvm14-0"] }
semver = "1.0.13"
llvm-sys = "150.0.3"
llvm-sys = "170.0.1"
llvm-extra-sys = { path = "../../solana/llvm-extra-sys" }
extension-trait = "1.0.1"
num = "0.4.0"
Expand Down
11 changes: 11 additions & 0 deletions language/tools/move-mv-llvm-compiler/docs/Administration.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,14 @@ to link issue with their PR.
[Frequently] Visit relevant move-language, sui, and aptos discord channels.

[As needed] Update solana-labs/#proj-move of major updates.

## Migration
### Toolchain migration to keep up with solana platform tools and move-dev tools

### Upgrading llvm-sys
1. create a github issue to track the progress
1. grep for all llvm-sys deps and migrate all of them at once
1. fix build errors
1. update the documentation
1. update the ci scripts
1. announce in discord

0 comments on commit 38394a1

Please sign in to comment.