Skip to content

Commit 125176d

Browse files
committed
Auto merge of rust-lang#130027 - GuillaumeGomez:rollup-8p0mzpe, r=GuillaumeGomez
Rollup of 7 pull requests Successful merges: - rust-lang#119229 (Update mingw-w64 + GNU toolchain) - rust-lang#128871 (bypass linker configuration and cross target check for specific commands) - rust-lang#128939 (Distribute rustc_codegen_cranelift for Windows) - rust-lang#129529 (Add test to build crates used by r-a on stable) - rust-lang#129624 (Adjust `memchr` pinning and run `cargo update`) - rust-lang#129835 (enable const-float-classify test, and test_next_up/down on 32bit x86) - rust-lang#130009 (rustdoc-search: allow trailing `Foo ->` arg search) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 59d4114 + 0ed26b5 commit 125176d

File tree

36 files changed

+833
-697
lines changed

36 files changed

+833
-697
lines changed

Cargo.lock

+153-131
Large diffs are not rendered by default.

compiler/rustc_ast/Cargo.toml

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ version = "0.0.0"
44
edition = "2021"
55

66
[dependencies]
7-
# FIXME: bumping memchr to 2.7.1 causes linker errors in MSVC thin-lto
87
# tidy-alphabetical-start
98
bitflags = "2.4.1"
10-
memchr = "=2.5.0"
9+
memchr = "2.7.4"
1110
rustc_ast_ir = { path = "../rustc_ast_ir" }
1211
rustc_data_structures = { path = "../rustc_data_structures" }
1312
rustc_index = { path = "../rustc_index" }

compiler/rustc_codegen_cranelift/Readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ For more docs on how to build and test see [build_system/usage.txt](build_system
7070
|AIX|[^xcoff]|N/A|N/A|[^xcoff]|
7171
|Other unixes|||||
7272
|macOS|||N/A|N/A|
73-
|Windows|[^no-rustup]||N/A|N/A|
73+
|Windows|||N/A|N/A|
7474

7575
✅: Fully supported and tested
7676
❓: Maybe supported, not tested

compiler/rustc_type_ir/src/elaborate.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ pub fn supertrait_def_ids<I: Interner>(
237237
cx: I,
238238
trait_def_id: I::DefId,
239239
) -> impl Iterator<Item = I::DefId> {
240-
let mut set: HashSet<I::DefId> = HashSet::default();
240+
let mut set = HashSet::default();
241241
let mut stack = vec![trait_def_id];
242242

243243
set.insert(trait_def_id);

library/Cargo.lock

+40-30
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,12 @@ checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f"
4242

4343
[[package]]
4444
name = "cc"
45-
version = "1.0.99"
45+
version = "1.1.15"
4646
source = "registry+https://github.com/rust-lang/crates.io-index"
47-
checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695"
47+
checksum = "57b6a275aa2903740dc87da01c62040406b8812552e97129a63ea8850a17c6e6"
48+
dependencies = [
49+
"shlex",
50+
]
4851

4952
[[package]]
5053
name = "cfg-if"
@@ -110,9 +113,9 @@ dependencies = [
110113

111114
[[package]]
112115
name = "gimli"
113-
version = "0.28.1"
116+
version = "0.29.0"
114117
source = "registry+https://github.com/rust-lang/crates.io-index"
115-
checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253"
118+
checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd"
116119
dependencies = [
117120
"compiler_builtins",
118121
"rustc-std-workspace-alloc",
@@ -121,9 +124,9 @@ dependencies = [
121124

122125
[[package]]
123126
name = "gimli"
124-
version = "0.29.0"
127+
version = "0.30.0"
125128
source = "registry+https://github.com/rust-lang/crates.io-index"
126-
checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd"
129+
checksum = "e2e1d97fbe9722ba9bbd0c97051c2956e726562b61f86a25a4360398a40edfc9"
127130
dependencies = [
128131
"compiler_builtins",
129132
"rustc-std-workspace-alloc",
@@ -186,9 +189,9 @@ dependencies = [
186189

187190
[[package]]
188191
name = "object"
189-
version = "0.36.2"
192+
version = "0.36.4"
190193
source = "registry+https://github.com/rust-lang/crates.io-index"
191-
checksum = "3f203fa8daa7bb185f760ae12bd8e097f63d17041dcdcaf675ac54cdf863170e"
194+
checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a"
192195
dependencies = [
193196
"compiler_builtins",
194197
"memchr",
@@ -312,6 +315,12 @@ dependencies = [
312315
"std",
313316
]
314317

318+
[[package]]
319+
name = "shlex"
320+
version = "1.3.0"
321+
source = "registry+https://github.com/rust-lang/crates.io-index"
322+
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
323+
315324
[[package]]
316325
name = "std"
317326
version = "0.0.0"
@@ -326,6 +335,7 @@ dependencies = [
326335
"hashbrown",
327336
"hermit-abi",
328337
"libc",
338+
"memchr",
329339
"miniz_oxide",
330340
"object",
331341
"panic_abort",
@@ -396,12 +406,12 @@ dependencies = [
396406

397407
[[package]]
398408
name = "unwinding"
399-
version = "0.2.1"
409+
version = "0.2.2"
400410
source = "registry+https://github.com/rust-lang/crates.io-index"
401-
checksum = "37a19a21a537f635c16c7576f22d0f2f7d63353c1337ad4ce0d8001c7952a25b"
411+
checksum = "dc55842d0db6329a669d55a623c674b02d677b16bfb2d24857d4089d41eba882"
402412
dependencies = [
403413
"compiler_builtins",
404-
"gimli 0.28.1",
414+
"gimli 0.30.0",
405415
"rustc-std-workspace-core",
406416
]
407417

@@ -422,7 +432,7 @@ version = "0.52.0"
422432
source = "registry+https://github.com/rust-lang/crates.io-index"
423433
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
424434
dependencies = [
425-
"windows-targets 0.52.5",
435+
"windows-targets 0.52.6",
426436
]
427437

428438
[[package]]
@@ -431,9 +441,9 @@ version = "0.0.0"
431441

432442
[[package]]
433443
name = "windows-targets"
434-
version = "0.52.5"
444+
version = "0.52.6"
435445
source = "registry+https://github.com/rust-lang/crates.io-index"
436-
checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb"
446+
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
437447
dependencies = [
438448
"windows_aarch64_gnullvm",
439449
"windows_aarch64_msvc",
@@ -447,48 +457,48 @@ dependencies = [
447457

448458
[[package]]
449459
name = "windows_aarch64_gnullvm"
450-
version = "0.52.5"
460+
version = "0.52.6"
451461
source = "registry+https://github.com/rust-lang/crates.io-index"
452-
checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263"
462+
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
453463

454464
[[package]]
455465
name = "windows_aarch64_msvc"
456-
version = "0.52.5"
466+
version = "0.52.6"
457467
source = "registry+https://github.com/rust-lang/crates.io-index"
458-
checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6"
468+
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
459469

460470
[[package]]
461471
name = "windows_i686_gnu"
462-
version = "0.52.5"
472+
version = "0.52.6"
463473
source = "registry+https://github.com/rust-lang/crates.io-index"
464-
checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670"
474+
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
465475

466476
[[package]]
467477
name = "windows_i686_gnullvm"
468-
version = "0.52.5"
478+
version = "0.52.6"
469479
source = "registry+https://github.com/rust-lang/crates.io-index"
470-
checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9"
480+
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
471481

472482
[[package]]
473483
name = "windows_i686_msvc"
474-
version = "0.52.5"
484+
version = "0.52.6"
475485
source = "registry+https://github.com/rust-lang/crates.io-index"
476-
checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf"
486+
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
477487

478488
[[package]]
479489
name = "windows_x86_64_gnu"
480-
version = "0.52.5"
490+
version = "0.52.6"
481491
source = "registry+https://github.com/rust-lang/crates.io-index"
482-
checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9"
492+
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
483493

484494
[[package]]
485495
name = "windows_x86_64_gnullvm"
486-
version = "0.52.5"
496+
version = "0.52.6"
487497
source = "registry+https://github.com/rust-lang/crates.io-index"
488-
checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596"
498+
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
489499

490500
[[package]]
491501
name = "windows_x86_64_msvc"
492-
version = "0.52.5"
502+
version = "0.52.6"
493503
source = "registry+https://github.com/rust-lang/crates.io-index"
494-
checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0"
504+
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"

library/core/src/num/f16.rs

+1
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,7 @@ impl f16 {
435435
// WASM, see llvm/llvm-project#96437). These are platforms bugs, and Rust will misbehave on
436436
// such platforms, but we can at least try to make things seem as sane as possible by being
437437
// careful here.
438+
// see also https://github.com/rust-lang/rust/issues/114479
438439
if self.is_infinite() {
439440
// Thus, a value may compare unequal to infinity, despite having a "full" exponent mask.
440441
FpCategory::Infinite

library/core/src/num/f32.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -662,10 +662,7 @@ impl f32 {
662662
// hardware flushes subnormals to zero. These are platforms bugs, and Rust will misbehave on
663663
// such hardware, but we can at least try to make things seem as sane as possible by being
664664
// careful here.
665-
//
666-
// FIXME(jubilee): Using x87 operations is never necessary in order to function
667-
// on x86 processors for Rust-to-Rust calls, so this issue should not happen.
668-
// Code generation should be adjusted to use non-C calling conventions, avoiding this.
665+
// see also https://github.com/rust-lang/rust/issues/114479
669666
if self.is_infinite() {
670667
// A value may compare unequal to infinity, despite having a "full" exponent mask.
671668
FpCategory::Infinite

library/core/src/num/f64.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -660,10 +660,7 @@ impl f64 {
660660
// float semantics Rust relies on: x87 uses a too-large exponent, and some hardware flushes
661661
// subnormals to zero. These are platforms bugs, and Rust will misbehave on such hardware,
662662
// but we can at least try to make things seem as sane as possible by being careful here.
663-
//
664-
// FIXME(jubilee): Using x87 operations is never necessary in order to function
665-
// on x86 processors for Rust-to-Rust calls, so this issue should not happen.
666-
// Code generation should be adjusted to use non-C calling conventions, avoiding this.
663+
// see also https://github.com/rust-lang/rust/issues/114479
667664
//
668665
// Thus, a value may compare unequal to infinity, despite having a "full" exponent mask.
669666
// And it may not be NaN, as it can simply be an "overextended" finite value.

library/std/Cargo.toml

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ unwind = { path = "../unwind" }
2323
hashbrown = { version = "0.14", default-features = false, features = [
2424
'rustc-dep-of-std',
2525
] }
26+
# FIXME(#127890): `object` depends on `memchr`, but `memchr` > v2.5 causes
27+
# issues with LTO. This dependency is not used directly, but pin it here so
28+
# it is resolved 2.5. To be removed once rust-lang/rust#127890 is fixed.
29+
memchr = { version = "=2.5.0", default-features = false, features = ["rustc-dep-of-std"] }
2630
std_detect = { path = "../stdarch/crates/std_detect", default-features = false, features = [
2731
'rustc-dep-of-std',
2832
] }

library/std/src/f32/tests.rs

-13
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,24 @@ use crate::f32::consts;
22
use crate::num::{FpCategory as Fp, *};
33

44
/// Smallest number
5-
#[allow(dead_code)] // unused on x86
65
const TINY_BITS: u32 = 0x1;
76

87
/// Next smallest number
9-
#[allow(dead_code)] // unused on x86
108
const TINY_UP_BITS: u32 = 0x2;
119

1210
/// Exponent = 0b11...10, Sifnificand 0b1111..10. Min val > 0
13-
#[allow(dead_code)] // unused on x86
1411
const MAX_DOWN_BITS: u32 = 0x7f7f_fffe;
1512

1613
/// Zeroed exponent, full significant
17-
#[allow(dead_code)] // unused on x86
1814
const LARGEST_SUBNORMAL_BITS: u32 = 0x007f_ffff;
1915

2016
/// Exponent = 0b1, zeroed significand
21-
#[allow(dead_code)] // unused on x86
2217
const SMALLEST_NORMAL_BITS: u32 = 0x0080_0000;
2318

2419
/// First pattern over the mantissa
25-
#[allow(dead_code)] // unused on x86
2620
const NAN_MASK1: u32 = 0x002a_aaaa;
2721

2822
/// Second pattern over the mantissa
29-
#[allow(dead_code)] // unused on x86
3023
const NAN_MASK2: u32 = 0x0055_5555;
3124

3225
#[allow(unused_macros)]
@@ -353,9 +346,6 @@ fn test_is_sign_negative() {
353346
assert!((-f32::NAN).is_sign_negative());
354347
}
355348

356-
// Ignore test on x87 floating point, these platforms do not guarantee NaN
357-
// payloads are preserved and flush denormals to zero, failing the tests.
358-
#[cfg(not(target_arch = "x86"))]
359349
#[test]
360350
fn test_next_up() {
361351
let tiny = f32::from_bits(TINY_BITS);
@@ -386,9 +376,6 @@ fn test_next_up() {
386376
assert_f32_biteq!(nan2.next_up(), nan2);
387377
}
388378

389-
// Ignore test on x87 floating point, these platforms do not guarantee NaN
390-
// payloads are preserved and flush denormals to zero, failing the tests.
391-
#[cfg(not(target_arch = "x86"))]
392379
#[test]
393380
fn test_next_down() {
394381
let tiny = f32::from_bits(TINY_BITS);

library/std/src/f64/tests.rs

-13
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,24 @@ use crate::f64::consts;
22
use crate::num::{FpCategory as Fp, *};
33

44
/// Smallest number
5-
#[allow(dead_code)] // unused on x86
65
const TINY_BITS: u64 = 0x1;
76

87
/// Next smallest number
9-
#[allow(dead_code)] // unused on x86
108
const TINY_UP_BITS: u64 = 0x2;
119

1210
/// Exponent = 0b11...10, Sifnificand 0b1111..10. Min val > 0
13-
#[allow(dead_code)] // unused on x86
1411
const MAX_DOWN_BITS: u64 = 0x7fef_ffff_ffff_fffe;
1512

1613
/// Zeroed exponent, full significant
17-
#[allow(dead_code)] // unused on x86
1814
const LARGEST_SUBNORMAL_BITS: u64 = 0x000f_ffff_ffff_ffff;
1915

2016
/// Exponent = 0b1, zeroed significand
21-
#[allow(dead_code)] // unused on x86
2217
const SMALLEST_NORMAL_BITS: u64 = 0x0010_0000_0000_0000;
2318

2419
/// First pattern over the mantissa
25-
#[allow(dead_code)] // unused on x86
2620
const NAN_MASK1: u64 = 0x000a_aaaa_aaaa_aaaa;
2721

2822
/// Second pattern over the mantissa
29-
#[allow(dead_code)] // unused on x86
3023
const NAN_MASK2: u64 = 0x0005_5555_5555_5555;
3124

3225
#[allow(unused_macros)]
@@ -343,9 +336,6 @@ fn test_is_sign_negative() {
343336
assert!((-f64::NAN).is_sign_negative());
344337
}
345338

346-
// Ignore test on x87 floating point, these platforms do not guarantee NaN
347-
// payloads are preserved and flush denormals to zero, failing the tests.
348-
#[cfg(not(target_arch = "x86"))]
349339
#[test]
350340
fn test_next_up() {
351341
let tiny = f64::from_bits(TINY_BITS);
@@ -375,9 +365,6 @@ fn test_next_up() {
375365
assert_f64_biteq!(nan2.next_up(), nan2);
376366
}
377367

378-
// Ignore test on x87 floating point, these platforms do not guarantee NaN
379-
// payloads are preserved and flush denormals to zero, failing the tests.
380-
#[cfg(not(target_arch = "x86"))]
381368
#[test]
382369
fn test_next_down() {
383370
let tiny = f64::from_bits(TINY_BITS);

src/bootstrap/src/core/build_steps/dist.rs

+3-12
Original file line numberDiff line numberDiff line change
@@ -1348,18 +1348,9 @@ impl Step for CodegenBackend {
13481348
return None;
13491349
}
13501350

1351-
if self.backend == "cranelift" {
1352-
if !target_supports_cranelift_backend(self.compiler.host) {
1353-
builder.info("target not supported by rustc_codegen_cranelift. skipping");
1354-
return None;
1355-
}
1356-
1357-
if self.compiler.host.is_windows() {
1358-
builder.info(
1359-
"dist currently disabled for windows by rustc_codegen_cranelift. skipping",
1360-
);
1361-
return None;
1362-
}
1351+
if self.backend == "cranelift" && !target_supports_cranelift_backend(self.compiler.host) {
1352+
builder.info("target not supported by rustc_codegen_cranelift. skipping");
1353+
return None;
13631354
}
13641355

13651356
let compiler = self.compiler;

src/bootstrap/src/core/builder.rs

+9-1
Original file line numberDiff line numberDiff line change
@@ -2463,7 +2463,15 @@ impl Cargo {
24632463
cmd_kind: Kind,
24642464
) -> Cargo {
24652465
let mut cargo = builder.cargo(compiler, mode, source_type, target, cmd_kind);
2466-
cargo.configure_linker(builder);
2466+
2467+
match cmd_kind {
2468+
// No need to configure the target linker for these command types.
2469+
Kind::Clean | Kind::Check | Kind::Suggest | Kind::Format | Kind::Setup => {}
2470+
_ => {
2471+
cargo.configure_linker(builder);
2472+
}
2473+
}
2474+
24672475
cargo
24682476
}
24692477

0 commit comments

Comments
 (0)