Skip to content

Commit b507807

Browse files
committed
Auto merge of #146746 - jhpratt:rollup-1nblzea, r=jhpratt
Rollup of 8 pull requests Successful merges: - #146229 (Automatically switch to lto-fat when flag RUSTFLAGS="- Zautodiff=Enable" is set) - #146615 (rustc_codegen_llvm: Feature Conversion Tidying) - #146638 (`rustc_next_trait_solver`: canonical out of `EvalCtxt`) - #146663 (Allow windows resource compiler to be overridden) - #146691 (std: Fix WASI implementation of `remove_dir_all`) - #146709 (stdarch subtree update) - #146731 (test: Use SVG for terminal url test) - #146738 (Fix tidy spellchecking on Windows) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 2f4dfc7 + 795550c commit b507807

File tree

73 files changed

+3577
-11965
lines changed

Some content is hidden

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

73 files changed

+3577
-11965
lines changed

Cargo.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ dependencies = [
128128

129129
[[package]]
130130
name = "anstyle-svg"
131-
version = "0.1.10"
131+
version = "0.1.11"
132132
source = "registry+https://github.com/rust-lang/crates.io-index"
133-
checksum = "dc03a770ef506fe1396c0e476120ac0e6523cf14b74218dd5f18cd6833326fa9"
133+
checksum = "26b9ec8c976eada1b0f9747a3d7cc4eae3bef10613e443746e7487f26c872fde"
134134
dependencies = [
135135
"anstyle",
136136
"anstyle-lossy",
@@ -674,7 +674,7 @@ checksum = "fe6d2e5af09e8c8ad56c969f2157a3d4238cebc7c55f0a517728c38f7b200f81"
674674
dependencies = [
675675
"serde",
676676
"termcolor",
677-
"unicode-width 0.1.14",
677+
"unicode-width 0.2.1",
678678
]
679679

680680
[[package]]

bootstrap.example.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,9 @@
325325
# Defaults to the Python interpreter used to execute x.py.
326326
#build.python = "python"
327327

328+
# The path to (or name of) the resource compiler executable to use on Windows.
329+
#build.windows-rc = "rc.exe"
330+
328331
# The path to the REUSE executable to use. Note that REUSE is not required in
329332
# most cases, as our tooling relies on a cached (and shrunk) copy of the
330333
# REUSE output present in the git repository and in our source tarballs.

compiler/rustc_codegen_llvm/src/llvm_util.rs

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -217,27 +217,16 @@ impl<'a> IntoIterator for LLVMFeature<'a> {
217217
/// Rust can also be build with an external precompiled version of LLVM which might lead to failures
218218
/// if the oldest tested / supported LLVM version doesn't yet support the relevant intrinsics.
219219
pub(crate) fn to_llvm_features<'a>(sess: &Session, s: &'a str) -> Option<LLVMFeature<'a>> {
220-
let arch = if sess.target.arch == "x86_64" {
221-
"x86"
222-
} else if sess.target.arch == "arm64ec" {
223-
"aarch64"
224-
} else if sess.target.arch == "sparc64" {
225-
"sparc"
226-
} else if sess.target.arch == "powerpc64" {
227-
"powerpc"
228-
} else {
229-
&*sess.target.arch
220+
let raw_arch = &*sess.target.arch;
221+
let arch = match raw_arch {
222+
"x86_64" => "x86",
223+
"arm64ec" => "aarch64",
224+
"sparc64" => "sparc",
225+
"powerpc64" => "powerpc",
226+
_ => raw_arch,
230227
};
228+
let (major, _, _) = get_version();
231229
match (arch, s) {
232-
("x86", "sse4.2") => Some(LLVMFeature::with_dependencies(
233-
"sse4.2",
234-
smallvec![TargetFeatureFoldStrength::EnableOnly("crc32")],
235-
)),
236-
("x86", "pclmulqdq") => Some(LLVMFeature::new("pclmul")),
237-
("x86", "rdrand") => Some(LLVMFeature::new("rdrnd")),
238-
("x86", "bmi1") => Some(LLVMFeature::new("bmi")),
239-
("x86", "cmpxchg16b") => Some(LLVMFeature::new("cx16")),
240-
("x86", "lahfsahf") => Some(LLVMFeature::new("sahf")),
241230
("aarch64", "rcpc2") => Some(LLVMFeature::new("rcpc-immo")),
242231
("aarch64", "dpb") => Some(LLVMFeature::new("ccpp")),
243232
("aarch64", "dpb2") => Some(LLVMFeature::new("ccdp")),
@@ -260,14 +249,23 @@ pub(crate) fn to_llvm_features<'a>(sess: &Session, s: &'a str) -> Option<LLVMFea
260249
("aarch64", "fpmr") => None, // only existed in 18
261250
("arm", "fp16") => Some(LLVMFeature::new("fullfp16")),
262251
// Filter out features that are not supported by the current LLVM version
263-
("loongarch32" | "loongarch64", "32s") if get_version().0 < 21 => None,
252+
("loongarch32" | "loongarch64", "32s") if major < 21 => None,
253+
("powerpc", "power8-crypto") => Some(LLVMFeature::new("crypto")),
254+
("sparc", "leoncasa") => Some(LLVMFeature::new("hasleoncasa")),
255+
("x86", "sse4.2") => Some(LLVMFeature::with_dependencies(
256+
"sse4.2",
257+
smallvec![TargetFeatureFoldStrength::EnableOnly("crc32")],
258+
)),
259+
("x86", "pclmulqdq") => Some(LLVMFeature::new("pclmul")),
260+
("x86", "rdrand") => Some(LLVMFeature::new("rdrnd")),
261+
("x86", "bmi1") => Some(LLVMFeature::new("bmi")),
262+
("x86", "cmpxchg16b") => Some(LLVMFeature::new("cx16")),
263+
("x86", "lahfsahf") => Some(LLVMFeature::new("sahf")),
264264
// Enable the evex512 target feature if an avx512 target feature is enabled.
265265
("x86", s) if s.starts_with("avx512") => Some(LLVMFeature::with_dependencies(
266266
s,
267267
smallvec![TargetFeatureFoldStrength::EnableOnly("evex512")],
268268
)),
269-
("sparc", "leoncasa") => Some(LLVMFeature::new("hasleoncasa")),
270-
("powerpc", "power8-crypto") => Some(LLVMFeature::new("crypto")),
271269
("x86", "avx10.1") => Some(LLVMFeature::new("avx10.1-512")),
272270
("x86", "avx10.2") => Some(LLVMFeature::new("avx10.2-512")),
273271
("x86", "apxf") => Some(LLVMFeature::with_dependencies(

compiler/rustc_codegen_ssa/messages.ftl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ codegen_ssa_aix_strip_not_used = using host's `strip` binary to cross-compile to
88
99
codegen_ssa_archive_build_failure = failed to build archive at `{$path}`: {$error}
1010
11-
codegen_ssa_autodiff_without_lto = using the autodiff feature requires using fat-lto
12-
1311
codegen_ssa_bare_instruction_set = `#[instruction_set]` requires an argument
1412
1513
codegen_ssa_binary_output_to_tty = option `-o` or `--emit` is used to write binary output type `{$shorthand}` to stdout, but stdout is a tty

compiler/rustc_codegen_ssa/src/errors.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ pub(crate) struct CguNotRecorded<'a> {
3737
pub cgu_name: &'a str,
3838
}
3939

40-
#[derive(Diagnostic)]
41-
#[diag(codegen_ssa_autodiff_without_lto)]
42-
pub struct AutodiffWithoutLto;
43-
4440
#[derive(Diagnostic)]
4541
#[diag(codegen_ssa_unknown_reuse_kind)]
4642
pub(crate) struct UnknownReuseKind {

compiler/rustc_next_trait_solver/src/canonicalizer.rs renamed to compiler/rustc_next_trait_solver/src/canonical/canonicalizer.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ enum CanonicalizeMode {
5757
},
5858
}
5959

60-
pub struct Canonicalizer<'a, D: SolverDelegate<Interner = I>, I: Interner> {
60+
pub(super) struct Canonicalizer<'a, D: SolverDelegate<Interner = I>, I: Interner> {
6161
delegate: &'a D,
6262

6363
// Immutable field.
@@ -83,7 +83,7 @@ pub struct Canonicalizer<'a, D: SolverDelegate<Interner = I>, I: Interner> {
8383
}
8484

8585
impl<'a, D: SolverDelegate<Interner = I>, I: Interner> Canonicalizer<'a, D, I> {
86-
pub fn canonicalize_response<T: TypeFoldable<I>>(
86+
pub(super) fn canonicalize_response<T: TypeFoldable<I>>(
8787
delegate: &'a D,
8888
max_input_universe: ty::UniverseIndex,
8989
variables: &'a mut Vec<I::GenericArg>,
@@ -112,7 +112,6 @@ impl<'a, D: SolverDelegate<Interner = I>, I: Interner> Canonicalizer<'a, D, I> {
112112
let (max_universe, variables) = canonicalizer.finalize();
113113
Canonical { max_universe, variables, value }
114114
}
115-
116115
fn canonicalize_param_env(
117116
delegate: &'a D,
118117
variables: &'a mut Vec<I::GenericArg>,
@@ -195,7 +194,7 @@ impl<'a, D: SolverDelegate<Interner = I>, I: Interner> Canonicalizer<'a, D, I> {
195194
///
196195
/// We want to keep the option of canonicalizing `'static` to an existential
197196
/// variable in the future by changing the way we detect global where-bounds.
198-
pub fn canonicalize_input<P: TypeFoldable<I>>(
197+
pub(super) fn canonicalize_input<P: TypeFoldable<I>>(
199198
delegate: &'a D,
200199
variables: &'a mut Vec<I::GenericArg>,
201200
input: QueryInput<I, P>,

0 commit comments

Comments
 (0)