Skip to content

Commit

Permalink
chore: update nightly to 2021-09-22 (#117)
Browse files Browse the repository at this point in the history
* chore: update to nightly-2021-09-22, fix clippy (#115)

This just updates Rust to the latest nightly, and fixes a new Clippy
lint on that nightly.

* chore(x86_64): add `-z nostart-stop-gc` to linker args

when linking with `rust-lld` on recent nightlies, `__start` and
`__stop` labels are now gc'd by default. this breaks the linker hax
we use for tests. this argument makes `lld` stop doing that.
  • Loading branch information
hawkw authored Sep 27, 2021
1 parent 85ccb56 commit 057bfa1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[toolchain]
channel = "nightly-2021-06-05"
channel = "nightly-2021-09-22"
components = [
"clippy",
"rustfmt",
Expand Down
2 changes: 1 addition & 1 deletion util/src/io/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ impl Write for &mut [u8] {
#[inline]
fn write(&mut self, data: &[u8]) -> io::Result<usize> {
let amt = cmp::min(data.len(), self.len());
let (a, b) = mem::replace(self, &mut []).split_at_mut(amt);
let (a, b) = mem::take(self).split_at_mut(amt);
a.copy_from_slice(&data[..amt]);
*self = b;
Ok(amt)
Expand Down
8 changes: 7 additions & 1 deletion x86_64-mycelium.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@
"executables": true,
"linker-flavor": "ld.lld",
"linker": "rust-lld",
"post-link-args": {
"ld.lld": [
"-z",
"nostart-stop-gc"
]
},
"panic-strategy": "abort",
"disable-redzone": true,
"features": "-mmx,-sse,+soft-float"
}
}

0 comments on commit 057bfa1

Please sign in to comment.