aboutsummaryrefslogtreecommitdiff
path: root/cortex-m-rt/build.rs
diff options
context:
space:
mode:
authorGravatar Jorge Aparicio <jorge@japaric.io> 2018-04-08 12:47:02 +0200
committerGravatar Jorge Aparicio <jorge@japaric.io> 2018-04-08 12:47:02 +0200
commit208ee4348abc5db7a78afa4d5ccd0e5e4e98f216 (patch)
tree21d98abff1177721080e5dfa90ae1cffab08c430 /cortex-m-rt/build.rs
parent94ab524e8aa83c1d51eda11d7381cfea32ba03a8 (diff)
downloadcortex-m-208ee4348abc5db7a78afa4d5ccd0e5e4e98f216.tar.gz
cortex-m-208ee4348abc5db7a78afa4d5ccd0e5e4e98f216.tar.zst
cortex-m-208ee4348abc5db7a78afa4d5ccd0e5e4e98f216.zip
support the newest nightly
Diffstat (limited to 'cortex-m-rt/build.rs')
-rw-r--r--cortex-m-rt/build.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/cortex-m-rt/build.rs b/cortex-m-rt/build.rs
index 7784b98..c1028c4 100644
--- a/cortex-m-rt/build.rs
+++ b/cortex-m-rt/build.rs
@@ -10,13 +10,19 @@ use chrono::NaiveDate;
fn main() {
let meta = rustc_version::version_meta().unwrap();
+ let commit_date = meta.commit_date.unwrap().parse::<NaiveDate>().unwrap();
if meta.channel == rustc_version::Channel::Dev
- || meta.commit_date.unwrap().parse::<NaiveDate>().unwrap()
- > NaiveDate::from_ymd(2017, 12, 26)
+ || commit_date > NaiveDate::from_ymd(2017, 12, 26)
{
println!("cargo:rustc-cfg=has_termination_lang")
}
+ // newest nightlies don't need 'extern crate compiler_builtins'
+ if commit_date < NaiveDate::from_ymd(2018, 04, 07)
+ {
+ println!("cargo:rustc-cfg=needs_cb")
+ }
+
let target = env::var("TARGET").unwrap();
has_fpu(&target);