diff --git a/src/cmd/build.rs b/src/cmd/build.rs index 2a5fdf064b73c448b5aa7f96c3bc87c4c5ae61c4..0d32be54cebabcb25cd65c5344315210a227b431 100644 --- a/src/cmd/build.rs +++ b/src/cmd/build.rs @@ -249,7 +249,7 @@ fn exec_cargo_for_wasm_target( // Currently will override user defined RUSTFLAGS from .cargo/config. See https://github.com/paritytech/cargo-contract/issues/98. std::env::set_var( "RUSTFLAGS", - "-C link-arg=-zstack-size=65536 -C link-arg=--import-memory", + "-C link-arg=-zstack-size=65536 -C link-arg=--import-memory -Clinker-plugin-lto", ); let cargo_build = |manifest_path: &ManifestPath| {