aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/build.rs b/build.rs
index be5b48a..23ceeba 100644
--- a/build.rs
+++ b/build.rs
@@ -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");
}
}