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

[evm][move package] make --arch ethereum present in all builds, but return an error if feature evm-backend isn't enabled #106

Merged
merged 1 commit into from
May 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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`.");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

}
}
}
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