Skip to content

Commit

Permalink
[rust] Enable mutable-noalias
Browse files Browse the repository at this point in the history
We haven't seen any regressions upstream since it was last enabled again
in March 2021: rust-lang/rust#82834.

This results in a negligible increase in binary size of 24-56 kiB,
depending on build configuration.

Runtime perf only changed on x64 builds. 46 test cases got faster and
18 test cases got slower, with a couple of significant regressions in
FIDL microbenchmarks. Overall the results look positive.

Fixed: 76297
Change-Id: Id4a2b643e30e748e8d200f9d88c54ecc0ea02b2c
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/674307
Commit-Queue: Tyler Mandry <tmandry@google.com>
Reviewed-by: Dan Johnson <computerdruid@google.com>
  • Loading branch information
tmandry authored and Commit Bot committed May 3, 2022
1 parent 6a6322f commit 53b3fc5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
6 changes: 1 addition & 5 deletions build/config/BUILDCONFIG.gn
Original file line number Diff line number Diff line change
Expand Up @@ -369,11 +369,7 @@ if (in_default_toolchain) {
}

# Prepend the prefix configs, if any, before the default ones.
default_common_binary_configs =
toolchain_variant.prefix_configs + [
# TODO(fxbug.dev/76297) Remove this to re-enable mutable-noalias.
"//build/config/rust:no_mutable_noalias",
]
default_common_binary_configs = toolchain_variant.prefix_configs

# Note that Zircon toolchains and non-Zircon ones have a very different set
# of default configs for all target types.
Expand Down
5 changes: 0 additions & 5 deletions build/config/rust/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,6 @@ config("v0_symbol_mangling") {
}
}

# TODO(fxbug.dev/76297) Remove this to re-enable mutable-noalias.
config("no_mutable_noalias") {
rustflags = [ "-Zmutable-noalias=off" ]
}

config("allow_unknown_lints") {
rustflags = [ "-Aunknown-lints" ]
}
Expand Down

0 comments on commit 53b3fc5

Please sign in to comment.