diff --git a/CHANGELOG.md b/CHANGELOG.md index ecba3b5c..3b34e84b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/Cargo.toml b/Cargo.toml index 40d073ce..292bc351 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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 } diff --git a/build.rs b/build.rs index d787a266..4f16486c 100644 --- a/build.rs +++ b/build.rs @@ -76,7 +76,9 @@ fn main() -> Result<(), Box> { 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"); }