diff options
author | 2018-03-09 20:52:37 +0100 | |
---|---|---|
committer | 2018-03-09 20:52:37 +0100 | |
commit | 7ea34a1bc16772680f11c8384f6e734dbc5aaa01 (patch) | |
tree | 312136b6f32ec2910d091bb05b6339193bc35613 | |
parent | 57dd0fa144b31cb70c928d5413cf42afd6a6290b (diff) | |
parent | 35a319cab971e27c28696525db6a7c999be134ca (diff) | |
download | cortex-m-7ea34a1bc16772680f11c8384f6e734dbc5aaa01.tar.gz cortex-m-7ea34a1bc16772680f11c8384f6e734dbc5aaa01.tar.zst cortex-m-7ea34a1bc16772680f11c8384f6e734dbc5aaa01.zip |
Merge pull request #57 from crawford/build
Support dev channels of rustc
-rw-r--r-- | cortex-m-rt/build.rs | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/cortex-m-rt/build.rs b/cortex-m-rt/build.rs index dee75b7..7784b98 100644 --- a/cortex-m-rt/build.rs +++ b/cortex-m-rt/build.rs @@ -9,14 +9,11 @@ use std::path::PathBuf; use chrono::NaiveDate; fn main() { - let date: NaiveDate = rustc_version::version_meta() - .unwrap() - .commit_date - .unwrap() - .parse() - .unwrap(); - - if date > NaiveDate::from_ymd(2017, 12, 26) { + let meta = rustc_version::version_meta().unwrap(); + if meta.channel == rustc_version::Channel::Dev + || meta.commit_date.unwrap().parse::<NaiveDate>().unwrap() + > NaiveDate::from_ymd(2017, 12, 26) + { println!("cargo:rustc-cfg=has_termination_lang") } |