Skip to content
This repository was archived by the owner on Jan 24, 2022. It is now read-only.

Commit 032ca2a

Browse files
authored
Merge pull request #65 from japaric/nightly
support the newest nightly
2 parents 40cd3ba + 996b192 commit 032ca2a

File tree

4 files changed

+19
-5
lines changed

4 files changed

+19
-5
lines changed

CHANGELOG.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99

10+
## [v0.3.15] - 2018-04-08
11+
12+
### Fixed
13+
14+
- Support the newest nightly
15+
1016
## [v0.3.14] - 2018-04-01
1117

1218
### Fixed
@@ -238,7 +244,8 @@ section size addr
238244

239245
Initial release
240246

241-
[Unreleased]: https://github.com/japaric/cortex-m-rt/compare/v0.3.14...HEAD
247+
[Unreleased]: https://github.com/japaric/cortex-m-rt/compare/v0.3.15...HEAD
248+
[v0.3.15]: https://github.com/japaric/cortex-m-rt/compare/v0.3.14...v0.3.15
242249
[v0.3.14]: https://github.com/japaric/cortex-m-rt/compare/v0.3.13...v0.3.14
243250
[v0.3.13]: https://github.com/japaric/cortex-m-rt/compare/v0.3.12...v0.3.13
244251
[v0.3.12]: https://github.com/japaric/cortex-m-rt/compare/v0.3.11...v0.3.12

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ keywords = ["arm", "cortex-m", "runtime", "startup"]
77
license = "MIT OR Apache-2.0"
88
name = "cortex-m-rt"
99
repository = "https://github.com/japaric/cortex-m-rt"
10-
version = "0.3.14"
10+
version = "0.3.15"
1111

1212
[dependencies]
1313
cortex-m = "0.3.0"

build.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,19 @@ use chrono::NaiveDate;
1010

1111
fn main() {
1212
let meta = rustc_version::version_meta().unwrap();
13+
let commit_date = meta.commit_date.unwrap().parse::<NaiveDate>().unwrap();
1314
if meta.channel == rustc_version::Channel::Dev
14-
|| meta.commit_date.unwrap().parse::<NaiveDate>().unwrap()
15-
> NaiveDate::from_ymd(2017, 12, 26)
15+
|| commit_date > NaiveDate::from_ymd(2017, 12, 26)
1616
{
1717
println!("cargo:rustc-cfg=has_termination_lang")
1818
}
1919

20+
// newest nightlies don't need 'extern crate compiler_builtins'
21+
if commit_date < NaiveDate::from_ymd(2018, 04, 07)
22+
{
23+
println!("cargo:rustc-cfg=needs_cb")
24+
}
25+
2026
let target = env::var("TARGET").unwrap();
2127

2228
has_fpu(&target);

src/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -485,14 +485,15 @@
485485
#![deny(missing_docs)]
486486
#![deny(warnings)]
487487
#![feature(asm)]
488-
#![feature(compiler_builtins_lib)]
488+
#![cfg_attr(needs_cb, feature(compiler_builtins_lib))]
489489
#![feature(global_asm)]
490490
#![feature(lang_items)]
491491
#![feature(linkage)]
492492
#![feature(naked_functions)]
493493
#![feature(used)]
494494
#![no_std]
495495

496+
#[cfg(needs_cb)]
496497
extern crate compiler_builtins;
497498
#[cfg(target_arch = "arm")]
498499
extern crate cortex_m;

0 commit comments

Comments
 (0)