From 77d70efaa89e612b6e6af3bf56c2aae3b2ca371b Mon Sep 17 00:00:00 2001 From: Alexander Gryaznov Date: Tue, 22 Nov 2022 18:40:15 +0200 Subject: [PATCH] add `-C target-cpu=mvp` rust flag to build command --- crates/cargo-contract/src/cmd/build/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/cargo-contract/src/cmd/build/mod.rs b/crates/cargo-contract/src/cmd/build/mod.rs index 918157082..99755776d 100644 --- a/crates/cargo-contract/src/cmd/build/mod.rs +++ b/crates/cargo-contract/src/cmd/build/mod.rs @@ -308,7 +308,7 @@ fn exec_cargo_for_wasm_target( } let env = vec![( "RUSTFLAGS", - Some("-C link-arg=-zstack-size=65536 -C link-arg=--import-memory -Clinker-plugin-lto"), + Some("-C link-arg=-zstack-size=65536 -C link-arg=--import-memory -Clinker-plugin-lto -C target-cpu=mvp"), )]; util::invoke_cargo(command, &args, manifest_path.directory(), verbosity, env)?;