rustc_target: callconv: powerpc64: Use the ABI set in target options instead of guessing#150468
rustc_target: callconv: powerpc64: Use the ABI set in target options instead of guessing#150468Gelbpunkt wants to merge 2 commits intorust-lang:mainfrom
Conversation
|
These commits modify compiler targets. |
|
r? @chenyukang rustbot has assigned @chenyukang. Use |
2106bd3 to
35377f3
Compare
|
@rustbot reroll |
|
@rustbot reroll |
…instead of guessing All PowerPC64 targets except AIX explicitly set the ABI in the target options. We can therefore stop hardcoding the ABI to be used based on the target environment or OS, except for the AIX special case. The fallback based on endianness is kept for the sake of compatibility with custom targets. This makes it so that big endian targets not explicitly accounted for before (powerpc64-unknown-openbsd) and targets that don't use the expected default ABI (ELFv2 Glibc targets) use the correct ABI in the calling convention code.
35377f3 to
b2e1f69
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
b2e1f69 to
d40f0cd
Compare
… PowerPC64(LE) PowerPC64 ELF targets (effectively anything that isn't AIX) use either the ELFv1 or ELFv2 ABI. The ELFv1 ABI is only specified for big endian targets, while ELFv2 can be used by both little- and big-endian targets. Make sure that, if an LLVM ABI is set, it is set to one of the two. AIX does not set an LLVM ABI name, so ensure that AIX targets don't set anything other than an empty ABI name.
d40f0cd to
168f324
Compare
|
@rustbot reroll |
|
r? me This LGTM from by 10k foot view without knowing anything about the details of these ABIs ;) . However, do we have to worry about this breaking the ABI for anyone already using these targets? Also, @workingjubilee I wouldn't mind a second opinion. :) |
Previously, this hardcoded the list of big-endian targets using ELFv2 to musl and FreeBSD, which was not kept up to date (OpenBSD is missing from here). Since all PowerPC64 targets now specify their ABI, we can stop hardcoding the list. It will not break the ABI for any of them, AFAICT this is strictly a fix for the OpenBSD target and makes it so there's one less part of the code we need to worry about when changing or adding new targets. |
Rollup of 14 pull requests Successful merges: - #150468 (rustc_target: callconv: powerpc64: Use the ABI set in target options instead of guessing) - #151628 (Fix ICE in const eval of packed SIMD types with non-power-of-two element counts) - #151740 (Fix short backtraces from stripped executables) - #151871 (don't use env with infer vars) - #152591 (Simplify internals of `{Rc,Arc}::default`) - #152865 (Fixed ByteStr not padding within its Display trait when no specific alignment is mentioned) - #152908 (Enable rust.remap-debuginfo in the dist profile) - #152705 (Test(lib/win/proc): Skip `raw_attributes` doctest under Win7) - #152767 (fix typo in `carryless_mul` macro invocation) - #152837 (fix(codegen): Use `body_codegen_attrs` For Caller In `adjust_target_feature_sig`) - #152871 (Fix warnings in rs{begin,end}.rs files) - #152921 (Add build.rustdoc option to bootstrap config) - #152933 (Start migration for `LintDiagnostic` items by adding API and migrating `LinkerOutput` lint) - #152937 (remove unneeded reboxing)
…ec-elf-abi, r=RalfJung rustc_target: callconv: powerpc64: Use the ABI set in target options instead of guessing All PowerPC64 targets except AIX explicitly set the ABI in the target options. We can therefore stop hardcoding the ABI to be used based on the target environment or OS, except for the AIX special case. The fallback based on endianness is kept for the sake of compatibility with custom targets. This makes it so that big endian targets not explicitly accounted for before (powerpc64-unknown-openbsd) and targets that don't use the expected default ABI (big-endian ELFv2 Glibc targets) use the correct ABI in the calling convention code. The second commit is a tiny change to validate the `llvm_abiname` set on PowerPC64(LE) targets. See the commit messages for details. CC @RalfJung who pointed out the missing `llvm_abiname` validation
Rollup of 15 pull requests Successful merges: - #149366 (GVN: consider constants of primitive types as deterministic) - #150468 (rustc_target: callconv: powerpc64: Use the ABI set in target options instead of guessing) - #151628 (Fix ICE in const eval of packed SIMD types with non-power-of-two element counts) - #151871 (don't use env with infer vars) - #152591 (Simplify internals of `{Rc,Arc}::default`) - #152657 (std: move `exit` out of PAL) - #152865 (Fixed ByteStr not padding within its Display trait when no specific alignment is mentioned) - #152908 (Enable rust.remap-debuginfo in the dist profile) - #152705 (Test(lib/win/proc): Skip `raw_attributes` doctest under Win7) - #152767 (fix typo in `carryless_mul` macro invocation) - #152837 (fix(codegen): Use `body_codegen_attrs` For Caller In `adjust_target_feature_sig`) - #152871 (Fix warnings in rs{begin,end}.rs files) - #152921 (Add build.rustdoc option to bootstrap config) - #152933 (Start migration for `LintDiagnostic` items by adding API and migrating `LinkerOutput` lint) - #152937 (remove unneeded reboxing)
…ec-elf-abi, r=RalfJung rustc_target: callconv: powerpc64: Use the ABI set in target options instead of guessing All PowerPC64 targets except AIX explicitly set the ABI in the target options. We can therefore stop hardcoding the ABI to be used based on the target environment or OS, except for the AIX special case. The fallback based on endianness is kept for the sake of compatibility with custom targets. This makes it so that big endian targets not explicitly accounted for before (powerpc64-unknown-openbsd) and targets that don't use the expected default ABI (big-endian ELFv2 Glibc targets) use the correct ABI in the calling convention code. The second commit is a tiny change to validate the `llvm_abiname` set on PowerPC64(LE) targets. See the commit messages for details. CC @RalfJung who pointed out the missing `llvm_abiname` validation
Rollup of 14 pull requests Successful merges: - #150468 (rustc_target: callconv: powerpc64: Use the ABI set in target options instead of guessing) - #151628 (Fix ICE in const eval of packed SIMD types with non-power-of-two element counts) - #151871 (don't use env with infer vars) - #152591 (Simplify internals of `{Rc,Arc}::default`) - #152657 (std: move `exit` out of PAL) - #152865 (Fixed ByteStr not padding within its Display trait when no specific alignment is mentioned) - #152908 (Enable rust.remap-debuginfo in the dist profile) - #152705 (Test(lib/win/proc): Skip `raw_attributes` doctest under Win7) - #152767 (fix typo in `carryless_mul` macro invocation) - #152837 (fix(codegen): Use `body_codegen_attrs` For Caller In `adjust_target_feature_sig`) - #152871 (Fix warnings in rs{begin,end}.rs files) - #152921 (Add build.rustdoc option to bootstrap config) - #152933 (Start migration for `LintDiagnostic` items by adding API and migrating `LinkerOutput` lint) - #152937 (remove unneeded reboxing)
|
⌛ Testing commit 168f324 with merge dd20a2b... Workflow: https://github.com/rust-lang/rust/actions/runs/22272126794 |
… r=RalfJung rustc_target: callconv: powerpc64: Use the ABI set in target options instead of guessing All PowerPC64 targets except AIX explicitly set the ABI in the target options. We can therefore stop hardcoding the ABI to be used based on the target environment or OS, except for the AIX special case. The fallback based on endianness is kept for the sake of compatibility with custom targets. This makes it so that big endian targets not explicitly accounted for before (powerpc64-unknown-openbsd) and targets that don't use the expected default ABI (big-endian ELFv2 Glibc targets) use the correct ABI in the calling convention code. The second commit is a tiny change to validate the `llvm_abiname` set on PowerPC64(LE) targets. See the commit messages for details. CC @RalfJung who pointed out the missing `llvm_abiname` validation
…ec-elf-abi, r=RalfJung rustc_target: callconv: powerpc64: Use the ABI set in target options instead of guessing All PowerPC64 targets except AIX explicitly set the ABI in the target options. We can therefore stop hardcoding the ABI to be used based on the target environment or OS, except for the AIX special case. The fallback based on endianness is kept for the sake of compatibility with custom targets. This makes it so that big endian targets not explicitly accounted for before (powerpc64-unknown-openbsd) and targets that don't use the expected default ABI (big-endian ELFv2 Glibc targets) use the correct ABI in the calling convention code. The second commit is a tiny change to validate the `llvm_abiname` set on PowerPC64(LE) targets. See the commit messages for details. CC @RalfJung who pointed out the missing `llvm_abiname` validation
|
yielding to encompassing rollup @bors yield |
|
Auto build cancelled. Cancelled workflows: The next pull request likely to be tested is #152957. |
Rollup of 13 pull requests Successful merges: - #150468 (rustc_target: callconv: powerpc64: Use the ABI set in target options instead of guessing) - #151628 (Fix ICE in const eval of packed SIMD types with non-power-of-two element counts) - #151871 (don't use env with infer vars) - #152591 (Simplify internals of `{Rc,Arc}::default`) - #152865 (Fixed ByteStr not padding within its Display trait when no specific alignment is mentioned) - #152908 (Enable rust.remap-debuginfo in the dist profile) - #152705 (Test(lib/win/proc): Skip `raw_attributes` doctest under Win7) - #152767 (fix typo in `carryless_mul` macro invocation) - #152837 (fix(codegen): Use `body_codegen_attrs` For Caller In `adjust_target_feature_sig`) - #152871 (Fix warnings in rs{begin,end}.rs files) - #152921 (Add build.rustdoc option to bootstrap config) - #152933 (Start migration for `LintDiagnostic` items by adding API and migrating `LinkerOutput` lint) - #152937 (remove unneeded reboxing)
|
⌛ Testing commit 168f324 with merge 7c35f94... Workflow: https://github.com/rust-lang/rust/actions/runs/22273503822 |
… r=RalfJung rustc_target: callconv: powerpc64: Use the ABI set in target options instead of guessing All PowerPC64 targets except AIX explicitly set the ABI in the target options. We can therefore stop hardcoding the ABI to be used based on the target environment or OS, except for the AIX special case. The fallback based on endianness is kept for the sake of compatibility with custom targets. This makes it so that big endian targets not explicitly accounted for before (powerpc64-unknown-openbsd) and targets that don't use the expected default ABI (big-endian ELFv2 Glibc targets) use the correct ABI in the calling convention code. The second commit is a tiny change to validate the `llvm_abiname` set on PowerPC64(LE) targets. See the commit messages for details. CC @RalfJung who pointed out the missing `llvm_abiname` validation
…ec-elf-abi, r=RalfJung rustc_target: callconv: powerpc64: Use the ABI set in target options instead of guessing All PowerPC64 targets except AIX explicitly set the ABI in the target options. We can therefore stop hardcoding the ABI to be used based on the target environment or OS, except for the AIX special case. The fallback based on endianness is kept for the sake of compatibility with custom targets. This makes it so that big endian targets not explicitly accounted for before (powerpc64-unknown-openbsd) and targets that don't use the expected default ABI (big-endian ELFv2 Glibc targets) use the correct ABI in the calling convention code. The second commit is a tiny change to validate the `llvm_abiname` set on PowerPC64(LE) targets. See the commit messages for details. CC @RalfJung who pointed out the missing `llvm_abiname` validation
|
once again @bors yield |
|
Auto build cancelled. Cancelled workflows: The next pull request likely to be tested is #152960. |
Rollup of 15 pull requests Successful merges: - #150468 (rustc_target: callconv: powerpc64: Use the ABI set in target options instead of guessing) - #151628 (Fix ICE in const eval of packed SIMD types with non-power-of-two element counts) - #151871 (don't use env with infer vars) - #152591 (Simplify internals of `{Rc,Arc}::default`) - #152865 (Fixed ByteStr not padding within its Display trait when no specific alignment is mentioned) - #152908 (Enable rust.remap-debuginfo in the dist profile) - #147859 (reduce the amount of panics in `{TokenStream, Literal}::from_str` calls) - #152705 (Test(lib/win/proc): Skip `raw_attributes` doctest under Win7) - #152767 (fix typo in `carryless_mul` macro invocation) - #152837 (fix(codegen): Use `body_codegen_attrs` For Caller In `adjust_target_feature_sig`) - #152871 (Fix warnings in rs{begin,end}.rs files) - #152879 (Remove `impl IntoQueryParam<P> for &'a P`.) - #152933 (Start migration for `LintDiagnostic` items by adding API and migrating `LinkerOutput` lint) - #152937 (remove unneeded reboxing) - #152953 (Fix typo in armv7a-vex-v5.md)
|
⌛ Testing commit 168f324 with merge e59a71a... Workflow: https://github.com/rust-lang/rust/actions/runs/22275041573 |
… r=RalfJung rustc_target: callconv: powerpc64: Use the ABI set in target options instead of guessing All PowerPC64 targets except AIX explicitly set the ABI in the target options. We can therefore stop hardcoding the ABI to be used based on the target environment or OS, except for the AIX special case. The fallback based on endianness is kept for the sake of compatibility with custom targets. This makes it so that big endian targets not explicitly accounted for before (powerpc64-unknown-openbsd) and targets that don't use the expected default ABI (big-endian ELFv2 Glibc targets) use the correct ABI in the calling convention code. The second commit is a tiny change to validate the `llvm_abiname` set on PowerPC64(LE) targets. See the commit messages for details. CC @RalfJung who pointed out the missing `llvm_abiname` validation
…ec-elf-abi, r=RalfJung rustc_target: callconv: powerpc64: Use the ABI set in target options instead of guessing All PowerPC64 targets except AIX explicitly set the ABI in the target options. We can therefore stop hardcoding the ABI to be used based on the target environment or OS, except for the AIX special case. The fallback based on endianness is kept for the sake of compatibility with custom targets. This makes it so that big endian targets not explicitly accounted for before (powerpc64-unknown-openbsd) and targets that don't use the expected default ABI (big-endian ELFv2 Glibc targets) use the correct ABI in the calling convention code. The second commit is a tiny change to validate the `llvm_abiname` set on PowerPC64(LE) targets. See the commit messages for details. CC @RalfJung who pointed out the missing `llvm_abiname` validation
…ec-elf-abi, r=RalfJung rustc_target: callconv: powerpc64: Use the ABI set in target options instead of guessing All PowerPC64 targets except AIX explicitly set the ABI in the target options. We can therefore stop hardcoding the ABI to be used based on the target environment or OS, except for the AIX special case. The fallback based on endianness is kept for the sake of compatibility with custom targets. This makes it so that big endian targets not explicitly accounted for before (powerpc64-unknown-openbsd) and targets that don't use the expected default ABI (big-endian ELFv2 Glibc targets) use the correct ABI in the calling convention code. The second commit is a tiny change to validate the `llvm_abiname` set on PowerPC64(LE) targets. See the commit messages for details. CC @RalfJung who pointed out the missing `llvm_abiname` validation
|
once again @bors yield |
|
Auto build cancelled. Cancelled workflows: The next pull request likely to be tested is #152965. |
…uwer Rollup of 14 pull requests Successful merges: - #150468 (rustc_target: callconv: powerpc64: Use the ABI set in target options instead of guessing) - #151628 (Fix ICE in const eval of packed SIMD types with non-power-of-two element counts) - #151871 (don't use env with infer vars) - #152591 (Simplify internals of `{Rc,Arc}::default`) - #152865 (Fixed ByteStr not padding within its Display trait when no specific alignment is mentioned) - #147859 (reduce the amount of panics in `{TokenStream, Literal}::from_str` calls) - #152705 (Test(lib/win/proc): Skip `raw_attributes` doctest under Win7) - #152767 (fix typo in `carryless_mul` macro invocation) - #152837 (fix(codegen): Use `body_codegen_attrs` For Caller In `adjust_target_feature_sig`) - #152871 (Fix warnings in rs{begin,end}.rs files) - #152879 (Remove `impl IntoQueryParam<P> for &'a P`.) - #152933 (Start migration for `LintDiagnostic` items by adding API and migrating `LinkerOutput` lint) - #152937 (remove unneeded reboxing) - #152953 (Fix typo in armv7a-vex-v5.md)
View all comments
All PowerPC64 targets except AIX explicitly set the ABI in the target options. We can therefore stop hardcoding the ABI to be used based on the target environment or OS, except for the AIX special case.
The fallback based on endianness is kept for the sake of compatibility with custom targets.
This makes it so that big endian targets not explicitly accounted for before (powerpc64-unknown-openbsd) and targets that don't use the expected default ABI (big-endian ELFv2 Glibc targets) use the correct ABI in the calling convention code.
The second commit is a tiny change to validate the
llvm_abinameset on PowerPC64(LE) targets. See the commit messages for details.CC @RalfJung who pointed out the missing
llvm_abinamevalidation