@@ -43,22 +43,36 @@ INCLUDE device.x"#
4343 } ;
4444
4545 println ! ( "cargo:rustc-check-cfg=cfg(armv6m)" ) ;
46+ println ! ( "cargo:rustc-check-cfg=cfg(armv7em)" ) ;
4647 println ! ( "cargo:rustc-check-cfg=cfg(armv7m)" ) ;
4748 println ! ( "cargo:rustc-check-cfg=cfg(armv8m)" ) ;
49+ println ! ( "cargo:rustc-check-cfg=cfg(armv8m_base)" ) ;
50+ println ! ( "cargo:rustc-check-cfg=cfg(armv8m_main)" ) ;
4851 println ! ( "cargo:rustc-check-cfg=cfg(cortex_m)" ) ;
4952 println ! ( "cargo:rustc-check-cfg=cfg(has_fpu)" ) ;
5053
5154 let max_int_handlers = if target. starts_with ( "thumbv6m-" ) {
5255 println ! ( "cargo:rustc-cfg=cortex_m" ) ;
5356 println ! ( "cargo:rustc-cfg=armv6m" ) ;
5457 32
55- } else if target. starts_with ( "thumbv7m-" ) || target . starts_with ( "thumbv7em-" ) {
58+ } else if target. starts_with ( "thumbv7m-" ) {
5659 println ! ( "cargo:rustc-cfg=cortex_m" ) ;
5760 println ! ( "cargo:rustc-cfg=armv7m" ) ;
5861 240
59- } else if target. starts_with ( "thumbv8m" ) {
62+ } else if target. starts_with ( "thumbv7em-" ) {
63+ println ! ( "cargo:rustc-cfg=cortex_m" ) ;
64+ println ! ( "cargo:rustc-cfg=armv7m" ) ;
65+ println ! ( "cargo:rustc-cfg=armv7em" ) ;
66+ 240
67+ } else if target. starts_with ( "thumbv8m.base" ) {
68+ println ! ( "cargo:rustc-cfg=cortex_m" ) ;
69+ println ! ( "cargo:rustc-cfg=armv8m" ) ;
70+ println ! ( "cargo:rustc-cfg=armv8m_base" ) ;
71+ 496
72+ } else if target. starts_with ( "thumbv8m.main" ) {
6073 println ! ( "cargo:rustc-cfg=cortex_m" ) ;
6174 println ! ( "cargo:rustc-cfg=armv8m" ) ;
75+ println ! ( "cargo:rustc-cfg=armv8m_main" ) ;
6276 496
6377 } else {
6478 // Non ARM target. We assume you're just testing the syntax.
0 commit comments