diff options
author | 2021-12-16 18:44:17 -0800 | |
---|---|---|
committer | 2021-12-19 12:14:43 -0800 | |
commit | dcc53bfafede207306d635a910395e9c761a5f71 (patch) | |
tree | 04db068159c0c3b72e8acdb6aa2b9797e7890bd2 /build.rs | |
parent | f0dc654951d7aa7910b662c4da61c06bab671729 (diff) | |
download | cortex-m-dcc53bfafede207306d635a910395e9c761a5f71.tar.gz cortex-m-dcc53bfafede207306d635a910395e9c761a5f71.tar.zst cortex-m-dcc53bfafede207306d635a910395e9c761a5f71.zip |
re-enable has_fpu
Diffstat (limited to '')
-rw-r--r-- | build.rs | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -7,7 +7,9 @@ fn main() { let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap()); let name = env::var("CARGO_PKG_NAME").unwrap(); - let native_compilation = host_triple == target; + if host_triple == target { + println!("cargo:rustc-cfg=native"); + } if target.starts_with("thumb") { let suffix = if env::var_os("CARGO_FEATURE_LINKER_PLUGIN_LTO").is_some() { @@ -46,7 +48,7 @@ fn main() { println!("cargo:rustc-cfg=armv8m_main"); } - if native_compilation { - println!("cargo:rustc-cfg=native"); + if target.ends_with("-eabihf") { + println!("cargo:rustc-cfg=has_fpu"); } } |