From e9af1708a076a565daeb849ee0577c98f36e508f Mon Sep 17 00:00:00 2001 From: Jean-Philippe Raynaud Date: Mon, 16 Jan 2023 10:14:32 +0100 Subject: [PATCH 1/2] Add 'portable' feature in 'make build' To be aligned with features used for building artifacts in the CI. --- mithril-aggregator/Makefile | 3 ++- mithril-client/Makefile | 3 ++- mithril-common/Makefile | 3 ++- mithril-signer/Makefile | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/mithril-aggregator/Makefile b/mithril-aggregator/Makefile index f5db9d6205a..6e5e09c9797 100644 --- a/mithril-aggregator/Makefile +++ b/mithril-aggregator/Makefile @@ -5,7 +5,8 @@ CARGO = cargo all: test build build: - ${CARGO} build --release + # We use 'portable' feature to avoid SIGILL crashes + ${CARGO} build --release --features portable cp ../target/release/mithril-aggregator . run: build diff --git a/mithril-client/Makefile b/mithril-client/Makefile index 484615e2897..a5be05de9b5 100644 --- a/mithril-client/Makefile +++ b/mithril-client/Makefile @@ -10,7 +10,8 @@ CARGO = cargo all: test build build: - ${CARGO} build --release + # We use 'portable' feature to avoid SIGILL crashes + ${CARGO} build --release --features portable cp ../target/release/mithril-client . run: build diff --git a/mithril-common/Makefile b/mithril-common/Makefile index 42ded94763e..ea375284af2 100644 --- a/mithril-common/Makefile +++ b/mithril-common/Makefile @@ -5,7 +5,8 @@ CARGO = cargo all: test build build: - ${CARGO} build --release + # We use 'portable' feature to avoid SIGILL crashes + ${CARGO} build --release --features portable test: ${CARGO} test diff --git a/mithril-signer/Makefile b/mithril-signer/Makefile index b8d682e1564..926542db1f3 100644 --- a/mithril-signer/Makefile +++ b/mithril-signer/Makefile @@ -5,7 +5,8 @@ CARGO = cargo all: test build build: - ${CARGO} build --release + # We use 'portable' feature to avoid SIGILL crashes + ${CARGO} build --release --features portable cp ../target/release/mithril-signer . run: build From fd53804a273364b642939abfce6d024c907cbf92 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Raynaud Date: Mon, 16 Jan 2023 10:17:23 +0100 Subject: [PATCH 2/2] Explain usage of 'portable' feature --- mithril-aggregator/Cargo.toml | 2 +- mithril-common/Cargo.toml | 2 +- mithril-signer/Cargo.toml | 2 +- mithril-stm/Cargo.toml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mithril-aggregator/Cargo.toml b/mithril-aggregator/Cargo.toml index 229422abc3f..d177890e0d7 100644 --- a/mithril-aggregator/Cargo.toml +++ b/mithril-aggregator/Cargo.toml @@ -41,4 +41,4 @@ slog-term = "2.9.0" tempfile = "3.3.0" [features] -portable = ["mithril-common/portable"] +portable = ["mithril-common/portable"] # portable feature avoids SIGILL crashes on CPUs not supporting Intel ADX instruction set when built on CPUs that support it diff --git a/mithril-common/Cargo.toml b/mithril-common/Cargo.toml index de125155a24..dc4059901a9 100644 --- a/mithril-common/Cargo.toml +++ b/mithril-common/Cargo.toml @@ -64,7 +64,7 @@ slog-term = "2.9.0" [features] default = [] -portable = ["mithril-stm/portable"] +portable = ["mithril-stm/portable"] # portable feature avoids SIGILL crashes on CPUs not supporting Intel ADX instruction set when built on CPUs that support it test_only = [] allow_skip_signer_certification = [] diff --git a/mithril-signer/Cargo.toml b/mithril-signer/Cargo.toml index 80b2ee077d1..69314a0c1b2 100644 --- a/mithril-signer/Cargo.toml +++ b/mithril-signer/Cargo.toml @@ -34,4 +34,4 @@ mockall = "0.11.0" slog-term = "2.9.0" [features] -portable = ["mithril-common/portable"] +portable = ["mithril-common/portable"] # portable feature avoids SIGILL crashes on CPUs not supporting Intel ADX instruction set when built on CPUs that support it diff --git a/mithril-stm/Cargo.toml b/mithril-stm/Cargo.toml index 03fa26c2fc4..7d4d7917858 100644 --- a/mithril-stm/Cargo.toml +++ b/mithril-stm/Cargo.toml @@ -58,5 +58,5 @@ harness = false default = ["rug-backend"] rug-backend = ["rug/default"] num-integer-backend = ["num-bigint", "num-rational", "num-traits"] -portable = ["blst/portable"] +portable = ["blst/portable"] # portable feature avoids SIGILL crashes on CPUs not supporting Intel ADX instruction set when built on CPUs that support it benchmark-internals = [] # For benchmarking multi_sig