Skip to content

Commit a5b9b2b

Browse files
committed
Merge thumbv7em and thumbv7m build configs
As there is no need to differentiate between those two targets currently, merge them together in the build script in order to fix a clippy lint. Signed-off-by: Hugues de Valon <[email protected]>
1 parent 40209a8 commit a5b9b2b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

build.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ fn main() {
1919
if target.starts_with("thumbv6m-") {
2020
println!("cargo:rustc-cfg=cortex_m");
2121
println!("cargo:rustc-cfg=armv6m");
22-
} else if target.starts_with("thumbv7m-") {
23-
println!("cargo:rustc-cfg=cortex_m");
24-
println!("cargo:rustc-cfg=armv7m");
25-
} else if target.starts_with("thumbv7em-") {
22+
} else if target.starts_with("thumbv7m-") || target.starts_with("thumbv7em-") {
2623
println!("cargo:rustc-cfg=cortex_m");
2724
println!("cargo:rustc-cfg=armv7m");
25+
// There is currently no need to differentiate the Armv7E-M implementation which contains
26+
// the DSP extension. If it happens, the following line will have to be added in another if
27+
// condition.
2828
//println!("cargo:rustc-cfg=armv7em");
2929
} else if target.starts_with("thumbv8m.base") {
3030
println!("cargo:rustc-cfg=cortex_m");

0 commit comments

Comments
 (0)