Skip to content

Commit

Permalink
Dropped Support for Bidirectional Custom Target Definition Emulation
Browse files Browse the repository at this point in the history
as requested in the review and argued that this is only consistent with later LLVM upgrades
  • Loading branch information
DevJPM committed Nov 12, 2020
1 parent 8236830 commit 7e443c4
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions compiler/rustc_codegen_llvm/src/attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,17 +144,6 @@ fn set_probestack(cx: &CodegenCx<'ll, '_>, llfn: &'ll Value) {
);
}

fn translate_obsolete_target_features(feature: &str) -> &str {
const LLVM9_FEATURE_CHANGES: &[(&str, &str)] =
&[("+fp-only-sp", "-fp64"), ("-fp-only-sp", "+fp64"), ("+d16", "-d32"), ("-d16", "+d32")];
for &(old, new) in LLVM9_FEATURE_CHANGES {
if feature == old {
return new;
}
}
feature
}

pub fn llvm_target_features(sess: &Session) -> impl Iterator<Item = &str> {
const RUSTC_SPECIFIC_FEATURES: &[&str] = &["crt-static"];

Expand All @@ -169,7 +158,6 @@ pub fn llvm_target_features(sess: &Session) -> impl Iterator<Item = &str> {
.split(',')
.chain(cmdline)
.filter(|l| !l.is_empty())
.map(translate_obsolete_target_features)
}

pub fn apply_target_cpu_attr(cx: &CodegenCx<'ll, '_>, llfn: &'ll Value) {
Expand Down

0 comments on commit 7e443c4

Please sign in to comment.