File tree Expand file tree Collapse file tree 6 files changed +19
-0
lines changed Expand file tree Collapse file tree 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"#
4242 f
4343 } ;
4444
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+
4551 let max_int_handlers = if target. starts_with ( "thumbv6m-" ) {
4652 println ! ( "cargo:rustc-cfg=cortex_m" ) ;
4753 println ! ( "cargo:rustc-cfg=armv6m" ) ;
Original file line number Diff line number Diff line change 44#![ deny( warnings) ]
55#![ no_main]
66#![ no_std]
7+ // This example uses an undefined cfg, `cfg(never)`
8+ #![ allow( unexpected_cfgs) ]
79
810extern crate cortex_m_rt as rt;
911extern crate panic_halt;
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ use std::env;
33fn main ( ) {
44 let target = env:: var ( "TARGET" ) . unwrap ( ) ;
55
6+ println ! ( "cargo:rustc-check-cfg=cfg(thumb)" ) ;
67 if target. starts_with ( "thumbv" ) {
78 println ! ( "cargo:rustc-cfg=thumb" ) ;
89 }
Original file line number Diff line number Diff line change @@ -4,6 +4,16 @@ fn main() {
44 let target = env:: var ( "TARGET" ) . unwrap ( ) ;
55 let host_triple = env:: var ( "HOST" ) . unwrap ( ) ;
66
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+
717 if host_triple == target {
818 println ! ( "cargo:rustc-cfg=native" ) ;
919 }
You can’t perform that action at this time.
0 commit comments