Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove custom LLVM version because latest Substrate doesn't need it, work around substrate-wasm-builder issue with newer LLVM #2555

Merged
merged 1 commit into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 6 additions & 26 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,23 +66,13 @@ jobs:
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # @v3.1.0

# On macOS, we need a proper Clang version, not Apple's custom version without wasm32 support
# TODO: on macOS, the consensus/domain runtime build is not compatible with LLVM 15.0.7 and
# LLVM 15.0.{3, 4, 5, 6} is not released for macOS thus install LLVM 15.0.2 explicitly as a
# temporary workaround, and remove once incompatible is fixed.
- name: Install LLVM and Clang for macOS
uses: KyleMayes/install-llvm-action@c135b3937686fd69c2651507aabc9925a8f9eee8 # v1.8.3
uses: KyleMayes/install-llvm-action@be40c5af3a4adc3e4a03199995ab73aa37536712 # v1.9.0
with:
version: "15.0.2"
# TODO: Switch to LLVM 17 on arm64 runners once https://github.com/KyleMayes/install-llvm-action/issues/61 is resolved
version: 15.0.7
if: runner.os == 'macOS'

# TODO: on Linux and Windows, the consensus/domain runtime build is not compatible with LLVM 16,
# thus install LLVM 15 explicitly as a temporary workaround, and remove once incompatible is fixed.
- name: Install LLVM and Clang for Linux and Windows
uses: KyleMayes/install-llvm-action@c135b3937686fd69c2651507aabc9925a8f9eee8 # v1.8.3
with:
version: "15.0"
if: runner.os != 'macOS'

# TODO: Workaround for https://github.com/actions/runner-images/issues/9290
- name: Install glibtoolize (macOS)
run: brew install libtool
Expand Down Expand Up @@ -157,23 +147,13 @@ jobs:
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # @v3.1.0

# On macOS, we need a proper Clang version, not Apple's custom version without wasm32 support
# TODO: on macOS, the consensus/domain runtime build is not compatible with LLVM 15.0.7 and
# LLVM 15.0.{3, 4, 5, 6} is not released for macOS thus install LLVM 15.0.2 explicitly as a
# temporary workaround, and remove once incompatible is fixed.
- name: Install LLVM and Clang for macOS
uses: KyleMayes/install-llvm-action@c135b3937686fd69c2651507aabc9925a8f9eee8 # v1.8.3
uses: KyleMayes/install-llvm-action@be40c5af3a4adc3e4a03199995ab73aa37536712 # v1.9.0
with:
version: "15.0.2"
# TODO: Switch to LLVM 17 on arm64 runners once https://github.com/KyleMayes/install-llvm-action/issues/61 is resolved
version: 15.0.7
if: runner.os == 'macOS'

# TODO: on Linux and Windows, the consensus/domain runtime build is not compatible with LLVM 16,
# thus install LLVM 15 explicitly as a temporary workaround, and remove once incompatible is fixed.
- name: Install LLVM and Clang for Linux and Windows
uses: KyleMayes/install-llvm-action@c135b3937686fd69c2651507aabc9925a8f9eee8 # v1.8.3
with:
version: "15.0"
if: runner.os != 'macOS'

# TODO: Workaround for https://github.com/actions/runner-images/issues/9290
- name: Install glibtoolize (macOS)
run: brew install libtool
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/rustdoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@ jobs:
- name: Checkout repository
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # @v3.1.0

# TODO: on Linux and Windows, LLVM 16 is not compatible with the consensus/domain runtime build
# thus install LLVM 15 explicitly as a temporary workaround, and remove once it is fixed.
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@c135b3937686fd69c2651507aabc9925a8f9eee8 # v1.8.3
with:
version: "15.0"

- name: Install Protoc
uses: arduino/setup-protoc@9b1ee5b22b0a3f1feb8c2ff99b32c89b3c3191e9 # v2.0.0
with:
Expand Down
16 changes: 3 additions & 13 deletions .github/workflows/snapshot-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,23 +135,13 @@ jobs:
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # @v3.1.0

# On macOS, we need a proper Clang version, not Apple's custom version without wasm32 support
# TODO: on macOS, the consensus/domain runtime build is not compatible with LLVM 15.0.7 and
# LLVM 15.0.{3, 4, 5, 6} is not released for macOS thus install LLVM 15.0.2 explicitly as a
# temporary workaround, and remove once incompatible is fixed.
- name: Install LLVM and Clang for macOS
uses: KyleMayes/install-llvm-action@c135b3937686fd69c2651507aabc9925a8f9eee8 # v1.8.3
uses: KyleMayes/install-llvm-action@be40c5af3a4adc3e4a03199995ab73aa37536712 # v1.9.0
with:
version: "15.0.2"
# TODO: Switch to LLVM 17 on arm64 runners once https://github.com/KyleMayes/install-llvm-action/issues/61 is resolved
version: 15.0.7
if: runner.os == 'macOS'

# TODO: on Linux and Windows, the consensus/domain runtime build is not compatible with LLVM 16,
# thus install LLVM 15 explicitly as a temporary workaround, and remove once incompatible is fixed.
- name: Install LLVM and Clang for Linux and Windows
uses: KyleMayes/install-llvm-action@c135b3937686fd69c2651507aabc9925a8f9eee8 # v1.8.3
with:
version: "15.0"
if: runner.os != 'macOS'

# TODO: Workaround for https://github.com/actions/runner-images/issues/9290
- name: Install glibtoolize (macOS)
run: brew install libtool
Expand Down
2 changes: 2 additions & 0 deletions crates/subspace-runtime/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
fn main() {
#[cfg(feature = "std")]
{
// TODO: Workaround for https://github.com/paritytech/polkadot-sdk/issues/3192
std::env::set_var("CFLAGS", "-mcpu=mvp");
substrate_wasm_builder::WasmBuilder::new()
.with_current_project()
.export_heap_base()
Expand Down
2 changes: 2 additions & 0 deletions domains/runtime/evm/build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
fn main() {
#[cfg(feature = "std")]
{
// TODO: Workaround for https://github.com/paritytech/polkadot-sdk/issues/3192
std::env::set_var("CFLAGS", "-mcpu=mvp");
substrate_wasm_builder::WasmBuilder::new()
.with_current_project()
.export_heap_base()
Expand Down
2 changes: 2 additions & 0 deletions domains/test/runtime/evm/build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
fn main() {
#[cfg(feature = "std")]
{
// TODO: Workaround for https://github.com/paritytech/polkadot-sdk/issues/3192
std::env::set_var("CFLAGS", "-mcpu=mvp");
substrate_wasm_builder::WasmBuilder::new()
.with_current_project()
.export_heap_base()
Expand Down
2 changes: 2 additions & 0 deletions test/subspace-test-runtime/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
fn main() {
#[cfg(feature = "std")]
{
// TODO: Workaround for https://github.com/paritytech/polkadot-sdk/issues/3192
std::env::set_var("CFLAGS", "-mcpu=mvp");
substrate_wasm_builder::WasmBuilder::new()
.with_current_project()
.export_heap_base()
Expand Down
Loading