Skip to content

Commit 404d4a5

Browse files
committed
re-enable has_fpu
1 parent a3ee69a commit 404d4a5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

build.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ fn main() {
77
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());
88
let name = env::var("CARGO_PKG_NAME").unwrap();
99

10-
let native_compilation = host_triple == target;
10+
if host_triple == target {
11+
println!("cargo:rustc-cfg=native");
12+
}
1113

1214
if target.starts_with("thumb") {
1315
let suffix = if env::var_os("CARGO_FEATURE_LINKER_PLUGIN_LTO").is_some() {
@@ -46,7 +48,7 @@ fn main() {
4648
println!("cargo:rustc-cfg=armv8m_main");
4749
}
4850

49-
if native_compilation {
50-
println!("cargo:rustc-cfg=native");
51+
if target.ends_with("-eabihf") {
52+
println!("cargo:rustc-cfg=has_fpu");
5153
}
5254
}

0 commit comments

Comments
 (0)