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

[beta] Backport unstabilization of extended varargs abi support #136934

Conversation

WaffleLapkin
Copy link
Member

This is a beta backport of #136897 and rust-lang/reference#1734. For the later I updated the submodule to the commit on the master branch, not sure if this is correct?

cc @workingjubilee @cuviper @Mark-Simulacrum @chorman0773

pietroalbini and others added 30 commits January 7, 2025 20:22
When `-Cstrip` was changed to use the bundled rust-objcopy instead of
/usr/bin/strip on OSX, strip-like arguments were preserved.

But strip and objcopy are, while being the same binary, different, they
have different defaults depending on which binary they are.
Notably, strip strips everything by default, and objcopy doesn't strip
anything by default.

Additionally, `-S` actually means `--strip-all`, so debuginfo stripped
everything and symbols didn't strip anything.

We now correctly pass `--strip-debug` and `--strip-all`.
potential violations

(cherry picked from commit 045271c)
(cherry picked from commit 34edb21)
Co-authored-by: Rémy Rakic <remy.rakic+github@gmail.com>
(cherry picked from commit 13c7122)
[beta] stage0 bump and backports

- bump stage0 to 1.84.0
- Run borrowck tests on BIDs and emit tail-expr-drop-order lints for violations rust-lang#134523

r? cuviper
This incorporates all the backwards-compatible changes for the 2024
Edition. There will also be a follow-on PR to land revisions to the new
chapter on async so it can be as ready as possible when officially
released with 1.85 and the 2024 Edition.

Additionally, there are a few other, non-backward-compatible, changes
(largely around `use<..>`) we can only land using the stable edition,
which we may or may not be able to land in 1.85 by using the beta
toolchain in the example code. Those may or may not be ported over,
depending on how that does or does not play with the infrastructure.
It has been a bit of a pain trying to keep the lints in sync across
the submodule repositories, so the just turns it off.
The implementation is unsound when a partially consumed iterator has
some elements buffered in the front/back parts and cloning the Iterator
removes the capacity from the backing vec::IntoIter.

(cherry picked from commit 3d871b3)
(cherry picked from commit a40c659)
…ehuss

[beta] TRPL: incorporate all backward-compatible Edition changes

This incorporates all the backwards-compatible changes for the 2024 Edition. There will also be a follow-on PR to land revisions to the new chapter on async so it can be as ready as possible when officially released with 1.85 and the 2024 Edition.

Additionally, there are a few other, non-backward-compatible, changes (largely around `use<..>`) we can only land using the stable edition, which we may or may not be able to land in 1.85 by using the beta toolchain in the example code. Those may or may not be ported over, depending on how that does or does not play with the infrastructure.

This is identical to rust-lang#135507 except that this targets `beta` instead of `master`, with the intent that these changes land in 1.85 and go out with the Edition release.
[beta] backports

- do not in-place-iterate over flatmap/flatten rust-lang#135104
- Make sure to mark `IMPL_TRAIT_REDUNDANT_CAPTURES` as `Allow` in edition 2024 rust-lang#135441
- Update to LLVM 19.1.7 rust-lang#135484

r? cuviper
Creating a "trimmed DefID path" when no error is being emitted is an ICE (on purpose). If we create a trimmed path for a lint that is then silenced before being emitted causes a known ICE. This side-steps the issue by always using `with_no_trimmed_path!`.

This was verified to fix https://github.com/quinn-rs/quinn/, but couldn't write a repro case for the test suite.

Fix rust-lang#135289.

(cherry picked from commit 93a1950)
There is a chance that these tools are being installed from an external LLVM
and we have no control over them. If any of these tools use symlinks, they will
fail during tarball distribution. This change makes copying process to resolve
symlinks just before placing them into the destination path.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
(cherry picked from commit cde58dd)
@workingjubilee
Copy link
Member

workingjubilee commented Feb 12, 2025

I do not care, personally, if the reference is slightly incorrect here, as it includes several caveats about how it is not entirely correct. I will leave the decision to those who have more skin in that game.

@WaffleLapkin
Copy link
Member Author

I can fixup the reference correctly here, once I get home and have dinner :p

@Mark-Simulacrum
Copy link
Member

I wouldn't backport the reference changes. Doing so really ought to keep that branch around forever (since otherwise the submodule ref will break) and that doesn't seem warranted for this case.

@WaffleLapkin WaffleLapkin force-pushed the beta-unstabilize-extended_varargs_abi_support branch from 137c356 to 74c0e61 Compare February 13, 2025 11:19
@WaffleLapkin
Copy link
Member Author

I dropped the reference commit. Is this now good to merge? @Mark-Simulacrum

Although I will say that having the reference be incorrect is awkward :(

@Mark-Simulacrum
Copy link
Member

@bors r+ rollup=never

@bors
Copy link
Contributor

bors commented Feb 13, 2025

📌 Commit 74c0e61 has been approved by Mark-Simulacrum

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 Feb 13, 2025
@cuviper
Copy link
Member

cuviper commented Feb 13, 2025

@bors r-

There are several other backports pending, so I will roll this and the others into one pull request.

I wouldn't backport the reference changes. Doing so really ought to keep that branch around forever (since otherwise the submodule ref will break) and that doesn't seem warranted for this case.

I don't understand why a branch is seen as a burden. There are even a couple version branches in the reference repo already.

But given the choice between being inaccurate about varargs support vs. inaccurately including 1.86-only changes, I guess it makes sense to just leave it alone.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 13, 2025
@cuviper cuviper mentioned this pull request Feb 13, 2025
@cuviper
Copy link
Member

cuviper commented Feb 13, 2025

Cumulative beta backports are in #136980. If we come around to wanting a reference update, I can include that in the stable promotion.

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 13, 2025
[beta] backports

- Pattern Migration 2024: try to suggest eliding redundant binding modifiers rust-lang#136577, rust-lang#136857
- chore: update rustc-hash 2.1.0 to 2.1.1 rust-lang#136605
- Make `AsyncFnOnce`, `AsyncFnMut`, `AsyncFn` non-`#[fundamental]` rust-lang#136724
- fix ensure_monomorphic_enough rust-lang#136839
- Revert "Stabilize `extended_varargs_abi_support`" rust-lang#136897, rust-lang#136934

r? cuviper
@WaffleLapkin
Copy link
Member Author

But given the choice between being inaccurate about varargs support vs. inaccurately including 1.86-only changes, I guess it makes sense to just leave it alone.

You don't have to include 1.86-only changes though, as you can cherry-pick the revert on top of the 1.85 reference, right?

@cuviper
Copy link
Member

cuviper commented Feb 13, 2025

Since it's a git submodule, that cherry-picked reference has to exist somewhere else. In theory that could be in a fork, but that should really be in the rust-lang/reference repo for longevity, and I personally don't have access to create that.

@steffahn

This comment was marked as outdated.

@WaffleLapkin
Copy link
Member Author

cc @traviscross you probably have rights to create reference branches?

@traviscross
Copy link
Contributor

I've pushed this branch:

https://github.com/rust-lang/reference/tree/beta

The HEAD of that branch is the relevant commit: rust-lang/reference@b05d56e. It reverts the merge.

When the release goes out, we'll push a tag for v1.85.0.

@cuviper
Copy link
Member

cuviper commented Feb 14, 2025

Thanks! I will include that in the stable promotion on Monday.

@bors
Copy link
Contributor

bors commented Feb 17, 2025

☔ The latest upstream changes (presumably #137057) made this pull request unmergeable. Please resolve the merge conflicts.

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 17, 2025
Prepare Rust 1.85.0 stable release

This includes a relnotes sync and a few last-minute backports:

- change `literal_string_with_formatting_args` lint category to nursery rust-lang#136982
- Update the reference for reverted `extended_varargs_abi_support` rust-lang#136934
- fix musl's CVE-2025-26519 rust-lang#137127

r? cuviper
@cuviper
Copy link
Member

cuviper commented Feb 17, 2025

The reference change is in #137181, and the direct changes of this PR were already in #136980.

@cuviper cuviper closed this Feb 17, 2025
@cuviper cuviper added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Feb 17, 2025
@cuviper cuviper added this to the 1.85.0 milestone Feb 17, 2025
@WaffleLapkin WaffleLapkin deleted the beta-unstabilize-extended_varargs_abi_support branch February 22, 2025 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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. T-release Relevant to the release subteam, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.