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 8 pull requests #127696

Closed
wants to merge 33 commits into from

Conversation

workingjubilee
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

CastilloDel and others added 30 commits April 14, 2024 11:35
For Windows, this allows defining imports without needing the user to have import libraries. It's intended for this to become the default.
Signed-off-by: onur-ozkan <work@onurozkan.dev>
There's a comment saying we don't do it for performance reasons, but it
doesn't actually affect performance.

The commit also tweaks the control flow, to make clearer that two code
paths are mutually exclusive.
In a `for` loop, instead of a `while` loop.
It makes for shorter code, and fewer allocations.
It's only needed for the `FlatToken::Token` variant. This makes things a
little more concise.
This commit promotes the `wasm32-wasip2` Rust target to tier 2 as
proposed in rust-lang/compiler-team#760. There are two major changes in
this PR:

1. The `dist-various-2` container, which already produces the other WASI
   targets, now has an extra target added for `wasm32-wasip2`.
2. A new `wasm-component-ld` binary is added to all host toolchains when
   LLD is enabled. This is the linker used for the `wasm32-wasip2` target.

This new linker is added for all host toolchains to ensure that all host
toolchains can produce the `wasm32-wasip2` target. This is similar to
how `rust-lld` was originally included for all host toolchains to be
able to produce WebAssembly output when the targets were first added.
The new linker is developed [here][wasm-component-ld] and is pulled in
via a crates.io-based dependency to the tree here.

[wasm-component-ld]: https://github.com/bytecodealliance/wasm-component-ld
Reuse preexisting macro and switch it to a "bootstrap tool" to try to
resolve build issues.
The new condition is equivalent in practice, but it's much more obvious
that it would result in an empty range, because the condition lines up
with the contents of the iterator.
Returning `Vec<TokenTree>` works better for the call sites than
returning `TokenStream`.
In various functions where the attribute being processed is known to be
a `#[cfg_attr(...)]` attribute. I find this a helpful reminder.
This commit does the following.
- Pulls the code out of `AttrTokenStream::to_token_trees` into a new
  function `attrs_and_tokens_to_token_trees`.
- Simplifies `TokenStream::from_ast` by calling the new function. This
  is nicer than the old way, which created a temporary
  `AttrTokenStream` containing a single `AttrsTarget` (which required
  some cloning) just to call `to_token_trees` on it. (It is good to
  remove this use of `AttrsTarget` which isn't related to `cfg_attr`
  expansion.)
Explaining things that took me some time to work out.
We don't need to ensure std (and rustc) for testing run-make-support's
unit tests. Using stage 0 compiler is already enough and speeds up
`x test run-make-support` invocations on a clean build.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Add FileCheck annotations to mir-opt/dest-prop tests

Part of rust-lang#116971, adds FileCheck annotations to MIR-opt tests in tests/mir-opt/dest-prop.

I would like some feedback. Also, I don't know how to approach `union.rs`.  I couldn't figure out what it is testing.

r? cjgillot
… r=Mark-Simulacrum

Promote the `wasm32-wasip2` target to Tier 2

This commit promotes the `wasm32-wasip2` Rust target to tier 2 as proposed in rust-lang/compiler-team#760. There are two major changes in this PR:

1. The `dist-various-2` container, which already produces the other WASI targets, now has an extra target added for `wasm32-wasip2`.
2. A new `wasm-component-ld` binary is added to all host toolchains when LLD is enabled. This is the linker used for the `wasm32-wasip2` target.

This new linker is added for all host toolchains to ensure that all host toolchains can produce the `wasm32-wasip2` target. This is similar to how `rust-lld` was originally included for all host toolchains to be able to produce WebAssembly output when the targets were first added. The new linker is developed [here][wasm-component-ld] and is pulled in via a crates.io-based dependency to the tree here.

[wasm-component-ld]: https://github.com/bytecodealliance/wasm-component-ld
…crum

Windows: Add experimental support for linking std-required system DLLs using raw-dylib

For Windows, this allows std to define system imports without needing the user to have import libraries. It's intended for this to become the default.

For now it's an experimental feature so it can be tested using build-std.
…f-rustbuild, r=Mark-Simulacrum

use "bootstrap" instead of "rustbuild" in comments and docs

Let's stick with the single name "bootstrap" to refer to the bootstrap project to avoid confusion. This should make it clearer, especially for new contributors.
…s, r=petrochenkov

Clear `inner_attr_ranges` regularly.

There's a comment saying we don't do it for performance reasons, but it doesn't actually affect performance.

The commit also tweaks the control flow, to make clearer that two code paths are mutually exclusive.

r? ``@petrochenkov``
…s, r=petrochenkov

More attribute cleanups

A follow-up to rust-lang#127308.

r? ``@petrochenkov``
…r=joboet

Use ManuallyDrop in BufWriter::into_parts

The fact that `mem::forget` takes by value means that it interacts very poorly with Stacked Borrows; generally users think of calling it as a no-op, but in Stacked Borrows, the field retagging tends to cause surprise tag invalidation.
…bzol

using correct tool mode for `run-make-support` crate

We don't need to ensure std (and rustc) for testing run-make-support's unit tests. Using stage 0 compiler is already enough and speeds up `x test run-make-support` invocations on a clean build.
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc O-windows Operating system: Windows S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure 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 Jul 13, 2024
@workingjubilee
Copy link
Member Author

@bors rollup=never p=8 r+

@bors
Copy link
Contributor

bors commented Jul 13, 2024

📌 Commit dc0c76f has been approved by workingjubilee

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 Jul 13, 2024
@bors
Copy link
Contributor

bors commented Jul 13, 2024

⌛ Testing commit dc0c76f with merge b45624a...

bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 13, 2024
…kingjubilee

Rollup of 8 pull requests

Successful merges:

 - rust-lang#122300 (Add FileCheck annotations to mir-opt/dest-prop tests)
 - rust-lang#126967 (Promote the `wasm32-wasip2` target to Tier 2)
 - rust-lang#127370 (Windows: Add experimental support for linking std-required system DLLs using raw-dylib)
 - rust-lang#127434 (use "bootstrap" instead of "rustbuild" in comments and docs)
 - rust-lang#127477 (Clear `inner_attr_ranges` regularly.)
 - rust-lang#127558 (More attribute cleanups)
 - rust-lang#127659 (Use ManuallyDrop in BufWriter::into_parts)
 - rust-lang#127677 (using correct tool mode for `run-make-support` crate)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] syn test:false 3.375
   Compiling semver v1.0.23
error[E0463]: can't find crate for `core`
  |
  = note: the `arm-unknown-linux-gnueabi` target may not be installed
  = help: consider downloading the target with `rustup target add arm-unknown-linux-gnueabi`
  = help: consider building the standard library from source with `cargo build -Zbuild-std`
error[E0463]: can't find crate for `std`
  |
  = note: the `arm-unknown-linux-gnueabi` target may not be installed
  = help: consider downloading the target with `rustup target add arm-unknown-linux-gnueabi`
  = help: consider downloading the target with `rustup target add arm-unknown-linux-gnueabi`
  = help: consider building the standard library from source with `cargo build -Zbuild-std`
[RUSTC-TIMING] build_script_build test:false 0.195
For more information about this error, try `rustc --explain E0463`.
   Compiling equivalent v1.0.1
[RUSTC-TIMING] cfg_if test:false 0.029

@bors
Copy link
Contributor

bors commented Jul 13, 2024

💔 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 Jul 13, 2024
@workingjubilee
Copy link
Member Author

RIP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc O-windows Operating system: Windows rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure 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.

10 participants