Skip to content

Commit 400cd47

Browse files
committed
Auto merge of rust-lang#118279 - bjorn3:sync_cg_clif-2023-11-25, r=bjorn3
Subtree sync for rustc_codegen_cranelift The main highlights this time are implementing a bunch of new vendor intrinsics and fixing some existing ones. And fixing polymorphization for coroutines. r? `@ghost` `@rustbot` label +A-codegen +A-cranelift +T-compiler
2 parents abf0832 + 1988cf4 commit 400cd47

10 files changed

+452
-71
lines changed

Cargo.lock

+30-30
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ crate-type = ["dylib"]
88

99
[dependencies]
1010
# These have to be in sync with each other
11-
cranelift-codegen = { version = "0.101.2", default-features = false, features = ["std", "unwind", "all-arch"] }
12-
cranelift-frontend = { version = "0.101.2" }
13-
cranelift-module = { version = "0.101.2" }
14-
cranelift-native = { version = "0.101.2" }
15-
cranelift-jit = { version = "0.101.2", optional = true }
16-
cranelift-object = { version = "0.101.2" }
11+
cranelift-codegen = { version = "0.102", default-features = false, features = ["std", "unwind", "all-arch"] }
12+
cranelift-frontend = { version = "0.102" }
13+
cranelift-module = { version = "0.102" }
14+
cranelift-native = { version = "0.102" }
15+
cranelift-jit = { version = "0.102", optional = true }
16+
cranelift-object = { version = "0.102" }
1717
target-lexicon = "0.12.0"
1818
gimli = { version = "0.28", default-features = false, features = ["write"]}
1919
object = { version = "0.32", default-features = false, features = ["std", "read_core", "write", "archive", "coff", "elf", "macho", "pe"] }

build_system/tests.rs

+5
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ const BASE_SYSROOT_SUITE: &[TestCase] = &[
9999
TestCase::build_bin_and_run("aot.mod_bench", "example/mod_bench.rs", &[]),
100100
TestCase::build_bin_and_run("aot.issue-72793", "example/issue-72793.rs", &[]),
101101
TestCase::build_bin("aot.issue-59326", "example/issue-59326.rs"),
102+
TestCase::custom("aot.polymorphize_coroutine", &|runner| {
103+
runner.run_rustc(&["example/polymorphize_coroutine.rs", "-Zpolymorphize"]);
104+
runner.run_out_command("polymorphize_coroutine", &[]);
105+
}),
102106
TestCase::build_bin_and_run("aot.neon", "example/neon.rs", &[]),
103107
TestCase::custom("aot.gen_block_iterate", &|runner| {
104108
runner.run_rustc([
@@ -466,6 +470,7 @@ impl<'a> TestRunner<'a> {
466470
cmd.arg("--target");
467471
cmd.arg(&self.target_compiler.triple);
468472
cmd.arg("-Cpanic=abort");
473+
cmd.arg("-Zunstable-options");
469474
cmd.arg("--check-cfg=cfg(no_unstable_features)");
470475
cmd.arg("--check-cfg=cfg(jit)");
471476
cmd.args(args);

config.txt

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ aot.float-minmax-pass
4242
aot.mod_bench
4343
aot.issue-72793
4444
aot.issue-59326
45+
aot.polymorphize_coroutine
4546
aot.neon
4647
aot.gen_block_iterate
4748

example/polymorphize_coroutine.rs

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#![feature(coroutines, coroutine_trait)]
2+
3+
use std::ops::Coroutine;
4+
use std::pin::Pin;
5+
6+
fn main() {
7+
run_coroutine::<i32>();
8+
}
9+
10+
fn run_coroutine<T>() {
11+
let mut coroutine = || {
12+
yield;
13+
return;
14+
};
15+
Pin::new(&mut coroutine).resume(());
16+
}

rust-toolchain

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "nightly-2023-11-16"
2+
channel = "nightly-2023-11-25"
33
components = ["rust-src", "rustc-dev", "llvm-tools"]

scripts/test_rustc_tests.sh

-5
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,6 @@ rm tests/ui/process/nofile-limit.rs # TODO some AArch64 linking issue
146146

147147
rm tests/ui/stdio-is-blocking.rs # really slow with unoptimized libstd
148148

149-
# rustc bugs
150-
# ==========
151-
# https://github.com/rust-lang/rust/pull/116447#issuecomment-1790451463
152-
rm tests/ui/coroutine/gen_block_*.rs
153-
154149
cp ../dist/bin/rustdoc-clif ../dist/bin/rustdoc # some tests expect bin/rustdoc to exist
155150

156151
# prevent $(RUSTDOC) from picking up the sysroot built by x.py. It conflicts with the one used by

0 commit comments

Comments
 (0)