diff --git a/build_extra/rust/rust.gni b/build_extra/rust/rust.gni index 8bd1bc0852f4c..cd755d6d315e5 100644 --- a/build_extra/rust/rust.gni +++ b/build_extra/rust/rust.gni @@ -209,7 +209,10 @@ template("rust_crate") { args += [ "-g" ] } if (is_official_build) { - args += [ "-O" ] + args += [ + "-C", + "opt-level=3", + ] } if (is_test) { args += [ "--test" ]