Update compiler_builtins to 0.1.114 by nicholasbishop · Pull Request #125016 · rust-lang/rust (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation93 Commits2 Checks6 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

nicholasbishop

The weak-intrinsics feature was removed from compiler_builtins in rust-lang/compiler-builtins#598, so dropped the compiler-builtins-weak-intrinsics feature from alloc/std/sysroot.

In rust-lang/compiler-builtins#593, some builtins for f16/f128 were added. These don't work for all compiler backends, so add a compiler-builtins-no-f16-f128 feature and disable it for cranelift and gcc.

@rustbot

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
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

@rustbot

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@rustbot rustbot added the T-libs

Relevant to the library team, which will review and decide on the PR/issue.

label

May 11, 2024

@rust-log-analyzer

This comment has been minimized.

RalfJung

@rustbot

Some changes occurred in compiler/rustc_codegen_gcc

cc @antoyo, @GuillaumeGomez

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

@rust-log-analyzer

This comment has been minimized.

@klensy

@nicholasbishop

Was this closed intentionally?

@GuillaumeGomez

Oh wow, sorry didn't realize, no it wasn't on purpose!

@rust-log-analyzer

This comment has been minimized.

@bors

@tgross35

Note that #124886 does the same thing

@beetrees

A rebase should fix the CI failure now that #123816 has been merged.

@rust-log-analyzer

This comment has been minimized.

@beetrees

It appears the CI failure is being caused by the bootstrap stage0 compiler. I guess it won't succeed until #123816 reaches stage0 then.

@nicholasbishop

Makes sense. Is the compiler-builtins-no-f16-f128 feature still needed here? I'm unclear whether that mangling error was the only problem, or if it's still correct to turn off f16/f128 for gcc/cranelift.

@tgross35

Everything for f16/f128 needs to be turned off for the GCC and cranelift backends until they gain support (tracked at the issues at the bottom of this list #116909 (comment)). These types should stay enabled for the default LLVM backend, though.

@tgross35

It appears the CI failure is being caused by the bootstrap stage0 compiler. I guess it won't succeed until #123816 reaches stage0 then.

I'll ask on Zulip if we might be able to backport that to unblock these updates

tgross35 added a commit to tgross35/rust that referenced this pull request

Aug 22, 2024

@tgross35

The only requirement for f16 support, aside from LLVM not crashing and no ABI issues, is that symbols to convert to and from f32 are available. Since the update to compiler-builtins in 1, we now provide these on all platforms.

This also enables f16 math since there are no further requirements.

bors added a commit to rust-lang-ci/rust that referenced this pull request

Aug 22, 2024

@bors

…r=

Enable f16 tests on platforms that were missing conversion symbols

The only requirement for f16 support, aside from LLVM not crashing and no ABI issues, is that symbols to convert to and from f32 are available. Since the update to compiler-builtins in rust-lang#125016, we now provide these on all platforms.

This also enables f16 math since there are no further requirements.

try-job: dist-powerpc64-linux try-job: dist-powerpc64le-linux try-job: dist-riscv64-linux try-job: dist-aarch64-msvc

jieyouxu added a commit to jieyouxu/rust that referenced this pull request

Aug 22, 2024

@jieyouxu

Enable f16 on x86 and x86-64

Since the compiler_builtins update 1, ABI bugs on x86 should be resolved. Enable tests for f16 on these platforms now.

try-job: i686-gnu try-job: dist-i586-gnu-i586-i686-musl

tgross35 added a commit to tgross35/rust that referenced this pull request

Aug 22, 2024

@tgross35

Enable f16 on x86 and x86-64

Since the compiler_builtins update 1, ABI bugs on x86 should be resolved. Enable tests for f16 on these platforms now.

try-job: i686-gnu try-job: dist-i586-gnu-i586-i686-musl

tgross35 added a commit to tgross35/rust that referenced this pull request

Aug 22, 2024

@tgross35

Since the compiler_builtins update 1, ABI bugs on x86 should be resolved. Enable tests for f16 on these platforms now.

bors added a commit to rust-lang-ci/rust that referenced this pull request

Aug 22, 2024

@bors

Enable f16 on x86 and x86-64

Since the compiler_builtins update 1, ABI bugs on x86 should be resolved. Enable tests for f16 on these platforms now.

try-job: i686-gnu try-job: dist-i586-gnu-i586-i686-musl try-job: x86_64-gnu-distcheck

tgross35 added a commit to tgross35/rust that referenced this pull request

Aug 22, 2024

@tgross35

Since the compiler_builtins update 1, ABI bugs on x86 should be resolved. Enable tests for f16 on these platforms now.

f16 math functions (reliable_f16_math) are still excluded because there is an LLVM crash for powi 2.

bors added a commit to rust-lang-ci/rust that referenced this pull request

Aug 22, 2024

@bors

Enable f16 tests on x86 and x86-64

Since the compiler_builtins update 1, ABI bugs on x86 should be resolved. Enable tests for f16 on these platforms now.

f16 math functions (reliable_f16_math) are still excluded because there is an LLVM crash for powi 2.

try-job: dist-i586-gnu-i586-i686-musl try-job: x86_64-gnu-distcheck

tgross35 added a commit to tgross35/rust that referenced this pull request

Aug 23, 2024

@tgross35

Since the compiler_builtins update 1, ABI bugs on x86 should be resolved. Enable tests for f16 on these platforms now.

f16 math functions (reliable_f16_math) are still excluded because there is an LLVM crash for powi 2.

tgross35 added a commit to tgross35/rust that referenced this pull request

Aug 23, 2024

@tgross35

Enable f16 tests on x86 and x86-64

Since the compiler_builtins update 1, ABI bugs on x86 should be resolved. Enable tests for f16 on these platforms now.

f16 math functions (reliable_f16_math) are still excluded because there is an LLVM crash for powi 2.

try-job: dist-i586-gnu-i586-i686-musl try-job: x86_64-gnu-distcheck

tgross35 added a commit to tgross35/rust that referenced this pull request

Aug 23, 2024

@tgross35

Since the compiler_builtins update 1, ABI bugs on x86 should be resolved. Enable tests for f16 on these platforms now.

f16 math functions (reliable_f16_math) are still excluded because there is an LLVM crash for powi 2.

bors added a commit to rust-lang-ci/rust that referenced this pull request

Aug 23, 2024

@bors

Enable f16 tests on x86 and x86-64

Since the compiler_builtins update 1, ABI bugs on x86 should be resolved. Enable tests for f16 on these platforms now.

f16 math functions (reliable_f16_math) are still excluded because there is an LLVM crash for powi 2.

try-job: dist-i586-gnu-i586-i686-musl try-job: x86_64-apple-1

bors added a commit to rust-lang-ci/rust that referenced this pull request

Aug 23, 2024

@bors

Enable f16 tests on x86 and x86-64

Since the compiler_builtins update 1, ABI bugs on x86 should be resolved. Enable tests for f16 on these platforms now.

f16 math functions (reliable_f16_math) are still excluded because there is an LLVM crash for powi 2.

try-job: dist-i586-gnu-i586-i686-musl try-job: x86_64-apple-1

bors added a commit to rust-lang-ci/rust that referenced this pull request

Aug 23, 2024

@bors

Enable f16 tests on x86 and x86-64

Since the compiler_builtins update 1, ABI bugs on x86 should be resolved. Enable tests for f16 on these platforms now.

f16 math functions (reliable_f16_math) are still excluded because there is an LLVM crash for powi 2.

try-job: dist-i586-gnu-i586-i686-musl try-job: x86_64-apple-1

bors added a commit to rust-lang-ci/rust that referenced this pull request

Aug 24, 2024

@bors

Enable f16 tests on x86 and x86-64

Since the compiler_builtins update 1, ABI bugs on x86 should be resolved. Enable tests for f16 on these platforms now.

f16 math functions (reliable_f16_math) are still excluded because there is an LLVM crash for powi 2.

try-job: dist-i586-gnu-i586-i686-musl try-job: x86_64-apple-1

bors added a commit to rust-lang-ci/rust that referenced this pull request

Aug 24, 2024

@bors

Enable f16 tests on x86 and x86-64

Since the compiler_builtins update 1, ABI bugs on x86 should be resolved. Enable tests for f16 on these platforms now.

f16 math functions (reliable_f16_math) are still excluded because there is an LLVM crash for powi 2.

try-job: dist-i586-gnu-i586-i686-musl try-job: x86_64-apple-1

bors added a commit to rust-lang-ci/rust that referenced this pull request

Aug 24, 2024

@bors

Enable f16 tests on x86 and x86-64

Since the compiler_builtins update 1, ABI bugs on x86 should be resolved. Enable tests for f16 on these platforms now.

f16 math functions (reliable_f16_math) are still excluded because there is an LLVM crash for powi 2.

try-job: dist-i586-gnu-i586-i686-musl try-job: x86_64-apple-1

tgross35 added a commit to tgross35/rust that referenced this pull request

Sep 27, 2024

@tgross35

The only requirement for f16 support, aside from LLVM not crashing and no ABI issues, is that symbols to convert to and from f32 are available. Since the update to compiler-builtins in 1, we now provide these on all platforms.

This also enables f16 math since there are no further requirements.

Still excluded are platforms for which LLVM emits infinitely-recursing code.

bors added a commit to rust-lang-ci/rust that referenced this pull request

Sep 27, 2024

@bors

…r=

Enable f16 tests on platforms that were missing conversion symbols

The only requirement for f16 support, aside from LLVM not crashing and no ABI issues, is that symbols to convert to and from f32 are available. Since the update to compiler-builtins in rust-lang#125016, we now provide these on all platforms.

This also enables f16 math since there are no further requirements.

try-job: arm-android try-job: test-various try-job: x86_64-fuchsia

bors added a commit to rust-lang-ci/rust that referenced this pull request

Sep 28, 2024

@bors

…r=Mark-Simulacrum

Enable f16 tests on platforms that were missing conversion symbols

The only requirement for f16 support, aside from LLVM not crashing and no ABI issues, is that symbols to convert to and from f32 are available. Since the update to compiler-builtins in rust-lang#125016, we now provide these on all platforms.

This also enables f16 math since there are no further requirements.

Still excluded are platforms for which LLVM emits infinitely-recursing code.

try-job: arm-android try-job: test-various try-job: x86_64-fuchsia

RalfJung pushed a commit to RalfJung/miri that referenced this pull request

Oct 3, 2024

@bors

…mulacrum

Enable f16 tests on platforms that were missing conversion symbols

The only requirement for f16 support, aside from LLVM not crashing and no ABI issues, is that symbols to convert to and from f32 are available. Since the update to compiler-builtins in rust-lang/rust#125016, we now provide these on all platforms.

This also enables f16 math since there are no further requirements.

Still excluded are platforms for which LLVM emits infinitely-recursing code.

try-job: arm-android try-job: test-various try-job: x86_64-fuchsia

MingcongBai added a commit to AOSC-Tracking/rustc that referenced this pull request

Oct 18, 2024

@MingcongBai

The f16/f128 handling introduced as part of rust-lang/rustc#125016 (Update compiler_builtins to 0.1.114) broke compilation on LoongArch and RISC-V:

error: internal compiler error: compiler/rustc_codegen_llvm/src/abi.rs: 126:22: unsupported float: Reg { kind: Float, size: Size(2 bytes) }

thread 'rustc' panicked at compiler/rustc_codegen_llvm/src/abi.rs:126:22: Box

This should be resolved with LLVM 19, but we are still on LLVM 18.

Revert 99e6a28 as a temporary workaround.

Ref: rust-lang#125016

kxxt added a commit to kxxt/archriscv-packages that referenced this pull request

Oct 20, 2024

@kxxt

Musl Patch

riscv64gc-unknown-linux-musl gets promoted to tier 2 and crt_static_default is updated to false in rust-lang/rust#122049, which triggers rust-lang/rust#82521 (comment) when building stage2 library artifacts (riscv64gc-unknown-linux-gnu -> riscv64gc-unknown-linux-musl).

I patched it to re-enable crt_static_default for riscv64gc-unknown-linux-musl to fix the build and align with the behavior on x86 Arch Linux, where rust-musl defaults to statically link musl.

Wasm compiler_builtins bug

Wasm compiler_builtins rlib from built rust-wasm package includes objects for host architecture(riscv64 in our case, and x86_64 for x86 Arch Linux). This is not reproducible for toolchains installed via rustup so I have reported it to Arch Linux: https://gitlab.archlinux.org/archlinux/packaging/packages/rust/-/issues/3

Complications when building 1.82.0

rust-lang/rust#125016 landed in 1.82.0, which breaks building rust 1.82.0 using our packaged rust 1.81.0. Compiling the new compiler_builtins component requires a rustc compiler that includes rust-lang/rust@99e6a28 but unfortunately 1.81.0 does not, leading to the following ICE: https://archriscv.felixc.at/.status/log.htm?url=logs/rust/rust-1:1.82.0-1.log

internal compiler error: compiler/rustc_codegen_llvm/src/abi.rs:126:22: unsupported float: Reg { kind: Float, size: Size(2 bytes) }

This is mitigated upstream by bumping stage0 to 1.82: rust-lang/rust#129268 (comment)

So we need to first build 1.82.0 rustc once without the f16/f128 handling part in compiler_builtins, to get a compiler that is capable of handling f16/f128. And then we can use this compiler to compile compiler_builtins with f16/f128 handling. It's not easy to do so in one patch. The most easy way is to build and package rust 1.82.0 twice. This PR covers the first part and disable-f16-f128.diff will be removed in the second part.

kxxt added a commit to kxxt/archriscv-packages that referenced this pull request

Oct 20, 2024

@kxxt

Musl Patch

riscv64gc-unknown-linux-musl gets promoted to tier 2 and crt_static_default is updated to false in rust-lang/rust#122049, which triggers rust-lang/rust#82521 (comment) when building stage2 library artifacts (riscv64gc-unknown-linux-gnu -> riscv64gc-unknown-linux-musl).

I patched it to re-enable crt_static_default for riscv64gc-unknown-linux-musl to fix the build and align with the behavior on x86 Arch Linux, where rust-musl defaults to statically link musl.

Wasm compiler_builtins bug

Wasm compiler_builtins rlib from built rust-wasm package includes objects for host architecture(riscv64 in our case, and x86_64 for x86 Arch Linux). This is not reproducible for toolchains installed via rustup so I have reported it to Arch Linux: https://gitlab.archlinux.org/archlinux/packaging/packages/rust/-/issues/3

Complications when building 1.82.0

rust-lang/rust#125016 landed in 1.82.0, which breaks building rust 1.82.0 using our packaged rust 1.81.0. Compiling the new compiler_builtins component requires a rustc compiler that includes rust-lang/rust@99e6a28 but unfortunately 1.81.0 does not, leading to the following ICE: https://archriscv.felixc.at/.status/log.htm?url=logs/rust/rust-1:1.82.0-1.log

internal compiler error: compiler/rustc_codegen_llvm/src/abi.rs:126:22: unsupported float: Reg { kind: Float, size: Size(2 bytes) }

This is mitigated upstream by bumping stage0 to 1.82: rust-lang/rust#129268 (comment)

So we need to first build 1.82.0 rustc once without the f16/f128 handling part in compiler_builtins, to get a compiler that is capable of handling f16/f128. And then we can use this compiler to compile compiler_builtins with f16/f128 handling. It's not easy to do so in one patch. The most easy way is to build and package rust 1.82.0 twice. This PR covers the first part and disable-f16-f128.diff will be removed in the second part.

@kxxt kxxt mentioned this pull request

Oct 20, 2024

felixonmars pushed a commit to felixonmars/archriscv-packages that referenced this pull request

Oct 20, 2024

@kxxt @felixonmars

Musl Patch

riscv64gc-unknown-linux-musl gets promoted to tier 2 and crt_static_default is updated to false in rust-lang/rust#122049, which triggers rust-lang/rust#82521 (comment) when building stage2 library artifacts (riscv64gc-unknown-linux-gnu -> riscv64gc-unknown-linux-musl).

I patched it to re-enable crt_static_default for riscv64gc-unknown-linux-musl to fix the build and align with the behavior on x86 Arch Linux, where rust-musl defaults to statically link musl.

Wasm compiler_builtins bug

Wasm compiler_builtins rlib from built rust-wasm package includes objects for host architecture(riscv64 in our case, and x86_64 for x86 Arch Linux). This is not reproducible for toolchains installed via rustup so I have reported it to Arch Linux: https://gitlab.archlinux.org/archlinux/packaging/packages/rust/-/issues/3

Complications when building 1.82.0

rust-lang/rust#125016 landed in 1.82.0, which breaks building rust 1.82.0 using our packaged rust 1.81.0. Compiling the new compiler_builtins component requires a rustc compiler that includes rust-lang/rust@99e6a28 but unfortunately 1.81.0 does not, leading to the following ICE: https://archriscv.felixc.at/.status/log.htm?url=logs/rust/rust-1:1.82.0-1.log

internal compiler error: compiler/rustc_codegen_llvm/src/abi.rs:126:22: unsupported float: Reg { kind: Float, size: Size(2 bytes) }

This is mitigated upstream by bumping stage0 to 1.82: rust-lang/rust#129268 (comment)

So we need to first build 1.82.0 rustc once without the f16/f128 handling part in compiler_builtins, to get a compiler that is capable of handling f16/f128. And then we can use this compiler to compile compiler_builtins with f16/f128 handling. It's not easy to do so in one patch. The most easy way is to build and package rust 1.82.0 twice. This PR covers the first part and disable-f16-f128.diff will be removed in the second part.

antoyo pushed a commit to antoyo/rust that referenced this pull request

Jan 13, 2025

@bors

…ss35

Update compiler_builtins to 0.1.114

The weak-intrinsics feature was removed from compiler_builtins in rust-lang/compiler-builtins#598, so dropped the compiler-builtins-weak-intrinsics feature from alloc/std/sysroot.

In rust-lang/compiler-builtins#593, some builtins for f16/f128 were added. These don't work for all compiler backends, so add a compiler-builtins-no-f16-f128 feature and disable it for cranelift and gcc.

Labels

merged-by-bors

This PR was explicitly merged by bors.

S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

T-libs

Relevant to the library team, which will review and decide on the PR/issue.