Skip to content

Commit

Permalink
remove Ofast
Browse files Browse the repository at this point in the history
  • Loading branch information
nkysg committed Oct 26, 2023
1 parent bd24b14 commit 1993560
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
1 change: 0 additions & 1 deletion consensus/cryptonight-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ name = "bench"

[build-dependencies]
cc = "1.0"
os_info = { version = "3", default-features = false }

[dependencies]
libc = { workspace = true }
Expand Down
17 changes: 1 addition & 16 deletions consensus/cryptonight-rs/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,7 @@ fn main() {
config.flag("-maes").flag("-msse2");
}
if target_os.contains("linux") || target_os.contains("macos") {
let info = os_info::get();
let opt_level = env::var("OPT_LEVEL").expect("fetching OPT_LEVEL");
if info.os_type() == os_info::Type::Ubuntu
&& info.version() == &os_info::Version::Custom("22.04".into())
{
if opt_level == "3" {
config.flag("-O2").flag("-fexceptions").flag("-std=gnu99");
} else {
config.flag("-fexceptions").flag("-std=gnu99");
}
} else {
config
.flag("-Ofast")
.flag("-fexceptions")
.flag("-std=gnu99");
}
config.flag("-fexceptions").flag("-std=gnu99");
}
config.compile("cryptonight");
}

0 comments on commit 1993560

Please sign in to comment.