From 19935608e7e668d81d3b07e0121bfd98a042f189 Mon Sep 17 00:00:00 2001 From: nk_ysg Date: Thu, 26 Oct 2023 20:42:20 +0800 Subject: [PATCH] remove Ofast --- consensus/cryptonight-rs/Cargo.toml | 1 - consensus/cryptonight-rs/build.rs | 17 +---------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/consensus/cryptonight-rs/Cargo.toml b/consensus/cryptonight-rs/Cargo.toml index 81314b6c34..b289793007 100644 --- a/consensus/cryptonight-rs/Cargo.toml +++ b/consensus/cryptonight-rs/Cargo.toml @@ -4,7 +4,6 @@ name = "bench" [build-dependencies] cc = "1.0" -os_info = { version = "3", default-features = false } [dependencies] libc = { workspace = true } diff --git a/consensus/cryptonight-rs/build.rs b/consensus/cryptonight-rs/build.rs index 85ee62a1eb..977c078237 100644 --- a/consensus/cryptonight-rs/build.rs +++ b/consensus/cryptonight-rs/build.rs @@ -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"); }