Use stable Rust on CI to test the x64 backend (#2766)

* Use stable Rust on CI to test the x64 backend

This commit leverages the newly-released 1.51.0 compiler to test the
new backend on Windows and Linux with a stable compiler instead of a
nightly compiler. This isolates the nightly build to just the nightly
documentation generation and fuzzing, both of which rely on nightly for
the best results right now.

* Use updated stable in book build job

* Run rustfmt for new stable

* Silence new warnings for wasi-nn

* Allow some dead code in the x64 backend

Looks like new rustc is better about emitting some dead-code warnings

* Update rust in peepmatic job

* Fix a test in the pooling allocator

* Remove `package.metdata.docs.rs` temporarily

Needs resolution of https://github.com/rust-lang/cargo/pull/9300 first

* Fix a warning in a wasi-nn example
This commit is contained in:
Alex Crichton
2021-03-25 13:18:59 -05:00
committed by GitHub
parent 55006b5044
commit 3f694ae319
12 changed files with 31 additions and 44 deletions

View File

@@ -90,7 +90,10 @@ impl UnwindRegistry {
let mut eh_frame = EhFrame(EndianVec::new(RunTimeEndian::default()));
table.write_eh_frame(&mut eh_frame).unwrap();
if cfg!(any(all(target_os = "linux", target_env = "gnu"), target_os = "freebsd")) {
if cfg!(any(
all(target_os = "linux", target_env = "gnu"),
target_os = "freebsd"
)) {
// libgcc expects a terminating "empty" length, so write a 0 length at the end of the table.
eh_frame.0.write_u32(0).unwrap();
}
@@ -101,7 +104,10 @@ impl UnwindRegistry {
}
unsafe fn register_frames(&mut self) {
if cfg!(any(all(target_os = "linux", target_env = "gnu"), target_os = "freebsd")) {
if cfg!(any(
all(target_os = "linux", target_env = "gnu"),
target_os = "freebsd"
)) {
// On gnu (libgcc), `__register_frame` will walk the FDEs until an entry of length 0
let ptr = self.frame_table.as_ptr();
__register_frame(ptr);

View File

@@ -1618,7 +1618,7 @@ mod test {
}
#[cfg_attr(target_arch = "aarch64", ignore)] // https://github.com/bytecodealliance/wasmtime/pull/2518#issuecomment-747280133
#[cfg(all(unix, target_pointer_width = "64"))]
#[cfg(all(unix, target_pointer_width = "64", feature = "async"))]
#[test]
fn test_stack_zeroed() -> Result<()> {
let allocator = PoolingInstanceAllocator::new(

View File

@@ -49,7 +49,8 @@ pub fn main() {
0,
&mut output_buffer[..] as *mut [f32] as *mut u8,
(output_buffer.len() * 4).try_into().unwrap(),
);
)
.unwrap();
}
println!(
"Found results, sorted top 5: {:?}",

View File

@@ -152,6 +152,7 @@ pub unsafe fn compute(context: GraphExecutionContext) -> Result<()> {
}
}
#[allow(improper_ctypes)]
pub mod wasi_ephemeral_nn {
use super::*;
#[link(wasm_import_module = "wasi_ephemeral_nn")]

View File

@@ -9,8 +9,9 @@ repository = "https://github.com/bytecodealliance/wasmtime"
readme = "README.md"
edition = "2018"
[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "nightlydoc"]
# FIXME(rust-lang/cargo#9300): uncomment once that lands
# [package.metadata.docs.rs]
# rustdoc-args = ["--cfg", "nightlydoc"]
[dependencies]
wasmtime-runtime = { path = "../runtime", version = "0.25.0" }