Skip to content

Rollup of 10 pull requests #145601

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

Merged
merged 21 commits into from
Aug 20, 2025
Merged

Rollup of 10 pull requests #145601

merged 21 commits into from
Aug 20, 2025

Conversation

jieyouxu
Copy link
Member

@jieyouxu jieyouxu commented Aug 19, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

lolbinarycat and others added 21 commits August 17, 2025 14:13
previous code was perfectly sound because of MaybeUninit,
but it did waste cycles on copying memory that is
known to be uninitialized.
Third-party programs running on the VEX V5
platform need a linker script to ensure code and
data are always placed in the allowed range
`0x3800000-0x8000000` which is read/write/execute.
However, users can also configure the operating
system to preload a separate file at any location
between these two addresses before the program
starts (as a sort of basic linking system).
Programs have to know about this at
compile time - in the linker script - to avoid
placing data in a spot that overlaps where the
file will be loaded. This is a very popular
feature with existing V5 runtimes because it can be
used to modify a program's behavior without
re-uploading the entire binary to the robot
controller. Also, while VEXos's user-exposed
file system APIs may only read data from an external
SD card, linked files have the advantage of being
able to load data directly from the device's
onboard storage.

This PR adds the `__linked_file_start` symbol
to the existing VEX V5 linker script which can be
used to shrink the stack and heap so that they
do not overlap with the memory region containing a
linked file.

With these changes, a developer targeting VEX V5
might add a second linker script to their project
by specifying `-Clink-arg=-Tcustom.ld` and creating
the file `custom.ld` to configure their custom
memory layout:

```ld
/* Reserve 10MiB for a linked file. */
/* (0x7600000-0x8000000) */
__linked_file_start = __linked_file_end - 10M;

/* Optional: specify one or more sections that */
/* represent the developer's custom format. */
SECTIONS {
    .linked_file_metadata (NOLOAD) : {
        __linked_file_metadata_start = .
        . += 1M;
        __linked_file_metadata_end = .
    }
    .linked_file_data (NOLOAD) : {
        __linked_file_data_start = .
        . += 9M;
        __linked_file_data_end = .
    }
} INSERT AFTER .stack;
```

Then, using an external tool like the `vex-v5-serial`
crate, they would configure the metadata of their
uploaded program to specify the path of their linked file
and the address where it should be loaded into memory
(in this example, 0x7600000).
Using an error type instead of `()` avoids the duplicated errors
on `struct SUnsizedField` in `deriving-from-wrong-target.rs`. It also
improves the expanded output from this:
```
struct S2(u32, u32);
impl ::core::convert::From<()> for S2 {
    #[inline]
    fn from(value: ()) -> S2 { (/*ERROR*/) }
}
```
to this:
```
struct S2(u32, u32);
impl ::core::convert::From<(/*ERROR*/)> for S2 {
    #[inline]
    fn from(value: (/*ERROR*/)) -> S2 { (/*ERROR*/) }
}
```
The new code also only matchs on `item.kind` once.
…backshift-less, r=tgross35

bufreader::Buffer::backshift: don't move the uninit bytes

previous code was perfectly sound because of MaybeUninit, but it did waste cycles on copying memory that is known to be uninitialized.
triagebot: Don't warn no-mentions on subtree updates

Complement to rust-lang/triagebot#2137

r? ``@Urgau``
…jieyouxu

Update rust maintainers in openharmony.md
…=Kobzol

Avoid using `()` in `derive(From)` output.

Using an error type instead of `()` avoids the duplicated errors on `struct SUnsizedField` in `deriving-from-wrong-target.rs`. It also improves the expanded output from this:
```
struct S2(u32, u32);
impl ::core::convert::From<()> for S2 {
    #[inline]
    fn from(value: ()) -> S2 { (/*ERROR*/) }
}
```
to this:
```
struct S2(u32, u32);
impl ::core::convert::From<(/*ERROR*/)> for S2 {
    #[inline]
    fn from(value: (/*ERROR*/)) -> S2 { (/*ERROR*/) }
}
```
The new code also only matchs on `item.kind` once.

r? ``@Kobzol``
…e, r=jdonszelmann

Allow stability attributes on extern crates

Fixes rust-lang#145497

r? ``@jdonszelmann``
…youxu

Remove unused `PartialOrd`/`Ord` from bootstrap

It was just wasting compile-time. There is one remaining "old" bootstrap test that uses the `Ord` impl on one test step, I'll remove that later.
…s, r=fmease

ignore frontmatters in `TokenStream::new`

Fixes rust-lang#145520 for now, we'd likely want to figure the stripping part later, so I noted it down on the list on the tracking issue.

cc `@fmease`
…oups, r=lqd

remove myself from some adhoc-groups and pings

Removing myself from some adhoc-groups related to the MIR as its been quite a while since I've worked in that area
Add change tracker entry for `--timings`

Follow-up to rust-lang#145379. Forgor when reviewing.

r? `@Kobzol`
… r=davidtwco

Add VEXos "linked files" support to `armv7a-vex-v5`

Third-party programs running on the VEX V5 platform need a linker script to ensure code and data are always placed in the allowed range `0x3800000-0x8000000` which is read/write/execute. However, developers can also configure the operating system (VEXos) to preload a separate file at any location between these two addresses before the program starts (as a sort of basic linking or configuration loading system). Programs have to know about this at compile time - in the linker script - to avoid placing data in a spot that overlaps where the linked file will be loaded. This is a very popular feature with existing V5 runtimes because it can be used to modify a program's behavior without re-uploading the entire binary to the robot controller.

It's important for Rust to support this because while VEXos's runtime user-exposed file system APIs may only read data from an external SD card, linked files are allowed to load data directly from the device's onboard storage.

This PR adds the `__linked_file_start` symbol to the existing VEX V5 linker script which can be used to shrink the stack and heap so that they do not overlap with a memory region containing a linked file. It expects the linked file to be loaded in the final N bytes of user RAM (this is not technically required but every existing runtime does it this way to avoid having discontinuous memory regions).

With these changes, a developer targeting VEX V5 might add a second linker script to their project by specifying `-Clink-arg=-Tcustom.ld` and creating the file `custom.ld` to configure their custom memory layout. The linker would prepend this to the builtin target linker script.

```c
/* custom.ld: Reserves 10MiB for a linked file. */
/* (0x7600000-0x8000000) */
__linked_file_length = 10M;

/* The above line is equivalent to -Clink-arg=--defsym=__linked_file_length=10M */

/* Optional: specify one or more sections that */
/* represent the developer's custom format. */
SECTIONS {
    .linked_file_metadata (NOLOAD) : {
        __linked_file_metadata_start = .;
        . += 1M;
        __linked_file_metadata_end = .;
    }
    .linked_file_data (NOLOAD) : {
        __linked_file_data_start = .;
        . += 9M;
        __linked_file_data_end = .;
    }
} INSERT AFTER .stack;
```

Then, using an external tool like the `vex-v5-serial` crate, they would configure the metadata of their uploaded program to specify the path of their linked file and the address where it should be loaded into memory (in the above example, `0x7600000`).
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-testsuite Area: The testsuite used to check the correctness of rustc 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-libs Relevant to the library team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Aug 19, 2025
@jieyouxu
Copy link
Member Author

@bors r+ rollup=never p=4

@bors
Copy link
Collaborator

bors commented Aug 19, 2025

📌 Commit 0811b16 has been approved by jieyouxu

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 Aug 19, 2025
@jieyouxu
Copy link
Member Author

@bors try jobs=test-various,aarch64-apple

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Aug 19, 2025
Rollup of 10 pull requests

try-job: test-various
try-job: aarch64-apple
@rust-bors
Copy link

rust-bors bot commented Aug 19, 2025

☀️ Try build successful (CI)
Build commit: 083b3a2 (083b3a294ef13f2b65cbcbe5f2d0e1ac40391f31, parent: 8365fcb2b840c95eeb0bc377af8bd498fad22245)

@bors
Copy link
Collaborator

bors commented Aug 19, 2025

⌛ Testing commit 0811b16 with merge f605b57...

@bors
Copy link
Collaborator

bors commented Aug 20, 2025

☀️ Test successful - checks-actions
Approved by: jieyouxu
Pushing f605b57 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 20, 2025
@bors bors merged commit f605b57 into rust-lang:master Aug 20, 2025
12 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Aug 20, 2025
@jieyouxu jieyouxu deleted the rollup-t5mbqhc branch August 20, 2025 03:35
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#145538 bufreader::Buffer::backshift: don't move the uninit bytes 8f6f4b53d6d29d2b54214353a4fcf2224f38a7b2 (link)
#145542 triagebot: Don't warn no-mentions on subtree updates fd361e82498825a62283aaf0400b4e65b8cf30b5 (link)
#145549 Update rust maintainers in openharmony.md dd5335b35081e07ced73ad30ab8ac15caf04fa0f (link)
#145550 Avoid using () in derive(From) output. 74d4d8edbd19eff81aaa642b14912365b0bbb5e7 (link)
#145556 Allow stability attributes on extern crates 74f38ba3cf559bd23ce4c6c2fc2700aa3cde6219 (link)
#145560 Remove unused PartialOrd/Ord from bootstrap 7e8e022b920be1ac25af0a8942baaf8cd2fffe34 (link)
#145568 ignore frontmatters in TokenStream::new 69cb1e46fdaf0de832b09b1a4e6ba1427a5e2734 (link)
#145571 remove myself from some adhoc-groups and pings a88cf39d5ca268bc2d35ce8631dc14543cf31a1e (link)
#145576 Add change tracker entry for --timings a5c8701f11fe26679bfb172406e012a9e4899680 (link)
#145578 Add VEXos "linked files" support to armv7a-vex-v5 49413564f9a01ea6aa509729341fc36a7ca9cdb8 (link)

previous master: 05f5a58e84

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

Copy link
Contributor

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 05f5a58 (parent) -> f605b57 (this PR)

Test differences

Show 2 test diffs

2 doctest diffs were found. These are ignored, as they are noisy.

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard f605b57042ffeb320d7ae44490113a827139b766 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-aarch64-linux: 6041.2s -> 8491.2s (40.6%)
  2. dist-apple-various: 5197.6s -> 4215.3s (-18.9%)
  3. dist-ohos-x86_64: 4693.6s -> 4221.5s (-10.1%)
  4. x86_64-gnu-llvm-19: 3226.7s -> 2904.1s (-10.0%)
  5. x86_64-gnu-llvm-20-2: 6122.9s -> 6720.3s (9.8%)
  6. dist-ohos-aarch64: 4634.5s -> 4212.5s (-9.1%)
  7. x86_64-gnu-llvm-19-1: 3735.8s -> 3421.2s (-8.4%)
  8. dist-riscv64-linux: 5010.3s -> 4615.0s (-7.9%)
  9. dist-loongarch64-linux: 6490.5s -> 6078.4s (-6.3%)
  10. dist-aarch64-windows-gnullvm: 4983.9s -> 4685.7s (-6.0%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (f605b57): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (secondary -2.8%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.8% [-4.3%, -1.2%] 2
All ❌✅ (primary) - - 0

Cycles

Results (primary 4.4%, secondary -5.2%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
5.9% [3.1%, 9.4%] 5
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-3.1% [-3.1%, -3.1%] 1
Improvements ✅
(secondary)
-5.2% [-5.2%, -5.2%] 1
All ❌✅ (primary) 4.4% [-3.1%, 9.4%] 6

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 472.158s -> 470.836s (-0.28%)
Artifact size: 378.09 MiB -> 378.15 MiB (0.02%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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-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.