Skip to content

Conversation

@tamird
Copy link
Contributor

@tamird tamird commented Oct 13, 2025

Improve type safety by using an enum rather than strings.

@rustbot
Copy link
Collaborator

rustbot commented Oct 13, 2025

These commits modify compiler targets.
(See the Target Tier Policy.)

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann

Some changes occurred in cfg and check-cfg configuration

cc @Urgau

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

Some changes occurred in compiler/rustc_codegen_ssa

cc @WaffleLapkin

Some changes occurred in compiler/rustc_codegen_gcc

cc @antoyo, @GuillaumeGomez

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. O-apple Operating system: Apple / Darwin (macOS, iOS, tvOS, visionOS, watchOS) 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. labels Oct 13, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 13, 2025

r? @nnethercote

rustbot has assigned @nnethercote.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@tamird tamird force-pushed the arch-enum branch 2 times, most recently from 289dc7b to 23b2e59 Compare October 13, 2025 20:42
@rust-log-analyzer

This comment has been minimized.

@nnethercote
Copy link
Contributor

This seems like a good change, but I think it's large enough that it should have an MCP, meeting the criteria of "Significant internal refactorings/changes" -- it's a simple change, but one that touches a lot of files.

@tamird
Copy link
Contributor Author

tamird commented Oct 14, 2025

This seems like a good change, but I think it's large enough that it should have an MCP, meeting the criteria of "Significant internal refactorings/changes" -- it's a simple change, but one that touches a lot of files.

Done: rust-lang/compiler-team#926.

@Urgau
Copy link
Member

Urgau commented Oct 14, 2025

I'm curious if this has any performance impact, let's see.

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Oct 14, 2025
rustc_target: introduce Architecture
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 14, 2025
@rust-bors
Copy link
Contributor

rust-bors bot commented Oct 14, 2025

☀️ Try build successful (CI)
Build commit: 3a048fa (3a048fab4921cf40ac8c01ca813c3fde6e3a2caa, parent: e100792918c8bd9e0cb830f96fc9b171e8892fa1)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (3a048fa): comparison URL.

Overall result: ❌✅ regressions and improvements - no action needed

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.8% [0.8%, 0.8%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.2% [-0.2%, -0.2%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary -2.1%, secondary 1.1%)

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)
1.8% [1.0%, 3.6%] 7
Improvements ✅
(primary)
-2.1% [-2.7%, -1.6%] 2
Improvements ✅
(secondary)
-1.3% [-1.4%, -1.3%] 2
All ❌✅ (primary) -2.1% [-2.7%, -1.6%] 2

Cycles

Results (primary 2.1%, secondary 0.1%)

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

mean range count
Regressions ❌
(primary)
2.1% [2.1%, 2.1%] 1
Regressions ❌
(secondary)
3.6% [3.6%, 3.6%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.4% [-3.4%, -3.4%] 1
All ❌✅ (primary) 2.1% [2.1%, 2.1%] 1

Binary size

Results (secondary -0.0%)

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)
-0.0% [-0.0%, -0.0%] 1
All ❌✅ (primary) - - 0

Bootstrap: 473.51s -> 474.979s (0.31%)
Artifact size: 388.11 MiB -> 388.13 MiB (0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 14, 2025
@bors
Copy link
Collaborator

bors commented Oct 15, 2025

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

@rustbot

This comment has been minimized.

@nnethercote
Copy link
Contributor

Looks like two things are needed:

  • Rename Architecture as Arch (there were 8 people agreeing with this suggestion in the Zulip thread, judging by the emoji responses)
  • Add the Unknown variant.

@rustbot author

@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 24, 2025
@bors
Copy link
Collaborator

bors commented Nov 5, 2025

⌛ Testing commit 26b0560 with merge c0ff72f...

@bors
Copy link
Collaborator

bors commented Nov 5, 2025

☀️ Test successful - checks-actions
Approved by: nnethercote
Pushing c0ff72f to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 5, 2025
@bors bors merged commit c0ff72f into rust-lang:master Nov 5, 2025
12 checks passed
@rustbot rustbot added this to the 1.93.0 milestone Nov 5, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 5, 2025

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 6e41e61 (parent) -> c0ff72f (this PR)

Test differences

Show 4 test diffs

Stage 0

  • tests::custom_arch_propagates_from_json: [missing] -> pass (J1)

Stage 1

  • tests::custom_arch_propagates_from_json: [missing] -> pass (J0)

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

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard c0ff72ffc4e88a2bbb69add95a4946d213996895 --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. pr-check-1: 1588.1s -> 1964.4s (+23.7%)
  2. i686-gnu-1: 7223.9s -> 8442.1s (+16.9%)
  3. aarch64-gnu-llvm-20-2: 2211.7s -> 2551.1s (+15.3%)
  4. x86_64-gnu-llvm-20: 2485.2s -> 2792.9s (+12.4%)
  5. dist-aarch64-apple: 6938.1s -> 6090.1s (-12.2%)
  6. x86_64-gnu-gcc: 3256.4s -> 3622.2s (+11.2%)
  7. i686-gnu-2: 5596.1s -> 6196.2s (+10.7%)
  8. x86_64-gnu-llvm-20-2: 5352.8s -> 5916.4s (+10.5%)
  9. x86_64-gnu-tools: 3328.3s -> 3667.2s (+10.2%)
  10. dist-powerpc-linux: 4739.4s -> 5187.4s (+9.5%)
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 (c0ff72f): comparison URL.

Overall result: ❌✅ regressions and improvements - no action needed

@rustbot label: -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.1% [0.1%, 0.1%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.1% [-0.1%, -0.0%] 2
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 1.0%, secondary -1.6%)

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

mean range count
Regressions ❌
(primary)
2.8% [2.8%, 2.8%] 1
Regressions ❌
(secondary)
3.0% [0.8%, 6.1%] 6
Improvements ✅
(primary)
-0.9% [-0.9%, -0.9%] 1
Improvements ✅
(secondary)
-3.9% [-5.6%, -1.8%] 12
All ❌✅ (primary) 1.0% [-0.9%, 2.8%] 2

Cycles

Results (primary -3.8%, secondary -0.9%)

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)
3.4% [1.6%, 5.1%] 6
Improvements ✅
(primary)
-3.8% [-3.8%, -3.8%] 1
Improvements ✅
(secondary)
-5.2% [-9.1%, -1.5%] 6
All ❌✅ (primary) -3.8% [-3.8%, -3.8%] 1

Binary size

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

Bootstrap: 475.404s -> 474.063s (-0.28%)
Artifact size: 390.71 MiB -> 390.97 MiB (0.06%)

@tamird tamird deleted the arch-enum branch November 5, 2025 15:02
tautschnig added a commit to tautschnig/kani that referenced this pull request Nov 6, 2025
Relevant upstream PR:
- rust-lang/rust#147645 (rustc_target: introduce Arch)

Resolves: model-checking#4450
github-merge-queue bot pushed a commit to model-checking/kani that referenced this pull request Nov 6, 2025
Relevant upstream PR:
- rust-lang/rust#147645 (rustc_target: introduce
Arch)

Resolves: #4450

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 and MIT licenses.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jan 14, 2026
rustc_target: Remove unused Arch::PowerPC64LE

This variant has been added in rust-lang#147645, but actually unused since target_arch for powerpc64le- targets is "powerpc64". (The difference between powerpc64- and powerpc64le- targets is identified by target_endian.)

Note: This is an internal cleanup and does NOT remove `powerpc64le-*` targets.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jan 14, 2026
rustc_target: Remove unused Arch::PowerPC64LE

This variant has been added in rust-lang#147645, but actually unused since target_arch for powerpc64le- targets is "powerpc64". (The difference between powerpc64- and powerpc64le- targets is identified by target_endian.)

Note: This is an internal cleanup and does NOT remove `powerpc64le-*` targets.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jan 14, 2026
rustc_target: Remove unused Arch::PowerPC64LE

This variant has been added in rust-lang#147645, but actually unused since target_arch for powerpc64le- targets is "powerpc64". (The difference between powerpc64- and powerpc64le- targets is identified by target_endian.)

Note: This is an internal cleanup and does NOT remove `powerpc64le-*` targets.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jan 14, 2026
rustc_target: Remove unused Arch::PowerPC64LE

This variant has been added in rust-lang#147645, but actually unused since target_arch for powerpc64le- targets is "powerpc64". (The difference between powerpc64- and powerpc64le- targets is identified by target_endian.)

Note: This is an internal cleanup and does NOT remove `powerpc64le-*` targets.
rust-timer added a commit that referenced this pull request Jan 15, 2026
Rollup merge of #150966 - arch-powerpc64le, r=petrochenkov

rustc_target: Remove unused Arch::PowerPC64LE

This variant has been added in #147645, but actually unused since target_arch for powerpc64le- targets is "powerpc64". (The difference between powerpc64- and powerpc64le- targets is identified by target_endian.)

Note: This is an internal cleanup and does NOT remove `powerpc64le-*` targets.
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Jan 15, 2026
rustc_target: Remove unused Arch::PowerPC64LE

This variant has been added in rust-lang/rust#147645, but actually unused since target_arch for powerpc64le- targets is "powerpc64". (The difference between powerpc64- and powerpc64le- targets is identified by target_endian.)

Note: This is an internal cleanup and does NOT remove `powerpc64le-*` targets.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. merged-by-bors This PR was explicitly merged by bors. O-apple Operating system: Apple / Darwin (macOS, iOS, tvOS, visionOS, watchOS) S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants