File tree 6 files changed +19
-0
lines changed
6 files changed +19
-0
lines changed File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change @@ -42,6 +42,12 @@ INCLUDE device.x"#
42
42
f
43
43
} ;
44
44
45
+ println ! ( "cargo:rustc-check-cfg=cfg(armv6m)" ) ;
46
+ println ! ( "cargo:rustc-check-cfg=cfg(armv7m)" ) ;
47
+ println ! ( "cargo:rustc-check-cfg=cfg(armv8m)" ) ;
48
+ println ! ( "cargo:rustc-check-cfg=cfg(cortex_m)" ) ;
49
+ println ! ( "cargo:rustc-check-cfg=cfg(has_fpu)" ) ;
50
+
45
51
let max_int_handlers = if target. starts_with ( "thumbv6m-" ) {
46
52
println ! ( "cargo:rustc-cfg=cortex_m" ) ;
47
53
println ! ( "cargo:rustc-cfg=armv6m" ) ;
Original file line number Diff line number Diff line change 4
4
#![ deny( warnings) ]
5
5
#![ no_main]
6
6
#![ no_std]
7
+ // This example uses an undefined cfg, `cfg(never)`
8
+ #![ allow( unexpected_cfgs) ]
7
9
8
10
extern crate cortex_m_rt as rt;
9
11
extern crate panic_halt;
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ use std::env;
3
3
fn main ( ) {
4
4
let target = env:: var ( "TARGET" ) . unwrap ( ) ;
5
5
6
+ println ! ( "cargo:rustc-check-cfg=cfg(thumb)" ) ;
6
7
if target. starts_with ( "thumbv" ) {
7
8
println ! ( "cargo:rustc-cfg=thumb" ) ;
8
9
}
Original file line number Diff line number Diff line change @@ -4,6 +4,16 @@ fn main() {
4
4
let target = env:: var ( "TARGET" ) . unwrap ( ) ;
5
5
let host_triple = env:: var ( "HOST" ) . unwrap ( ) ;
6
6
7
+ println ! ( "cargo:rustc-check-cfg=cfg(armv6m)" ) ;
8
+ println ! ( "cargo:rustc-check-cfg=cfg(armv7em)" ) ;
9
+ println ! ( "cargo:rustc-check-cfg=cfg(armv7m)" ) ;
10
+ println ! ( "cargo:rustc-check-cfg=cfg(armv8m)" ) ;
11
+ println ! ( "cargo:rustc-check-cfg=cfg(armv8m_base)" ) ;
12
+ println ! ( "cargo:rustc-check-cfg=cfg(armv8m_main)" ) ;
13
+ println ! ( "cargo:rustc-check-cfg=cfg(cortex_m)" ) ;
14
+ println ! ( "cargo:rustc-check-cfg=cfg(has_fpu)" ) ;
15
+ println ! ( "cargo:rustc-check-cfg=cfg(native)" ) ;
16
+
7
17
if host_triple == target {
8
18
println ! ( "cargo:rustc-cfg=native" ) ;
9
19
}
You can’t perform that action at this time.
0 commit comments