Skip to content

rustc_target: callconv: powerpc64: Use llvm_abiname rather than target_abi for ABI determination - #153035

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
Gelbpunkt:ppc64-callconv-llvm-abiname
Feb 26, 2026
Merged

rustc_target: callconv: powerpc64: Use llvm_abiname rather than target_abi for ABI determination#153035
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
Gelbpunkt:ppc64-callconv-llvm-abiname

Conversation

@Gelbpunkt

@GelbpunktGelbpunkt commented Feb 24, 2026

Copy link
Copy Markdown
Contributor

Currently on PowerPC64 targets, llvm_abiname and target_abi will be the same unless we're on AIX. Since llvm_abiname is what we pass on to LLVM, it is preferable to use the value of that to determine the calling convention rather than target_abi.

All PowerPC64 targets set both llvm_abiname and target_abi to the respective ELF ABIs, with the exception of AIX. This is a non-functional change.

Noticed this in the follow-up discussion from #150468 and also requested by @RalfJunghere.

r? @RalfJung

@rustbotrustbot added 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 Feb 24, 2026
@rustbot

Copy link
Copy Markdown
Collaborator

RalfJung is not on the review rotation at the moment.
They may take a while to respond.

@rust-log-analyzer

This comment has been minimized.

…t_abi for ABI determination
Currently on PowerPC64 targets, llvm_abiname and target_abi will be the
same unless we're on AIX. Since llvm_abiname is what we pass on to LLVM,
it is preferable to use the value of that to determine the calling
convention rather than target_abi.
All PowerPC64 targets set both llvm_abiname and target_abi to the
respective ELF ABIs, with the exception of AIX. This is a non-functional
change.
@Gelbpunkt
Gelbpunktforce-pushed the ppc64-callconv-llvm-abiname branch from a3237e2 to d501f96CompareFebruary 24, 2026 06:56
@RalfJung

Copy link
Copy Markdown
Member

LGTM, thanks! r=me when CI is green.

@bors delegate+

@rust-bors

rust-borsBot commented Feb 24, 2026

Copy link
Copy Markdown
Contributor

✌️ @Gelbpunkt, you can now approve this pull request!

If @RalfJung told you to "r=me" after making some further change, then please make that change and post @bors r=RalfJung.

@Gelbpunkt

Copy link
Copy Markdown
ContributorAuthor

CI is green without changes, so:

@bors r=RalfJung

@rust-bors

rust-borsBot commented Feb 25, 2026

Copy link
Copy Markdown
Contributor

📌 Commit d501f96 has been approved by RalfJung

It is now in the queue for this repository.

@rust-borsrust-borsBot 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 25, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 25, 2026
…ame, r=RalfJung
rustc_target: callconv: powerpc64: Use llvm_abiname rather than target_abi for ABI determination
Currently on PowerPC64 targets, `llvm_abiname` and `target_abi` will be the same unless we're on AIX. Since `llvm_abiname` is what we pass on to LLVM, it is preferable to use the value of that to determine the calling convention rather than `target_abi`.
All PowerPC64 targets set both `llvm_abiname` and `target_abi` to the respective ELF ABIs, with the exception of AIX. This is a non-functional change.
Noticed this in the follow-up discussion from rust-lang#150468 and also requested by @RalfJung [here](rust-lang#150468 (comment)).
r? @RalfJung
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 25, 2026
…ame, r=RalfJung
rustc_target: callconv: powerpc64: Use llvm_abiname rather than target_abi for ABI determination
Currently on PowerPC64 targets, `llvm_abiname` and `target_abi` will be the same unless we're on AIX. Since `llvm_abiname` is what we pass on to LLVM, it is preferable to use the value of that to determine the calling convention rather than `target_abi`.
All PowerPC64 targets set both `llvm_abiname` and `target_abi` to the respective ELF ABIs, with the exception of AIX. This is a non-functional change.
Noticed this in the follow-up discussion from rust-lang#150468 and also requested by @RalfJung [here](rust-lang#150468 (comment)).
r? @RalfJung
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 25, 2026
…ame, r=RalfJung
rustc_target: callconv: powerpc64: Use llvm_abiname rather than target_abi for ABI determination
Currently on PowerPC64 targets, `llvm_abiname` and `target_abi` will be the same unless we're on AIX. Since `llvm_abiname` is what we pass on to LLVM, it is preferable to use the value of that to determine the calling convention rather than `target_abi`.
All PowerPC64 targets set both `llvm_abiname` and `target_abi` to the respective ELF ABIs, with the exception of AIX. This is a non-functional change.
Noticed this in the follow-up discussion from rust-lang#150468 and also requested by @RalfJung [here](rust-lang#150468 (comment)).
r? @RalfJung
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 25, 2026
…ame, r=RalfJung
rustc_target: callconv: powerpc64: Use llvm_abiname rather than target_abi for ABI determination
Currently on PowerPC64 targets, `llvm_abiname` and `target_abi` will be the same unless we're on AIX. Since `llvm_abiname` is what we pass on to LLVM, it is preferable to use the value of that to determine the calling convention rather than `target_abi`.
All PowerPC64 targets set both `llvm_abiname` and `target_abi` to the respective ELF ABIs, with the exception of AIX. This is a non-functional change.
Noticed this in the follow-up discussion from rust-lang#150468 and also requested by @RalfJung [here](rust-lang#150468 (comment)).
r? @RalfJung
rust-borsBot pushed a commit that referenced this pull request Feb 25, 2026
…uwer
Rollup of 13 pull requests
Successful merges:
- #153079 (Revert "Move aarch64-apple dist builder to dynamic llvm linking")
- #148146 (CI: use alternative disks if available)
- #149937 (spliit out `linker-info` from `linker-messages`)
- #151771 (Fix: On wasm targets, call `panic_in_cleanup` if panic occurs in cleanup)
- #153035 (rustc_target: callconv: powerpc64: Use llvm_abiname rather than target_abi for ABI determination)
- #153075 (mGCA: Lower negated literals directly and reject non-integer negations)
- #153078 (Remove `QuerySystemFns`)
- #149978 (deprecate `Eq::assert_receiver_is_total_eq` and emit FCW on manual impls)
- #153029 (Rename `rustc::pass_by_value` lint as `rustc::disallowed_pass_by_ref`.)
- #153063 (`is_ty_must_use`: do not require a `span` argument)
- #153071 (Update books)
- #153092 (Remove redundant self usages)
- #153094 (Simplify `AppendOnlyVec` iterators)
Failed merges:
- #153091 (Migration of `LintDiagnostic` - part 4)
@jhprattjhpratt mentioned this pull request Feb 26, 2026
rust-borsBot pushed a commit that referenced this pull request Feb 26, 2026
Rollup of 13 pull requests
Successful merges:
- #148146 (CI: use alternative disks if available)
- #151771 (Fix: On wasm targets, call `panic_in_cleanup` if panic occurs in cleanup)
- #153035 (rustc_target: callconv: powerpc64: Use llvm_abiname rather than target_abi for ABI determination)
- #153075 (mGCA: Lower negated literals directly and reject non-integer negations)
- #153078 (Remove `QuerySystemFns`)
- #153089 (interpret: avoid dummy spans in the stacktrace)
- #153111 (Refactor url_parts to return is_absolute instead of out param)
- #149978 (deprecate `Eq::assert_receiver_is_total_eq` and emit FCW on manual impls)
- #153029 (Rename `rustc::pass_by_value` lint as `rustc::disallowed_pass_by_ref`.)
- #153063 (`is_ty_must_use`: do not require a `span` argument)
- #153071 (Update books)
- #153092 (Remove redundant self usages)
- #153094 (Simplify `AppendOnlyVec` iterators)
Failed merges:
- #153091 (Migration of `LintDiagnostic` - part 4)
@rust-bors
rust-borsBot merged commit d108355 into rust-lang:mainFeb 26, 2026
11 checks passed
@rustbotrustbot added this to the 1.95.0 milestone Feb 26, 2026
rust-timer added a commit that referenced this pull request Feb 26, 2026
Rollup merge of #153035 - Gelbpunkt:ppc64-callconv-llvm-abiname, r=RalfJung
rustc_target: callconv: powerpc64: Use llvm_abiname rather than target_abi for ABI determination
Currently on PowerPC64 targets, `llvm_abiname` and `target_abi` will be the same unless we're on AIX. Since `llvm_abiname` is what we pass on to LLVM, it is preferable to use the value of that to determine the calling convention rather than `target_abi`.
All PowerPC64 targets set both `llvm_abiname` and `target_abi` to the respective ELF ABIs, with the exception of AIX. This is a non-functional change.
Noticed this in the follow-up discussion from #150468 and also requested by @RalfJung [here](#150468 (comment)).
r? @RalfJung
RalfJung pushed a commit to RalfJung/miri that referenced this pull request Feb 26, 2026
Rollup of 13 pull requests
Successful merges:
- rust-lang/rust#148146 (CI: use alternative disks if available)
- rust-lang/rust#151771 (Fix: On wasm targets, call `panic_in_cleanup` if panic occurs in cleanup)
- rust-lang/rust#153035 (rustc_target: callconv: powerpc64: Use llvm_abiname rather than target_abi for ABI determination)
- rust-lang/rust#153075 (mGCA: Lower negated literals directly and reject non-integer negations)
- rust-lang/rust#153078 (Remove `QuerySystemFns`)
- rust-lang/rust#153089 (interpret: avoid dummy spans in the stacktrace)
- rust-lang/rust#153111 (Refactor url_parts to return is_absolute instead of out param)
- rust-lang/rust#149978 (deprecate `Eq::assert_receiver_is_total_eq` and emit FCW on manual impls)
- rust-lang/rust#153029 (Rename `rustc::pass_by_value` lint as `rustc::disallowed_pass_by_ref`.)
- rust-lang/rust#153063 (`is_ty_must_use`: do not require a `span` argument)
- rust-lang/rust#153071 (Update books)
- rust-lang/rust#153092 (Remove redundant self usages)
- rust-lang/rust#153094 (Simplify `AppendOnlyVec` iterators)
Failed merges:
- rust-lang/rust#153091 (Migration of `LintDiagnostic` - part 4)
@JonathanBrouwer

Copy link
Copy Markdown
Member

@rust-timer build a52ed29

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (a52ed29): comparison URL.

Overall result: no relevant changes - 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

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

Max RSS (memory usage)

Results (primary -3.9%, secondary 6.1%)

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

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
6.1%[4.5%, 7.7%]2
Improvements ✅
(primary)
-3.9%[-3.9%, -3.9%]1
Improvements ✅
(secondary)
--0
All ❌✅ (primary)-3.9%[-3.9%, -3.9%]1

Cycles

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

Binary size

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

Bootstrap: 492.161s -> 481.091s (-2.25%)
Artifact size: 395.78 MiB -> 397.79 MiB (0.51%)

github-actionsBot pushed a commit to rust-lang/rust-analyzer that referenced this pull request Mar 2, 2026
Rollup of 13 pull requests
Successful merges:
- rust-lang/rust#148146 (CI: use alternative disks if available)
- rust-lang/rust#151771 (Fix: On wasm targets, call `panic_in_cleanup` if panic occurs in cleanup)
- rust-lang/rust#153035 (rustc_target: callconv: powerpc64: Use llvm_abiname rather than target_abi for ABI determination)
- rust-lang/rust#153075 (mGCA: Lower negated literals directly and reject non-integer negations)
- rust-lang/rust#153078 (Remove `QuerySystemFns`)
- rust-lang/rust#153089 (interpret: avoid dummy spans in the stacktrace)
- rust-lang/rust#153111 (Refactor url_parts to return is_absolute instead of out param)
- rust-lang/rust#149978 (deprecate `Eq::assert_receiver_is_total_eq` and emit FCW on manual impls)
- rust-lang/rust#153029 (Rename `rustc::pass_by_value` lint as `rustc::disallowed_pass_by_ref`.)
- rust-lang/rust#153063 (`is_ty_must_use`: do not require a `span` argument)
- rust-lang/rust#153071 (Update books)
- rust-lang/rust#153092 (Remove redundant self usages)
- rust-lang/rust#153094 (Simplify `AppendOnlyVec` iterators)
Failed merges:
- rust-lang/rust#153091 (Migration of `LintDiagnostic` - part 4)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 2, 2026
prefer actual ABI-controling fields over target.abi when making ABI decisions
We don't actually check that `abi` is consistent with the fields that control the ABI, e.g. one could set `llvm_abiname` to "ilp32e" on a riscv target without setting a matching `abi`. So, if we need to make actual decisions, better to use the source of truth we forward to LLVM than the informational string we forward to the user.
This is a breaking change for aarch64 JSON target specs: setting `abi` to "softfloat" is no longer enough; one has to also set `rustc_abi` to "softfloat". That is consistent with riscv and arm32, but it's still surprising. Cc @Darksonn in case this affects the Linux kernel.
Also see rust-lang#153035 which does something similar for PowerPC, and [Zulip](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/De-spaghettifying.20ABI.20controls/with/575095372). Happy to delay this PR if someone has a better idea.
Cc @folkertdev@workingjubilee
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 2, 2026
prefer actual ABI-controling fields over target.abi when making ABI decisions
We don't actually check that `abi` is consistent with the fields that control the ABI, e.g. one could set `llvm_abiname` to "ilp32e" on a riscv target without setting a matching `abi`. So, if we need to make actual decisions, better to use the source of truth we forward to LLVM than the informational string we forward to the user.
This is a breaking change for aarch64 JSON target specs: setting `abi` to "softfloat" is no longer enough; one has to also set `rustc_abi` to "softfloat". That is consistent with riscv and arm32, but it's still surprising. Cc @Darksonn in case this affects the Linux kernel.
Also see rust-lang#153035 which does something similar for PowerPC, and [Zulip](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/De-spaghettifying.20ABI.20controls/with/575095372). Happy to delay this PR if someone has a better idea.
Cc @folkertdev@workingjubilee
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 3, 2026
prefer actual ABI-controling fields over target.abi when making ABI decisions
We don't actually check that `abi` is consistent with the fields that control the ABI, e.g. one could set `llvm_abiname` to "ilp32e" on a riscv target without setting a matching `abi`. So, if we need to make actual decisions, better to use the source of truth we forward to LLVM than the informational string we forward to the user.
This is a breaking change for aarch64 JSON target specs: setting `abi` to "softfloat" is no longer enough; one has to also set `rustc_abi` to "softfloat". That is consistent with riscv and arm32, but it's still surprising. Cc @Darksonn in case this affects the Linux kernel.
Also see rust-lang#153035 which does something similar for PowerPC, and [Zulip](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/De-spaghettifying.20ABI.20controls/with/575095372). Happy to delay this PR if someone has a better idea.
Cc @folkertdev@workingjubilee
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 3, 2026
prefer actual ABI-controling fields over target.abi when making ABI decisions
We don't actually check that `abi` is consistent with the fields that control the ABI, e.g. one could set `llvm_abiname` to "ilp32e" on a riscv target without setting a matching `abi`. So, if we need to make actual decisions, better to use the source of truth we forward to LLVM than the informational string we forward to the user.
This is a breaking change for aarch64 JSON target specs: setting `abi` to "softfloat" is no longer enough; one has to also set `rustc_abi` to "softfloat". That is consistent with riscv and arm32, but it's still surprising. Cc @Darksonn in case this affects the Linux kernel.
Also see rust-lang#153035 which does something similar for PowerPC, and [Zulip](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/De-spaghettifying.20ABI.20controls/with/575095372). Happy to delay this PR if someone has a better idea.
Cc @folkertdev@workingjubilee
rust-timer added a commit that referenced this pull request Mar 3, 2026
Rollup merge of #152941 - RalfJung:abi-control, r=mati865
prefer actual ABI-controling fields over target.abi when making ABI decisions
We don't actually check that `abi` is consistent with the fields that control the ABI, e.g. one could set `llvm_abiname` to "ilp32e" on a riscv target without setting a matching `abi`. So, if we need to make actual decisions, better to use the source of truth we forward to LLVM than the informational string we forward to the user.
This is a breaking change for aarch64 JSON target specs: setting `abi` to "softfloat" is no longer enough; one has to also set `rustc_abi` to "softfloat". That is consistent with riscv and arm32, but it's still surprising. Cc @Darksonn in case this affects the Linux kernel.
Also see #153035 which does something similar for PowerPC, and [Zulip](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/De-spaghettifying.20ABI.20controls/with/575095372). Happy to delay this PR if someone has a better idea.
Cc @folkertdev@workingjubilee
ghaaj pushed a commit to ghaaj/polygrammar that referenced this pull request Aug 7, 2026
Rollup of 13 pull requests
Successful merges:
- rust-lang/rust#148146 (CI: use alternative disks if available)
- rust-lang/rust#151771 (Fix: On wasm targets, call `panic_in_cleanup` if panic occurs in cleanup)
- rust-lang/rust#153035 (rustc_target: callconv: powerpc64: Use llvm_abiname rather than target_abi for ABI determination)
- rust-lang/rust#153075 (mGCA: Lower negated literals directly and reject non-integer negations)
- rust-lang/rust#153078 (Remove `QuerySystemFns`)
- rust-lang/rust#153089 (interpret: avoid dummy spans in the stacktrace)
- rust-lang/rust#153111 (Refactor url_parts to return is_absolute instead of out param)
- rust-lang/rust#149978 (deprecate `Eq::assert_receiver_is_total_eq` and emit FCW on manual impls)
- rust-lang/rust#153029 (Rename `rustc::pass_by_value` lint as `rustc::disallowed_pass_by_ref`.)
- rust-lang/rust#153063 (`is_ty_must_use`: do not require a `span` argument)
- rust-lang/rust#153071 (Update books)
- rust-lang/rust#153092 (Remove redundant self usages)
- rust-lang/rust#153094 (Simplify `AppendOnlyVec` iterators)
Failed merges:
- rust-lang/rust#153091 (Migration of `LintDiagnostic` - part 4)
flip1995 pushed a commit to flip1995/rust-clippy that referenced this pull request Aug 17, 2026
Rollup of 13 pull requests
Successful merges:
- rust-lang/rust#148146 (CI: use alternative disks if available)
- rust-lang/rust#151771 (Fix: On wasm targets, call `panic_in_cleanup` if panic occurs in cleanup)
- rust-lang/rust#153035 (rustc_target: callconv: powerpc64: Use llvm_abiname rather than target_abi for ABI determination)
- rust-lang/rust#153075 (mGCA: Lower negated literals directly and reject non-integer negations)
- rust-lang/rust#153078 (Remove `QuerySystemFns`)
- rust-lang/rust#153089 (interpret: avoid dummy spans in the stacktrace)
- rust-lang/rust#153111 (Refactor url_parts to return is_absolute instead of out param)
- rust-lang/rust#149978 (deprecate `Eq::assert_receiver_is_total_eq` and emit FCW on manual impls)
- rust-lang/rust#153029 (Rename `rustc::pass_by_value` lint as `rustc::disallowed_pass_by_ref`.)
- rust-lang/rust#153063 (`is_ty_must_use`: do not require a `span` argument)
- rust-lang/rust#153071 (Update books)
- rust-lang/rust#153092 (Remove redundant self usages)
- rust-lang/rust#153094 (Simplify `AppendOnlyVec` iterators)
Failed merges:
- rust-lang/rust#153091 (Migration of `LintDiagnostic` - part 4)
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant 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.

6 participants

@Gelbpunkt@rustbot@rust-log-analyzer@RalfJung@JonathanBrouwer@rust-timer