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

Commit

Permalink
Merge #205
Browse files Browse the repository at this point in the history
205: Stop using randomized symbol names r=therealprof a=jonas-schievink

It isn't possible to do this by incrementing a global counter, since the expansion order of macros isn't guaranteed and might change between compiler invocations.

Fixes #212
Closes #196
Closes #195

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
  • Loading branch information
bors[bot] and jonas-schievink authored Nov 24, 2019
2 parents f17983a + 0ae866a commit 7c8778f
Show file tree
Hide file tree
Showing 10 changed files with 244 additions and 187 deletions.
5 changes: 0 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,6 @@ script:

after_script: set +e

cache: cargo

before_cache:
- chmod -R a+r $HOME/.cargo;

branches:
only:
- master
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

### Changed

- Macros now generate a second trampoline function instead of randomizing the
function's symbol name. This makes the build deterministic.
- [breaking-change] `static mut` resources no longer have `'static` lifetime
except in the `#[entry]` function (this is a soundness fix; see [#212]).

[#212]: https://github.com/rust-embedded/cortex-m-rt/issues/212

## [v0.6.10] - 2019-07-25

### Fixed
Expand Down
9 changes: 4 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,17 @@ cortex-m = "0.6"
panic-halt = "0.2.0"
cortex-m-semihosting = "0.3"

[dev-dependencies.rand]
default-features = false
features = ["small_rng"]
version = "0.7"

[target.'cfg(not(target_os = "none"))'.dev-dependencies]
compiletest_rs = "0.4.0"

[[example]]
name = "device"
required-features = ["device"]

[[test]]
name = "compiletest"
required-features = ["device"]

[features]
device = []

Expand Down
1 change: 0 additions & 1 deletion ci/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ main() {
override-exception
pre_init
qemu
rand
state
unsafe-default-handler
unsafe-entry
Expand Down
24 changes: 0 additions & 24 deletions examples/rand.rs

This file was deleted.

5 changes: 0 additions & 5 deletions macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,5 @@ proc-macro2 = "1.0"
features = ["extra-traits", "full"]
version = "1.0"

[dependencies.rand]
default-features = false
features = ["small_rng"]
version = "0.7"

[dev-dependencies]
cortex-m-rt = { path = "..", version = "0.6" }
Loading

0 comments on commit 7c8778f

Please sign in to comment.