Skip to content

Commit 40dcd79

Browse files
committed
Auto merge of rust-lang#124302 - matthiaskrgr:rollup-2aya8n8, r=matthiaskrgr
Rollup of 3 pull requests Successful merges: - rust-lang#124003 (Dellvmize some intrinsics (use `u32` instead of `Self` in some integer intrinsics)) - rust-lang#124169 (Don't fatal when calling `expect_one_of` when recovering arg in `parse_seq`) - rust-lang#124286 (Subtree sync for rustc_codegen_cranelift) r? `@ghost` `@rustbot` modify labels: rollup
2 parents c2f2db7 + a760954 commit 40dcd79

File tree

46 files changed

+482
-263
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+482
-263
lines changed

compiler/rustc_codegen_cranelift/Cargo.lock

Lines changed: 90 additions & 149 deletions
Large diffs are not rendered by default.

compiler/rustc_codegen_cranelift/Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ crate-type = ["dylib"]
88

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

2121
indexmap = "2.0.0"
2222
libloading = { version = "0.8.0", optional = true }

compiler/rustc_codegen_cranelift/build_system/abi_cafe.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,13 @@ pub(crate) fn run(
4343
let mut cmd = ABI_CAFE.run(bootstrap_host_compiler, dirs);
4444
cmd.arg("--");
4545
cmd.arg("--pairs");
46-
cmd.args(pairs);
46+
cmd.args(
47+
if cfg!(not(any(target_os = "macos", all(target_os = "windows", target_env = "msvc")))) {
48+
&pairs[..]
49+
} else {
50+
&pairs[..2]
51+
},
52+
);
4753
cmd.arg("--add-rustc-codegen-backend");
4854
match cg_clif_dylib {
4955
CodegenBackend::Local(path) => {

compiler/rustc_codegen_cranelift/build_system/tests.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ pub(crate) fn run_tests(
290290
&& !skip_tests.contains(&"testsuite.extended_sysroot");
291291

292292
if run_base_sysroot || run_extended_sysroot {
293-
let mut target_compiler = build_sysroot::build_sysroot(
293+
let target_compiler = build_sysroot::build_sysroot(
294294
dirs,
295295
channel,
296296
sysroot_kind,
@@ -299,11 +299,8 @@ pub(crate) fn run_tests(
299299
rustup_toolchain_name,
300300
target_triple.clone(),
301301
);
302-
// Rust's build system denies a couple of lints that trigger on several of the test
303-
// projects. Changing the code to fix them is not worth it, so just silence all lints.
304-
target_compiler.rustflags.push("--cap-lints=allow".to_owned());
305302

306-
let runner = TestRunner::new(
303+
let mut runner = TestRunner::new(
307304
dirs.clone(),
308305
target_compiler,
309306
use_unstable_features,
@@ -319,6 +316,9 @@ pub(crate) fn run_tests(
319316
}
320317

321318
if run_extended_sysroot {
319+
// Rust's build system denies a couple of lints that trigger on several of the test
320+
// projects. Changing the code to fix them is not worth it, so just silence all lints.
321+
runner.target_compiler.rustflags.push("--cap-lints=allow".to_owned());
322322
runner.run_testsuite(EXTENDED_SYSROOT_SUITE);
323323
} else {
324324
eprintln!("[SKIP] extended_sysroot tests");

compiler/rustc_codegen_cranelift/example/alloc_example.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![feature(start, core_intrinsics, alloc_error_handler, lang_items)]
2+
#![allow(internal_features)]
23
#![no_std]
34

45
extern crate alloc;

compiler/rustc_codegen_cranelift/example/alloc_system.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ mod platform {
8080
extern "system" {
8181
fn GetProcessHeap() -> HANDLE;
8282
fn HeapAlloc(hHeap: HANDLE, dwFlags: DWORD, dwBytes: SIZE_T) -> LPVOID;
83-
fn HeapReAlloc(hHeap: HANDLE, dwFlags: DWORD, lpMem: LPVOID, dwBytes: SIZE_T) -> LPVOID;
8483
fn HeapFree(hHeap: HANDLE, dwFlags: DWORD, lpMem: LPVOID) -> BOOL;
8584
fn GetLastError() -> DWORD;
8685
}
@@ -111,7 +110,7 @@ mod platform {
111110
allocate_with_flags(layout, HEAP_ZERO_MEMORY)
112111
}
113112
#[inline]
114-
unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout) {
113+
unsafe fn dealloc(&self, ptr: *mut u8, _layout: Layout) {
115114
let header = get_header(ptr);
116115
let err = HeapFree(GetProcessHeap(), 0, header.0 as LPVOID);
117116
debug_assert!(err != 0, "Failed to free heap memory: {}", GetLastError());

compiler/rustc_codegen_cranelift/example/example.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ pub fn array_as_slice(arr: &[u8; 3]) -> &[u8] {
149149
arr
150150
}
151151

152-
pub unsafe fn use_ctlz_nonzero(a: u16) -> u16 {
152+
pub unsafe fn use_ctlz_nonzero(a: u16) -> u32 {
153153
intrinsics::ctlz_nonzero(a)
154154
}
155155

compiler/rustc_codegen_cranelift/example/float-minmax-pass.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Test that the simd_f{min,max} intrinsics produce the correct results.
66

77
#![feature(repr_simd, core_intrinsics)]
8-
#![allow(non_camel_case_types)]
8+
#![allow(internal_features, non_camel_case_types)]
99

1010
#[repr(simd)]
1111
#[derive(Copy, Clone, PartialEq, Debug)]

compiler/rustc_codegen_cranelift/example/mini_core.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ pub mod intrinsics {
627627
pub fn min_align_of_val<T: ?::Sized>(val: *const T) -> usize;
628628
pub fn copy<T>(src: *const T, dst: *mut T, count: usize);
629629
pub fn transmute<T, U>(e: T) -> U;
630-
pub fn ctlz_nonzero<T>(x: T) -> T;
630+
pub fn ctlz_nonzero<T>(x: T) -> u32;
631631
#[rustc_safe_intrinsic]
632632
pub fn needs_drop<T: ?::Sized>() -> bool;
633633
#[rustc_safe_intrinsic]

compiler/rustc_codegen_cranelift/example/mod_bench.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![feature(start, core_intrinsics, lang_items)]
2+
#![allow(internal_features)]
23
#![no_std]
34

45
#[cfg_attr(unix, link(name = "c"))]

0 commit comments

Comments
 (0)