Skip to content

Update compiler_builtins to 0.1.114#125016

Merged
bors merged 2 commits intorust-lang:masterfrom
nicholasbishop:bishop-cb-112
Jul 29, 2024
Merged

Update compiler_builtins to 0.1.114#125016
bors merged 2 commits intorust-lang:masterfrom
nicholasbishop:bishop-cb-112

Conversation

@nicholasbishop
Copy link
Contributor

@nicholasbishop nicholasbishop commented May 11, 2024

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
Copy link
Collaborator

rustbot commented May 11, 2024

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 rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 11, 2024
@rustbot
Copy link
Collaborator

rustbot commented May 11, 2024

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.

@rustbot
Copy link
Collaborator

rustbot commented May 12, 2024

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
Copy link
Contributor

klensy commented May 12, 2024

There exist also #124886

@nicholasbishop
Copy link
Contributor Author

Was this closed intentionally?

@GuillaumeGomez
Copy link
Member

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

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented May 13, 2024

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

@tgross35
Copy link
Contributor

Note that #124886 does the same thing

@beetrees
Copy link
Contributor

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

@rust-log-analyzer

This comment has been minimized.

@beetrees
Copy link
Contributor

beetrees commented May 16, 2024

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
Copy link
Contributor Author

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
Copy link
Contributor

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
Copy link
Contributor

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

flip1995 pushed a commit to flip1995/rust-clippy that referenced this pull request Jun 28, 2024
Print the tested value in int_log tests

Tiny change - from the failures in rust-lang/rust#125016, it would have been nice to see what the tested values were. Update the assertion messages.
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 10, 2024
[experiment] try fixing compiler_builtins android bug

rust-lang#125016 has android bugs, try patching in fixes from rust-lang/compiler-builtins#640.

try-job: arm-android

r? `@ghost`
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 18, 2024
[experiment] try fixing compiler_builtins android bug

rust-lang#125016 has android bugs, try patching in fixes from rust-lang/compiler-builtins#640.

try-job: arm-android
try-job: dist-android

r? `@ghost`
@tgross35
Copy link
Contributor

@nicholasbishop there is another new release of builtins that should hopefully fix the android issue, 0.1.114. Could you update this?

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. Also disable it for LLVM targets that don't
support it.
@tgross35
Copy link
Contributor

Thanks for the quick change, hopefully this one works.

@bors r+

@bors
Copy link
Collaborator

bors commented Jul 29, 2024

📌 Commit ecf2963 has been approved by tgross35

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Jul 29, 2024

⌛ Testing commit ecf2963 with merge 80d8270...

@bors
Copy link
Collaborator

bors commented Jul 29, 2024

☀️ Test successful - checks-actions
Approved by: tgross35
Pushing 80d8270 to master...

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (80d8270): comparison URL.

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

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

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

Max RSS (memory usage)

Results (primary 2.9%, secondary 3.3%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
2.9% [2.3%, 4.0%] 5
Regressions ❌
(secondary)
3.3% [3.3%, 3.3%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.9% [2.3%, 4.0%] 5

Cycles

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

Binary size

Results (primary 0.0%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

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

Bootstrap: 768.947s -> 770.31s (0.18%)
Artifact size: 331.47 MiB -> 331.76 MiB (0.09%)

@TimNN
Copy link
Contributor

TimNN commented Jul 29, 2024

I think something in this PR might be broken with regard to whether the f16/f128 builtins are being generated.

I have downloaded https://ci-artifacts.rust-lang.org/rustc-builds/80d8270d8488957f62fbf0df7a19dfe596be92ac/rust-std-nightly-x86_64-unknown-linux-gnu.tar.xz

And ran

llvm-nm ./rust-std-nightly-x86_64-unknown-linux-gnu/rust-std-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-7586cb84705120bb.rlib | grep __extend
./rust-std-nightly-x86_64-unknown-linux-gnu/rust-std-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-7586cb84705120bb.rlib:lib.rmeta: no symbols
0000000000000000 T _ZN17compiler_builtins5float6extend13__extendsfdf217hc5379a65d797e83bE
0000000000000000 W __extendsfdf2

I would have expected to see the f16 & f128 symbols there.

Running a rustc build in verbose mode, I see:

/Users/logic/Projects/rustc/llvm-head/build/bootstrap/debug/rustc /Users/logic/Projects/rustc/llvm-head/build/bootstrap/debug/rustc --crate-name compiler_builtins --edition=2021 /Users/logic/.cargo/registry/src/index.crates.io-6f17d22bba15001f/compiler_builtins-0.1.114/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=145 --crate-type lib --emit=dep-info,metadata,link --cfg 'feature="compiler-builtins"' --cfg 'feature="core"' --cfg 'feature="default"' --cfg 'feature="no-f16-f128"' --cfg 'feature="rustc-dep-of-std"' --target aarch64-apple-darwin <truncated>

Note the --cfg 'feature="no-f16-f128"' in there. This is on aarch64 which means that, AFAICT, no-f16-f128 should not trigger.

Commenting out

[target.'cfg(not(any(target_arch = "aarch64", target_arch = "x86", target_arch = "x86_64")))'.dependencies]
compiler_builtins = { version = "0.1.114", features = ["no-f16-f128"] }

Does produce a libcompiler_builtins.rlib which has the f16/f128 symbols.

@tgross35
Copy link
Contributor

@tgross35

This comment was marked as duplicate.

@tgross35
Copy link
Contributor

Actually let's move discussion to a new issue, opened #128358.

@aeubanks
Copy link
Contributor

aeubanks commented Aug 2, 2024

This has also exposed rust-lang/compiler-builtins#653

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.