Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 10 pull requests #137918

Closed
wants to merge 22 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

dtolnay and others added 22 commits December 29, 2024 11:03
--- stderr -------------------------------
error: expected expression, found `..`
  --> tests/ui/parser/ranges-precedence.rs:75:12
   |
LL |         ($e:expr) => {};
   |          ------- while parsing argument for this `expr` macro fragment
LL |     }
LL |     expr!(!..0);
   |            ^^ expected expression

error: expected expression, found `..`
  --> tests/ui/parser/ranges-precedence.rs:76:12
   |
LL |         ($e:expr) => {};
   |          ------- while parsing argument for this `expr` macro fragment
...
LL |     expr!(-..0);
   |            ^^ expected expression

error: expected expression, found `..`
  --> tests/ui/parser/ranges-precedence.rs:77:12
   |
LL |         ($e:expr) => {};
   |          ------- while parsing argument for this `expr` macro fragment
...
LL |     expr!(*..0);
   |            ^^ expected expression

error: aborting due to 3 previous errors
------------------------------------------
This will help stabilization of lld.
That unstable feature completed fcp-close, so the compiler needs to be
migrated away to allow its removal. In this case, `cg_llvm` and `cg_gcc`
were using raw entries to optimize their `const_str_cache` lookup and
insertion. We can change that to separate `get` and (on miss) `insert`
calls, so we still have the fast path avoiding string allocation when
the cache hits.
Currently, test case generators are launched in parallel and their test
cases also run in parallel, all within the same pool. I originally
implemented this with the assumption that there would be an advantage in
parallelizing the generators themselves, but this turns out to not
really have any benefit.

Simplify things by running generators in series while keeping their test
cases parallelized. This makes the code easier to follow, and there is
no longer a need for MPSC or multiprogress bars. Additionally, the UI
output can be made cleaner.
…trochenkov

Implement `#[cfg]` in `where` clauses

This PR implements rust-lang#115590, which supports `#[cfg]` attributes in `where` clauses.

The biggest change is, that it adds `AttrsVec` and  `NodeId` to the `ast::WherePredicate` and `HirId` to the `hir::WherePredicate`.
…rs,davidtwco

Fix parsing of ranges after unary operators

Fixes rust-lang#134899.

This PR aligns the parsing for unary `!` and `-` and `*` with how unary `&` is already parsed [here](https://github.com/rust-lang/rust/blob/5c0a6e68cfdad859615c2888de76505f13e6f01b/compiler/rustc_parse/src/parser/expr.rs#L848-L854).
…heck, r=Mark-Simulacrum

Remove `:` from `stack-protector-heuristics-effect.rs` Filecheck Pattern

With function sections, the assembly label does not necessarily end in `:`.

Remove trailing `:` to be more consistent with the rest of the existing Filecheck patterns.
```
// CHECK-LABEL: local_string_addr_taken
#[no_mangle]
pub fn local_string_addr_taken(f: fn(&String)) {
    let x = String::new();
    f(&x);
```
…imulacrum

Make phantom variance markers transparent
…allelization, r=Mark-Simulacrum

Simplify parallelization in test-float-parse

Currently, test case generators are launched in parallel and their test cases also run in parallel, all within the same pool. I originally implemented this with the assumption that there would be an advantage in parallelizing the generators themselves, but this turns out to not really have any benefit.

Simplify things by running generators in series while keeping their test cases parallelized. This makes the code easier to follow, and there is no longer a need for MPSC or multiprogress bars. Additionally, the UI output can be made cleaner.
…-Simulacrum

Skip `tidy` in pre-push hook if the user is deleting a remote branch

It's kinda annoying when I'm trying to delete remote branches and that triggers `tidy`, so small fix to prevent that.
Hopefully this should be an acceptable amount of complexity to add to this shell script.
self-contained linker: conservatively default to `-znostart-stop-gc`

To help stabilization, this PR disables an LLD optimization with respect to `--gc-sections` and encapsulation symbols: it will reduce the number of crates needing to opt-out of lld due to this bfd / lld difference. For example, all the people using [linkme](https://github.com/dtolnay/linkme), which [doesn't work with lld](dtolnay/linkme#63) or on nightly, need to disable lld.

More information about all this, and the historical differences, can be found in:
- https://maskray.me/blog/2021-01-31-metadata-sections-comdat-and-shf-link-order
- https://lld.llvm.org/ELF/start-stop-gc

This optimization has [no visible impact](rust-lang#137685 (comment)) on our benchmarks, so we can use it by default and have a safer/more conservative starting point to remove friction during migration. We can them emit an FCW for the cases where lld detects reliance on encapsulation symbols without `-znostart-stop-gc`, and then revert back to lld's default after a while. No one compiling on nightly relies on this difference, obviously, so doing an FCW is not necessary until after lld is used on stable.

I've tested that this correctly links on `linkme` examples. I've also quickly tried to crate an rmake test but the setup with encapsulation symbols is annoying to reproduce: a few link section/name attributes is not enough, we also need to collect symbols between the encapsulation symbols, without referencing them in code, for `-znostart-stop-gc` to only impact this... It should of course be doable though, maybe ```@Kobzol``` will look into it if they have time.

r? ```@petrochenkov```
…k-Simulacrum

Stop using `hash_raw_entry` in `CodegenCx::const_str`

That unstable feature (rust-lang#56167) completed fcp-close, so the compiler needs to be
migrated away to allow its removal. In this case, `cg_llvm` and `cg_gcc`
were using raw entries to optimize their `const_str_cache` lookup and
insertion. We can change that to separate `get` and (on miss) `insert`
calls, so we still have the fast path avoiding string allocation when
the cache hits.
Revert "Remove Win SDK 10.0.26100.0 from CI"

Part of rust-lang#137733.
Resolves rust-lang#137733.

The remove-latest-windows-sdk workaround workaround should no longer be necessary, now that we bumped (1) cargo `cc` and (2) `rustc_{codegen_ssa,llvm}` `cc`.

This reverts commit 25617c7, the remove-latest-windows-sdk workaround from rust-lang#137753.

try-job: i686-msvc-1
try-job: i686-msvc-2
try-job: dist-i686-msvc
ensure we always print all --print options in help

Closes rust-lang#137853
Refactors the PRINT_KINDS map into a public const so we always print every option for print. the list is quite long now, and idk if long term we want to keep printing all these options from --help.
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Mar 3, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=2

@bors
Copy link
Contributor

bors commented Mar 3, 2025

📌 Commit 5f3394b has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 3, 2025
@bors
Copy link
Contributor

bors commented Mar 3, 2025

⌛ Testing commit 5f3394b with merge 6d889f0...

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 3, 2025
…iaskrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#132388 (Implement `#[cfg]` in `where` clauses)
 - rust-lang#134900 (Fix parsing of ranges after unary operators)
 - rust-lang#136938 (Remove `:` from `stack-protector-heuristics-effect.rs` Filecheck Pattern)
 - rust-lang#137054 (Make phantom variance markers transparent)
 - rust-lang#137525 (Simplify parallelization in test-float-parse)
 - rust-lang#137618 (Skip `tidy` in pre-push hook if the user is deleting a remote branch)
 - rust-lang#137685 (self-contained linker: conservatively default to `-znostart-stop-gc`)
 - rust-lang#137741 (Stop using `hash_raw_entry` in `CodegenCx::const_str`)
 - rust-lang#137849 (Revert "Remove Win SDK 10.0.26100.0 from CI")
 - rust-lang#137862 (ensure we always print all --print options in help)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors
Copy link
Contributor

bors commented Mar 3, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 3, 2025
@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@Kobzol
Copy link
Contributor

Kobzol commented Mar 3, 2025

@bors retry spurious network error

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 3, 2025
@bors
Copy link
Contributor

bors commented Mar 3, 2025

⌛ Testing commit 5f3394b with merge 30918eb...

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 3, 2025
…iaskrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#132388 (Implement `#[cfg]` in `where` clauses)
 - rust-lang#134900 (Fix parsing of ranges after unary operators)
 - rust-lang#136938 (Remove `:` from `stack-protector-heuristics-effect.rs` Filecheck Pattern)
 - rust-lang#137054 (Make phantom variance markers transparent)
 - rust-lang#137525 (Simplify parallelization in test-float-parse)
 - rust-lang#137618 (Skip `tidy` in pre-push hook if the user is deleting a remote branch)
 - rust-lang#137685 (self-contained linker: conservatively default to `-znostart-stop-gc`)
 - rust-lang#137741 (Stop using `hash_raw_entry` in `CodegenCx::const_str`)
 - rust-lang#137849 (Revert "Remove Win SDK 10.0.26100.0 from CI")
 - rust-lang#137862 (ensure we always print all --print options in help)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors
Copy link
Contributor

bors commented Mar 3, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 3, 2025
@rust-log-analyzer
Copy link
Collaborator

The job dist-apple-various failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[2557/3708] Building CXX object lib/Target/BPF/CMakeFiles/LLVMBPFCodeGen.dir/BPFAsmPrinter.cpp.o
[2558/3708] Building CXX object lib/Target/BPF/CMakeFiles/LLVMBPFCodeGen.dir/BPFASpaceCastSimplifyPass.cpp.o
[2559/3708] Building CXX object lib/Target/AMDGPU/Disassembler/CMakeFiles/LLVMAMDGPUDisassembler.dir/AMDGPUDisassembler.cpp.o
FAILED: lib/Target/AMDGPU/Disassembler/CMakeFiles/LLVMAMDGPUDisassembler.dir/AMDGPUDisassembler.cpp.o 
sccache /Users/runner/work/rust/rust/clang+llvm-15.0.7-x86_64-apple-darwin21.0/bin/clang++ -DGTEST_HAS_RTTI=0 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/Users/runner/work/rust/rust/build/x86_64-apple-darwin/llvm/build/lib/Target/AMDGPU/Disassembler -I/Users/runner/work/rust/rust/src/llvm-project/llvm/lib/Target/AMDGPU/Disassembler -I/Users/runner/work/rust/rust/src/llvm-project/llvm/lib/Target/AMDGPU -I/Users/runner/work/rust/rust/build/x86_64-apple-darwin/llvm/build/lib/Target/AMDGPU -I/Users/runner/work/rust/rust/build/x86_64-apple-darwin/llvm/build/include -I/Users/runner/work/rust/rust/src/llvm-project/llvm/include -I/Users/runner/work/rust/rust/build/x86_64-apple-darwin/llvm/build/lib/Target/AMDGPU/Disassembler/.. -I/Users/runner/work/rust/rust/src/llvm-project/llvm/lib/Target/AMDGPU/Disassembler/.. -ffunction-sections -fdata-sections -fPIC -m64 --target=x86_64-apple-darwin -mmacosx-version-min=10.12 -stdlib=libc++ -fdebug-prefix-map=/Users/runner/work/rust/rust=/rustc/llvm -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -w -fdiagnostics-color -O3 -DNDEBUG -std=c++17 -isysroot /Applications/Xcode_15.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk -mmacosx-version-min=10.12  -fno-exceptions -funwind-tables -fno-rtti -MD -MT lib/Target/AMDGPU/Disassembler/CMakeFiles/LLVMAMDGPUDisassembler.dir/AMDGPUDisassembler.cpp.o -MF lib/Target/AMDGPU/Disassembler/CMakeFiles/LLVMAMDGPUDisassembler.dir/AMDGPUDisassembler.cpp.o.d -o lib/Target/AMDGPU/Disassembler/CMakeFiles/LLVMAMDGPUDisassembler.dir/AMDGPUDisassembler.cpp.o -c /Users/runner/work/rust/rust/src/llvm-project/llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
In file included from /Users/runner/work/rust/rust/src/llvm-project/llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp:477:
/Users/runner/work/rust/rust/build/x86_64-apple-darwin/llvm/build/lib/Target/AMDGPU/AMDGPUGenDisassemblerTables.inc:1210:20: error: no member named 'OPC_CleckPredicate' in namespace 'llvm::MCD'; did you mean 'OPC_CheckPredicate'?
/* 5728 */    MCD::OPC_CleckPredicate, 1, 244, 9, 0, // Skip to: 8281
                   OPC_CheckPredicate
/Users/runner/work/rust/rust/src/llvm-project/llvm/include/llvm/MC/MCDecoderOps.h:22:3: note: 'OPC_CheckPredicate' declared here
/Users/runner/work/rust/rust/src/llvm-project/llvm/include/llvm/MC/MCDecoderOps.h:22:3: note: 'OPC_CheckPredicate' declared here
  OPC_CheckPredicate,   // OPC_CheckPredicate(uleb128 PIdx, uint16_t NumToSkip)
1 error generated.
[2560/3708] Building CXX object lib/Target/BPF/CMakeFiles/LLVMBPFCodeGen.dir/BPFCheckAndAdjustIR.cpp.o
[2561/3708] Building CXX object lib/Target/BPF/CMakeFiles/LLVMBPFCodeGen.dir/BPFFrameLowering.cpp.o
[2562/3708] Building CXX object lib/Target/BPF/CMakeFiles/LLVMBPFCodeGen.dir/BPFInstrInfo.cpp.o

@klensy
Copy link
Contributor

klensy commented Mar 3, 2025

#137685 contains rollup - #137685 (comment)

@Kobzol
Copy link
Contributor

Kobzol commented Mar 3, 2025

rollup- just resets the rollup state to the default - maybe. Which means that the PR can still be included in a rollup :)

@klensy
Copy link
Contributor

klensy commented Mar 3, 2025

Oh.

@klensy
Copy link
Contributor

klensy commented Mar 3, 2025

The job dist-apple-various failed! Check out the build log: (web) (plain)
Click to see the possible cause of the failure (guessed by this bot)

2025-03-03T08:56:04.3754610Z /Users/runner/work/rust/rust/build/x86_64-apple-darwin/llvm/build/lib/Target/AMDGPU/AMDGPUGenDisassemblerTables.inc:1210:20: error: no member named 'OPC_CleckPredicate' in namespace 'llvm::MCD'; did you mean 'OPC_CheckPredicate'?
2025-03-03T08:56:04.3757050Z /* 5728 */    MCD::OPC_CleckPredicate, 1, 244, 9, 0, // Skip to: 8281

How this compiled before?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-run-make Area: port run-make Makefiles to rmake.rs rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.