Skip to content

Commit

Permalink
Add deprecation notice to cranelift_use_egraphs option.
Browse files Browse the repository at this point in the history
After bytecodealliance#5587, this is on by default. We are retaining the traditional
(no-egraphs) path for now, selected by setting this option to `false`,
but we eventually plan to delete it assuming that we don't find serious
regressions or issues. This PR adds a deprecation notice to the option.
  • Loading branch information
cfallin committed Jan 20, 2023
1 parent 7e10bd1 commit be99823
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/fuzzing/src/generators/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ impl Config {
}

/// Converts this to a `wasmtime::Config` object
#[allow(deprecated)] // Allow use of `cranelift_use_egraphs` below.
pub fn to_wasmtime(&self) -> wasmtime::Config {
crate::init_fuzzing();
log::debug!("creating wasmtime config with {:#?}", self.wasmtime);
Expand Down
4 changes: 4 additions & 0 deletions crates/wasmtime/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,10 @@ impl Config {
/// The default value for this is `true`.
#[cfg(compiler)]
#[cfg_attr(nightlydoc, doc(cfg(feature = "cranelift")))] // see build.rs
#[deprecated(
since = "5.0.0",
note = "egraphs will be the default and this method will be removed in a future version."
)]
pub fn cranelift_use_egraphs(&mut self, enable: bool) -> &mut Self {
let val = if enable { "true" } else { "false" };
self.compiler_config
Expand Down

0 comments on commit be99823

Please sign in to comment.