Skip to content

Commit

Permalink
cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
klkvr committed Aug 18, 2024
1 parent eb9e75e commit adc88db
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions crates/compilers/src/compilers/multi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ impl Default for MultiCompiler {
fn default() -> Self {
let vyper = Vyper::new("vyper").ok();

#[cfg(feature = "svm-solc")]
let solc = Some(SolcCompiler::AutoDetect);
#[cfg(not(feature = "svm-solc"))]
let solc = crate::solc::Solc::new("solc").map(SolcCompiler::Specific).ok();
let solc = if cfg!(feature = "svm-solc") {
Some(SolcCompiler::AutoDetect)
} else {
crate::solc::Solc::new("solc").map(SolcCompiler::Specific).ok()
};

Self { solc, vyper }
}
Expand Down

0 comments on commit adc88db

Please sign in to comment.