Skip to content

Commit

Permalink
Merge #293
Browse files Browse the repository at this point in the history
293: unconditionally depend on atomic-polyfill for riscv32i target r=japaric a=japaric

due to a limitation in the llvm backend [1] the `riscv32i-unknown-none-elf` target lacks the `core::sync::atomic` API even though the actual hardware is capable of atomic loads and stores (`fence` instruction). thus, at this point in time, this target needs `atomic-polyfill` for a working SPSC implementation

[1]: knurling-rs/defmt#597 (comment)

fixes #271 
closes #272 
closes #273 

Co-authored-by: Jorge Aparicio <jorge.aparicio@ferrous-systems.com>
  • Loading branch information
bors[bot] and japaric authored May 12, 2022
2 parents c2a022d + 34b05be commit 4a207ae
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
- nightly
features:
- ""
- "cas"
- "serde"
steps:
- name: Checkout
Expand Down Expand Up @@ -92,7 +93,7 @@ jobs:
with:
use-cross: false
command: check
args: --target=${{ matrix.target }} --features=${{ matrix.features }}
args: --target=${{ matrix.target }} --no-default-features --features=${{ matrix.features }}

# Run cpass tests
testcpass:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Changed

* Optimize the codegen of `Vec::clone`
* `riscv32i` targets unconditionally (`no-default-features`) depends on `atomic-polyfill`

### Fixed

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ defmt-impl = ["defmt"]
atomic-polyfill = { version = "0.1.2", optional = true }

[target.riscv32i-unknown-none-elf.dependencies]
atomic-polyfill = { version = "0.1.4", optional = true }
atomic-polyfill = { version = "0.1.4" }

[target.riscv32imc-unknown-none-elf.dependencies]
atomic-polyfill = { version = "0.1.4", optional = true }
Expand Down

0 comments on commit 4a207ae

Please sign in to comment.