339: Add polyfills for ESP32S2 r=korken89 a=Flole998



Co-authored-by: Flole998 <Flole998@users.noreply.github.com>
This commit is contained in:
bors[bot] 2023-01-23 17:48:16 +00:00 committed by GitHub
commit 644653bf3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 1 deletions

View File

@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Add `HistoryBuffer::as_slices()`
- Implemented `retain` for `IndexMap` and `IndexSet`.
- Recover `StableDeref` trait for `pool::object::Object` and `pool::boxed::Box`.
- Add polyfills for ESP32S2
### Changed

View File

@ -34,6 +34,9 @@ atomic-polyfill = { version = "1.0.1" }
[target.riscv32imc-unknown-none-elf.dependencies]
atomic-polyfill = { version = "1.0.1" }
[target.xtensa-esp32s2-none-elf.dependencies]
atomic-polyfill = { version = "1.0.1" }
[target.'cfg(target_arch = "avr")'.dependencies]
atomic-polyfill = { version = "1.0.1", optional = true }

View File

@ -76,7 +76,9 @@ fn main() -> Result<(), Box<dyn Error>> {
println!("cargo:rustc-cfg=cas_atomic_polyfill");
} else {
match &target[..] {
"riscv32i-unknown-none-elf" | "riscv32imc-unknown-none-elf" => {
"riscv32i-unknown-none-elf"
| "riscv32imc-unknown-none-elf"
| "xtensa-esp32s2-none-elf" => {
println!("cargo:rustc-cfg=full_atomic_polyfill");
println!("cargo:rustc-cfg=cas_atomic_polyfill");
}