Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions compiler/rustc_target/src/target_features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1426,6 +1426,17 @@ impl Target {
// No ABI-relevant target features have been identified thus far.
NOTHING
}
Arch::Xtensa => {
// All Rust-supported Xtensa targets use the windowed register ABI
// (esp32 and later). Non-windowed (historical esp8266 / CALL0) is not
// a supported Rust ABI. Requiring `windowed` here means selecting a
// -Ctarget-cpu that does not provide windowed produces an ABI mismatch
// warning rather than silent UB when mixed with windowed code.
//
// `windowed` implies `exception` in XTENSA_FEATURES, so exception is
// always enabled for this ABI; list it explicitly for complete constraints.
FeatureConstraints { required: &["windowed", "exception"], incompatible: &[] }
Comment on lines +1434 to +1438
}
_ => NOTHING,
}
}
Expand Down
Loading