aboutsummaryrefslogtreecommitdiff
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
parent94ab524e8aa83c1d51eda11d7381cfea32ba03a8 (diff)
downloadcortex-m-208ee4348abc5db7a78afa4d5ccd0e5e4e98f216.tar.gz
cortex-m-208ee4348abc5db7a78afa4d5ccd0e5e4e98f216.tar.zst
cortex-m-208ee4348abc5db7a78afa4d5ccd0e5e4e98f216.zip
support the newest nightly
-rw-r--r--cortex-m-rt/CHANGELOG.md9
-rw-r--r--cortex-m-rt/Cargo.toml2
-rw-r--r--cortex-m-rt/build.rs10
-rw-r--r--cortex-m-rt/src/lib.rs3
4 files changed, 19 insertions, 5 deletions
diff --git a/cortex-m-rt/CHANGELOG.md b/cortex-m-rt/CHANGELOG.md
index ac90b58..f9e2abd 100644
--- a/cortex-m-rt/CHANGELOG.md
+++ b/cortex-m-rt/CHANGELOG.md
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]
+## [v0.3.15] - 2018-04-08
+
+### Fixed
+
+- Support the newest nightly
+
## [v0.3.14] - 2018-04-01
### Fixed
@@ -238,7 +244,8 @@ section size addr
Initial release
-[Unreleased]: https://github.com/japaric/cortex-m-rt/compare/v0.3.14...HEAD
+[Unreleased]: https://github.com/japaric/cortex-m-rt/compare/v0.3.15...HEAD
+[v0.3.15]: https://github.com/japaric/cortex-m-rt/compare/v0.3.14...v0.3.15
[v0.3.14]: https://github.com/japaric/cortex-m-rt/compare/v0.3.13...v0.3.14
[v0.3.13]: https://github.com/japaric/cortex-m-rt/compare/v0.3.12...v0.3.13
[v0.3.12]: https://github.com/japaric/cortex-m-rt/compare/v0.3.11...v0.3.12
diff --git a/cortex-m-rt/Cargo.toml b/cortex-m-rt/Cargo.toml
index d328ee3..1b61917 100644
--- a/cortex-m-rt/Cargo.toml
+++ b/cortex-m-rt/Cargo.toml
@@ -7,7 +7,7 @@ keywords = ["arm", "cortex-m", "runtime", "startup"]
license = "MIT OR Apache-2.0"
name = "cortex-m-rt"
repository = "https://github.com/japaric/cortex-m-rt"
-version = "0.3.14"
+version = "0.3.15"
[dependencies]
cortex-m = "0.3.0"
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);
diff --git a/cortex-m-rt/src/lib.rs b/cortex-m-rt/src/lib.rs
index cb85f4e..06ee551 100644
--- a/cortex-m-rt/src/lib.rs
+++ b/cortex-m-rt/src/lib.rs
@@ -485,7 +485,7 @@
#![deny(missing_docs)]
#![deny(warnings)]
#![feature(asm)]
-#![feature(compiler_builtins_lib)]
+#![cfg_attr(needs_cb, feature(compiler_builtins_lib))]
#![feature(global_asm)]
#![feature(lang_items)]
#![feature(linkage)]
@@ -493,6 +493,7 @@
#![feature(used)]
#![no_std]
+#[cfg(needs_cb)]
extern crate compiler_builtins;
#[cfg(target_arch = "arm")]
extern crate cortex_m;