Skip to content
This repository has been archived by the owner on May 4, 2024. It is now read-only.

Commit

Permalink
[evm][move package] make --arch ethereum present in all builds, but…
Browse files Browse the repository at this point in the history
… return an error if feature `evm-backend` isn't enabled
  • Loading branch information
vgao1996 committed May 5, 2022
1 parent b44669e commit f3b6112
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 4 additions & 1 deletion language/tools/move-cli/src/package/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,12 @@ pub fn handle_package_commands(
config.compile_package(&rerooted_path, &mut std::io::stderr())?;
}

#[cfg(feature = "evm-backend")]
Architecture::Ethereum => {
#[cfg(feature = "evm-backend")]
config.compile_package_evm(&rerooted_path, &mut std::io::stderr())?;

#[cfg(not(feature = "evm-backend"))]
bail!("The Ethereum architecture is not supported because move-cli was not compiled with feature flag `evm-backend`.");
}
}
}
Expand Down
3 changes: 0 additions & 3 deletions language/tools/move-package/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ pub enum Architecture {

AsyncMove,

#[cfg(feature = "evm-backend")]
Ethereum,
}

Expand All @@ -46,7 +45,6 @@ impl fmt::Display for Architecture {

Self::AsyncMove => write!(f, "async-move"),

#[cfg(feature = "evm-backend")]
Self::Ethereum => write!(f, "ethereum"),
}
}
Expand All @@ -68,7 +66,6 @@ impl Architecture {

"async-move" => Self::AsyncMove,

#[cfg(feature = "evm-backend")]
"ethereum" => Self::Ethereum,

_ => {
Expand Down

0 comments on commit f3b6112

Please sign in to comment.