Skip to content

Commit fb6390f

Browse files
authored
Fix build on non-32/64-bit architectures (#1144)
* Impl WideningMultiply for 16-bit pointers * Add AVR CI test job
1 parent 52407e7 commit fb6390f

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

.github/workflows/test.yml

+14
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,20 @@ jobs:
174174
- name: Build top-level only
175175
run: cargo build --target=thumbv6m-none-eabi --no-default-features
176176

177+
test-avr:
178+
runs-on: ubuntu-latest
179+
steps:
180+
- uses: actions/checkout@v2
181+
- name: Install toolchain
182+
uses: actions-rs/toolchain@v1
183+
with:
184+
profile: minimal
185+
toolchain: nightly-2021-01-07 # Pinned compiler version due to https://github.com/rust-lang/compiler-builtins/issues/400
186+
components: rust-src
187+
override: true
188+
- name: Build top-level only
189+
run: cargo build -Z build-std=core --target=avr-unknown-gnu-atmega328 --no-default-features
190+
177191
test-ios:
178192
runs-on: macos-latest
179193
steps:

src/distributions/utils.rs

+2
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@ macro_rules! wmul_impl_usize {
138138
}
139139
};
140140
}
141+
#[cfg(target_pointer_width = "16")]
142+
wmul_impl_usize! { u16 }
141143
#[cfg(target_pointer_width = "32")]
142144
wmul_impl_usize! { u32 }
143145
#[cfg(target_pointer_width = "64")]

0 commit comments

Comments
 (0)