Skip to content

Commit 9e2e5ae

Browse files
bors[bot]korken89
andauthored
Merge #113
113: Added armv8 support r=japaric a=korken89 Added flags for armv8m Co-authored-by: Emil Fresk <[email protected]>
2 parents 109cb27 + 902460c commit 9e2e5ae

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

.travis.yml

+8
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ matrix:
2828
rust: nightly
2929
if: branch != master
3030

31+
- env: TARGET=thumbv8m.base-none-eabi
32+
rust: nightly
33+
if: branch != master
34+
35+
- env: TARGET=thumbv8m.main-none-eabi
36+
rust: nightly
37+
if: branch != master
38+
3139
before_install: set -e
3240

3341
install:

build.rs

+4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ fn main() -> Result<(), Box<dyn Error>> {
1313
println!("cargo:rustc-cfg=armv7m");
1414
} else if target.starts_with("armv7r-") {
1515
println!("cargo:rustc-cfg=armv7r");
16+
} else if target.starts_with("thumbv8m.base") {
17+
println!("cargo:rustc-cfg=armv8m_base");
18+
} else if target.starts_with("thumbv8m.main") {
19+
println!("cargo:rustc-cfg=armv8m_main");
1620
}
1721

1822
Ok(())

src/pool/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ pub struct Pool<T> {
183183
// NOTE: Here we lie about `Pool` implementing `Sync` on x86_64. This is not true but it lets us
184184
// test the `pool!` and `singleton::Pool` abstractions. We just have to be careful not to use the
185185
// pool in a multi-threaded context
186-
#[cfg(any(armv7m, armv7r, test))]
186+
#[cfg(any(armv7m, armv7r, armv8m_main, test))]
187187
unsafe impl<T> Sync for Pool<T> {}
188188

189189
unsafe impl<T> Send for Pool<T> {}

src/pool/singleton.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use as_slice::{AsMutSlice, AsSlice};
1515
use super::{Init, Node, Uninit};
1616

1717
/// Instantiates a pool as a global singleton
18-
#[cfg(any(armv7m, armv7r, test))]
18+
#[cfg(any(armv7m, armv7r, armv8m_main, test))]
1919
#[macro_export]
2020
macro_rules! pool {
2121
($(#[$($attr:tt)*])* $ident:ident: $ty:ty) => {

0 commit comments

Comments
 (0)