Skip to content

Commit

Permalink
fix: filter out x87 feature on x86-64
Browse files Browse the repository at this point in the history
x87 will soon be removed.

See #14
  • Loading branch information
ronnychevalier committed Jan 2, 2025
1 parent 79ccc1c commit 83135b7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/rustc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ impl Rustc {

/// Returns all CPU features supported by a given CPU on a target
pub fn features_from_cpu(target: &str, cpu: &str) -> anyhow::Result<BTreeSet<String>> {
let ignored_features = [
// See https://github.com/rust-lang/rust/issues/116344
"x87",
];

let cfg = Self::command()
.args([
"--print=cfg",
Expand Down Expand Up @@ -84,6 +89,7 @@ impl Rustc {

line.strip_suffix('"').map(ToOwned::to_owned)
})
.filter(|feature| !ignored_features.contains(&feature.as_str()))
.collect();

Ok(features)
Expand Down

0 comments on commit 83135b7

Please sign in to comment.