Skip to content

Commit

Permalink
Fix build on non-32/64-bit architectures (#1144)
Browse files Browse the repository at this point in the history
* Impl WideningMultiply for 16-bit pointers
* Add AVR CI test job
  • Loading branch information
Palladinium committed Jul 13, 2021
1 parent 52407e7 commit fb6390f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/test.yml
Expand Up @@ -174,6 +174,20 @@ jobs:
- name: Build top-level only
run: cargo build --target=thumbv6m-none-eabi --no-default-features

test-avr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2021-01-07 # Pinned compiler version due to https://github.com/rust-lang/compiler-builtins/issues/400
components: rust-src
override: true
- name: Build top-level only
run: cargo build -Z build-std=core --target=avr-unknown-gnu-atmega328 --no-default-features

test-ios:
runs-on: macos-latest
steps:
Expand Down
2 changes: 2 additions & 0 deletions src/distributions/utils.rs
Expand Up @@ -138,6 +138,8 @@ macro_rules! wmul_impl_usize {
}
};
}
#[cfg(target_pointer_width = "16")]
wmul_impl_usize! { u16 }
#[cfg(target_pointer_width = "32")]
wmul_impl_usize! { u32 }
#[cfg(target_pointer_width = "64")]
Expand Down

0 comments on commit fb6390f

Please sign in to comment.