1
Fork 0
Commit graph

285227 commits

Author SHA1 Message Date
Ralf Jung
b2d7271858 target spec check: better error when llvm-floatabi is missing 2025-03-21 16:08:48 +01:00
Matthias Krüger
bc46c98dd8
Rollup merge of #138721 - jchecahi:tests-explicit-cpus, r=tgross35
Use explicit cpu in some asm and codegen tests.

Some tests expect to be compiled for a specific CPU or require certain target features to be present (or absent). These tests work fine with default CPUs but fail in downstream builds for RHEL and Fedora, where we use non-default CPUs such as z13 on s390x, pwr9 on ppc64le, or x86-64-v2/x86-64-v3 on x86_64.

This is similar to #124597.
2025-03-21 15:48:58 +01:00
Matthias Krüger
7c2475e9aa
Rollup merge of #138717 - jdonszelmann:pin-macro, r=WaffleLapkin
Add an attribute that makes the spans from a macro edition 2021, and fix pin on edition 2024 with it

Fixes a regression, see issue below. This is a temporary fix, super let is the real solution.

Closes #138596
2025-03-21 15:48:57 +01:00
Matthias Krüger
a27b21e53a
Rollup merge of #138709 - Kobzol:update-gcc, r=GuillaumeGomez
Update GCC submodule

Includes https://github.com/rust-lang/gcc/pull/66 to use our mirrors for downloading GCC dependencies.

r? ```@GuillaumeGomez```
2025-03-21 15:48:57 +01:00
Matthias Krüger
ed3a39da7f
Rollup merge of #138706 - Kobzol:bootstrap-git-refactor-1, r=onur-ozkan
Improve bootstrap git modified path handling

Drive-by improvements extracted out of https://github.com/rust-lang/rust/pull/138591.

r? ``@onur-ozkan``
2025-03-21 15:48:56 +01:00
Matthias Krüger
015df66ee2
Rollup merge of #138669 - durin42:llvm-21-anon-func-unmangled, r=bjorn3
tests: accept some noise from LLVM 21 in symbols-all-mangled

I'm not entirely sure this is correct, but it doesn't feel obviously-wrong so I figured I'd just start by sending a PR rather than filing a bug and letting it linger.

``@rustbot`` label llvm-main
2025-03-21 15:48:55 +01:00
Matthias Krüger
0c594da55f
Rollup merge of #138627 - EnzymeAD:autodiff-cleanups, r=oli-obk
Autodiff cleanups

Splitting out some cleanups to reduce the size of my batching PR and simplify ``@haenoe`` 's [PR](https://github.com/rust-lang/rust/pull/138314).

r? ``@oli-obk``

Tracking:

- https://github.com/rust-lang/rust/issues/124509
2025-03-21 15:48:55 +01:00
Matthias Krüger
a8f0c6bbcb
Rollup merge of #138623 - daltenty:daltenty/fix-compiler-rt, r=Kobzol
[bootstrap] Use llvm_runtimes for compiler-rt

Trying to enable `compiler-rt` via `LLVM_ENABLE_PROJECTS` is no longer a supported option in LLVM, and gives you nasty warnings:
```
Using LLVM_ENABLE_PROJECTS=compiler-rt is deprecated now, and will become a
  fatal error in the LLVM 21 release.  Please use
  -DLLVM_ENABLE_RUNTIMES=compiler-rt or see the instructions at
  https://compiler-rt.llvm.org/ for building the runtimes.
```

try-job: aarch64-gnu-debug
try-job: x86_64-gnu-debug
2025-03-21 15:48:53 +01:00
Matthias Krüger
c354a97bd9
Rollup merge of #138570 - folkertdev:naked-function-target-feature-gate, r=Amanieu
add `naked_functions_target_feature` unstable feature

tracking issue: https://github.com/rust-lang/rust/issues/138568

tagging https://github.com/rust-lang/rust/pull/134213 https://github.com/rust-lang/rust/issues/90957

This PR puts `#[target_feature(/* ... */)]` on `#[naked]` functions behind its own feature gate, so that naked functions can be stabilized. It turns out that supporting `target_feature` on naked functions is tricky on some targets, so we're splitting it out to not block stabilization of naked functions themselves. See the tracking issue for more information and workarounds.

Note that at the time of writing, the `target_features` attribute is ignored when generating code for naked functions.

r? ``@Amanieu``
2025-03-21 15:48:52 +01:00
Matthias Krüger
f7f287077b
Rollup merge of #138364 - BLANKatGITHUB:compiler, r=RalfJung
ports the compiler test cases to new rust_intrinsic format

pr is part of #132735
2025-03-21 15:48:51 +01:00
bors
a4a11aca5e Auto merge of #138704 - Kobzol:ci-llvm-checks, r=onur-ozkan
Simplify CI LLVM checks in bootstrap

Extracted out of https://github.com/rust-lang/rust/pull/138591. Apart from simplifying the checks, it will make it easier to run E2E tests of bootstrap on a mostly empty directory without checking out LLVM on CI :)

The commits should be mostly self-explanatory.

r? `@onur-ozkan`
2025-03-21 14:47:25 +00:00
Ralf Jung
40bb7d1cc8
Merge pull request #4236 from RalfJung/rustup
Rustup
2025-03-21 14:22:10 +00:00
bjorn3
530ab61c0e Also check for compiler-builtins in linked_symbols
Otherwise the linker complains about EC symbols missing when compiling
for arm64ec.
2025-03-21 14:06:34 +00:00
bjorn3
63cfd47cb1 Don't attempt to export compiler-builtins symbols from rust dylibs
They are marked with hidden visibility to prevent them from getting
exported, so we shouldn't ask the linker to export them anyway. The only
thing that does it cause a warning on macOS.
2025-03-21 13:59:51 +00:00
bjorn3
cd929bfccb Fix lint name in unused linker_messages warning 2025-03-21 13:59:29 +00:00
Ralf Jung
f24ea85633 Merge from rustc 2025-03-21 14:56:29 +01:00
Ralf Jung
29f022ce3c Preparing for merge from rustc 2025-03-21 14:56:20 +01:00
bjorn3
41f1ed11c2 Move some calls to before calling codegen_crate
`--emit mir`, `#[rustc_symbol_name]` and `#[rustc_def_path]` now run
before codegen and thus work even if codegen fails. This can help with
debugging.
2025-03-21 13:23:07 +00:00
bjorn3
7d3965e0cd Move make_input call 2025-03-21 13:21:53 +00:00
bjorn3
521d0c4a30 Cache current_dll_path output
Computing the current dll path is somewhat expensive relative to other
work when compiling `fn main() {}` as `dladdr` needs to iterate over the
symbol table of librustc_driver.so until it finds a match.
2025-03-21 12:46:24 +00:00
Karol Zwolak
2c77a0775c test(ui): add tuple-struct-where-clause-suggestion ui test for #91520 2025-03-21 13:12:15 +01:00
Jakub Beránek
f5c59a444f Fix test using download-ci-llvm=true on CI 2025-03-21 12:23:44 +01:00
Jakub Beránek
e288faa4b0 Disable CI mode when checking default bootstrap profiles 2025-03-21 12:18:51 +01:00
Jakub Beránek
f53acd17cb Set if-unchanged as the default value for download-ci-llvm when we're on CI. 2025-03-21 12:18:50 +01:00
Jakub Beránek
68aaa8d103 Allow unused code in tests
To avoid working around some code being unused in tests due to it being stubbed out with `#[cfg(test)]`.
2025-03-21 12:18:50 +01:00
Jakub Beránek
9c05758ed4 Remove duplicated check for LLVM modifications and disable download-ci-llvm=true on CI 2025-03-21 12:18:50 +01:00
Jakub Beránek
80a5adf871 Unify LLVM invalidation path handling
Before it was using a different set of paths in different call-sites.
2025-03-21 12:18:50 +01:00
Zalathar
7fdac5eef0 coverage: Defer the filtering of hole spans 2025-03-21 21:23:50 +11:00
Zalathar
83b56eb059 coverage: Separate span-extraction from unexpansion 2025-03-21 21:23:50 +11:00
Ralf Jung
3a0ef6bdc1
Merge pull request #4235 from RalfJung/catch_unwind
catch_unwind: do not permit catch function to unwind
2025-03-21 09:56:15 +00:00
Ralf Jung
244e92ba5c catch_unwind intrinsic: document return value 2025-03-21 10:33:47 +01:00
Ralf Jung
38e7bb0fb1 catch_unwind: do not permit catch function to unwind 2025-03-21 10:32:05 +01:00
bors
4ac032f857 Auto merge of #138768 - matthiaskrgr:rollup-nfu3cm3, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #137357 (Document results of non-positive logarithms)
 - #138650 (Optimize `io::Write::write_fmt` for constant strings)
 - #138694 (Fix: add ohos target notes)
 - #138713 (interpret memory access hooks: also pass through the Pointer used for the access)
 - #138724 (Check attrs: Don't try to retrieve the name of list stems)
 - #138743 (bootstrap: add `--ci` flag)
 - #138751 (Fix the "used_with_archive" test on Fuchsia)
 - #138754 (Handle spans of `~const`, `const`  and `async` trait bounds in macro expansion)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-03-21 08:06:38 +00:00
John Kåre Alsaker
34244c1477 Address comments 2025-03-21 08:14:27 +01:00
John Kåre Alsaker
93bfe39ba5 Use hashbrown from crates.io 2025-03-21 07:54:35 +01:00
Bardi Harborow
ea99e81485 Recognise new IPv6 non-global range from RFC9602
This commit adds the 5f00::/16 range defined by RFC9602 to those ranges which Ipv6Addr::is_global recognises as a non-global IP. This range is used for Segment Routing (SRv6) SIDs.
2025-03-21 17:53:29 +11:00
John Kåre Alsaker
fcd3349d14 Optimize hash map operations in the query system 2025-03-21 07:51:20 +01:00
John Kåre Alsaker
157008d711 Update comments 2025-03-21 07:37:56 +01:00
John Kåre Alsaker
077b8d5c37 Abort in deadlock handler if we fail to get a query map 2025-03-21 07:37:56 +01:00
Matthias Krüger
5ba395a98b
Rollup merge of #138754 - oli-obk:push-vtqtnwluyxop, r=compiler-errors
Handle spans of `~const`, `const`  and `async` trait bounds in macro expansion

r? `@compiler-errors`

`visit_span` is actually only used in one place (the `transcribe::Marker`), and all of this syntax is unstable, so while it would still be nice to write a test for it, I wager there's lots more interesting things in `transcribe::Marker` to write tests for. And the worst is some diagnostics being weird or incremental being not as incremental as it could be
2025-03-21 06:56:49 +01:00
Matthias Krüger
4447953fdd
Rollup merge of #138751 - Jeff-A-Martin:used-with-archive-test-fuchsia, r=jieyouxu
Fix the "used_with_archive" test on Fuchsia

This change adds Fuchsia OS as a target to the cfg_attr in the pre_main_constructor external declaration. This allows the "tests/ui/attributes/used_with_archive.rs" to pass against Fuchsia.
2025-03-21 06:56:49 +01:00
Matthias Krüger
828f33ce96
Rollup merge of #138743 - onur-ozkan:override-is-ci-behaviour, r=Kobzol
bootstrap: add `--ci` flag

To make bootstrap act like it's running on CI, we had to override the `GITHUB_ACTIONS` environment variable which is a hidden detail of `CiEnv::is_ci`. Now, we can use the `--ci` flag directly on bootstrap which will be documented automatically from `x --help`. This also helps us to avoid race conditions on bootstrap (overriding `GITHUB_ACTIONS` env in each test can cause that if we run the tests in parallel) tests.
2025-03-21 06:56:48 +01:00
Matthias Krüger
1135a63286
Rollup merge of #138724 - fmease:list-stems-bear-no-name, r=nnethercote
Check attrs: Don't try to retrieve the name of list stems

Fixes #138723.

r? nnethercote or compiler
2025-03-21 06:56:47 +01:00
Matthias Krüger
7c1b128383
Rollup merge of #138713 - RalfJung:memory-hook-pointers, r=oli-obk
interpret memory access hooks: also pass through the Pointer used for the access

In some ongoing work on the Miri side, we need the absolute address that the memory access occurred at. That is non-trivial to obtain since we don't have an `ecx`. So pass through the `Pointer` used for the access, which contains the address, and which is available everywhere we are calling these hooks.

r? `@oli-obk`
2025-03-21 06:56:47 +01:00
Matthias Krüger
ff8738a0f7
Rollup merge of #138694 - LuuuXXX:fix-platform-support-book, r=jieyouxu
Fix: add ohos target notes
2025-03-21 06:56:46 +01:00
Matthias Krüger
809378bd2e
Rollup merge of #138650 - thaliaarchi:io-write-fmt-known, r=ibraheemdev
Optimize `io::Write::write_fmt` for constant strings

When the formatting args to `fmt::Write::write_fmt` are a statically known string, it simplifies to only calling `write_str` without a runtime branch. Do the same in `io::Write::write_fmt` with `write_all`.

Also, match the convention of `fmt::Write` for the name of `args`.
2025-03-21 06:56:46 +01:00
Matthias Krüger
1530b03655
Rollup merge of #137357 - syvb:sv/log-docs, r=tgross35
Document results of non-positive logarithms

The integer versions of logarithm functions panic on non-positive numbers. The floating point versions have different, undocumented behaviour (-inf on 0, NaN on <0). This PR documents that.

try-job: aarch64-gnu
2025-03-21 06:56:45 +01:00
bors
5d85a714b1 Auto merge of #138761 - flip1995:clippy-subtree-update, r=Manishearth
Clippy subtree update

r? `@Manishearth`

Cargo.lock update is because of the `ui_test` dependency bump in Clippy.
2025-03-21 04:59:08 +00:00
王宇逸
e5fc7d6a55 Fix Thread::set_name on cygwin 2025-03-21 12:50:27 +08:00
bors
01dc45c10e Auto merge of #138760 - matthiaskrgr:rollup-2edtg2h, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #138435 (Add support for postfix yield expressions)
 - #138685 (Use `Option<Ident>` for lowered param names.)
 - #138700 (Suggest `-Whelp` when pass `--print lints` to rustc)
 - #138727 (Do not rely on `type_var_origin` in `OrphanCheckErr::NonLocalInputType`)
 - #138729 (Clean up `FnCtxt::resolve_coroutine_interiors`)
 - #138731 (coverage: Add LLVM plumbing for expansion regions)
 - #138732 (Use `def_path_str` for def id arg in `UnsupportedOpInfo`)
 - #138735 (Remove `llvm` and `llvms` triagebot ping aliases for `icebreakers-llvm` ping group)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-03-21 01:52:00 +00:00