Skip to content

Update to LLVM 23 - #158734

Open
nikic wants to merge 12 commits into
rust-lang:mainfrom
nikic:llvm23
Open

Update to LLVM 23#158734
nikic wants to merge 12 commits into
rust-lang:mainfrom
nikic:llvm23

Conversation

@nikic

@nikic nikic commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

View all comments

Changes in this PR (apart from the LLVM update):

  • Updated cov-map tests due to minor ordering changes introduced in llvm/llvm-project@5931034. The affected tests are limited to LLVM >= 23 now.
  • Set LLVM_VERSIONED_DYLIB_NAME_ON_DARWIN=OFF, which restores the previous unversioned naming of the LLVM dylib on Darwin. I expect we'll want to change this for consistency with Linux, but given the amount of trouble Darwin dylibs have caused in the past, I'm not trying to do it in this PR.
  • Distribute the llvm-project/libc subproject, which is now a build dependency of LLVM.
  • Pull in f128 Windows ABI changes from adjust f128 windows abi for LLVM 23 #158778. These need to land in sync with the LLVM update (as ABI of libcalls is controlled by LLVM, not our ABI lowering).
  • Disable RISCV backend on dist-i686-mingw, because the build OOMs on a large generated file. This is a temporary measure until host tools are removed by Drop tier 2 i686-pc-windows-gnu host tools compiler-team#1020.
  • The llvm-project fork includes a new downstream patch for mingw: rust-lang/llvm-project@b89cd8e It works around mingw having broken TLS prior to GCC 16. (We're currently on GCC 14.)

Issues:

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 3, 2026
@nikic

nikic commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 3, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 3, 2026
@rust-log-analyzer

This comment has been minimized.

@rust-bors

rust-bors Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

💔 Test for b003a3f failed: CI. Failed job:

@rust-log-analyzer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rustbot rustbot added A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Jul 13, 2026
@nikic

nikic commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

@bors try

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 13, 2026
@rust-bors

rust-bors Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 0259978 failed: CI. Failed job:

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@nikic

nikic commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

@bors try

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 14, 2026
@rust-bors

rust-bors Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 4973bfc failed: CI. Failed job:

@rust-log-analyzer

This comment has been minimized.

@ZuseZ4

ZuseZ4 commented Jul 31, 2026

Copy link
Copy Markdown
Member

perfect, I dropped the last commit and only left my earlier gcc fix, as well as Nikita's PR in here.
Once the proper fix lands someone can then just approve this one, I'll probably not be on my computer.

@Kobzol

Kobzol commented Jul 31, 2026

Copy link
Copy Markdown
Member

#160149 has landed, let's try.

@bors r=cuviper

@bors try jobs=aarch64-msvc-1

@rust-bors

rust-bors Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 60d1bbf has been approved by cuviper

It is now in the queue for this repository.

@rust-bors

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rust-bors

rust-bors Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

💔 Test for af2b20b failed: CI. Failed job:

@rust-log-analyzer

This comment has been minimized.

@RalfJung

Copy link
Copy Markdown
Member

@jclulow @pfmooney looks like the Illumos runner uses an ancient GCC that cannot build LLVM 23

@rust-bors

rust-bors Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: db7ba90 (db7ba9036aa814f321e65bd65bb212a0a50dc47c)
Base parent: 922325b (922325bb13bfea5b41454318563f2a65e83c2336)

@ZuseZ4

ZuseZ4 commented Jul 31, 2026

Copy link
Copy Markdown
Member

I've updated it to 10.1.0, the same that I also used for netbsd. Let's see if it passes: #160042 (comment)

@jclulow

jclulow commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Please be sure to heed the comment about verifying the correctness of the binaries produced by the cross compiler if you're going to change the GCC version!

@RalfJung

Copy link
Copy Markdown
Member

We would appreciate your help with that verification :)

@jclulow

jclulow commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

We would appreciate your help with that verification :)

I understand. It's midnight on Friday night and I just heard about this, so I wanted to make sure we're not just going to bump the number and move on before we take a look in the next couple of days. Thanks for the heads up.

@nikic

nikic commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

LLVM theoretically supports GCC >= 7.4, so submitting a workaround for the issue upstream may work as well (i.e. use uint64_t instead of the enum class plus LLVM_PREFERRED_TYPE -- most likely this is also needed to actually get bit packing on MSVC).

Also I'm kind of confused why I didn't hit this when running the docker images locally before. I may have done something wrong, because this doesn't look like a problem when would have been introduced in the time since I tested it.

@dianqk

dianqk commented Aug 3, 2026

Copy link
Copy Markdown
Member

Per https://stackoverflow.com/a/73511549, I think we can also disable -Werror for PassWrapper.cpp when building with GCC 7.x.

@nikic

nikic commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

Oh, I didn't realize this is our own -Werror. We should definitely disable it for builds using GCC. (LLVM is not supposed to be warning free when using GCC, only when using recent Clang. And this can affect building our bindings via headers.)

@Kobzol

Kobzol commented Aug 3, 2026

Copy link
Copy Markdown
Member

I'll take a look into that.

Comment on lines 364 to 369
("__aeabi_frsub", "arm/aeabi_frsub.c"),
("__aeabi_uread4", "arm/aeabi_uread4.S"),
("__aeabi_uread8", "arm/aeabi_uread8.S"),
("__aeabi_uwrite4", "arm/aeabi_uwrite4.S"),
("__aeabi_uwrite8", "arm/aeabi_uwrite8.S"),
("__bswapdi2", "arm/bswapdi2.S"),

@tgross35 tgross35 Aug 3, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tgross35 I don't need to do anything special for compiler-rt files that don't exist in previous LLVM versions, right? People not building against the vendored compiler-rt must use the precompiled compiler-rt functionality (optimized-compiler-builtins set to a path), correct?

It should just work here; these paths are relative to RUST_COMPILER_RT_ROOT which gets set by bootstrap

cargo.env("RUST_COMPILER_RT_ROOT", &compiler_builtins_root);
.

https://github.com/rust-lang/compiler-builtins/blob/842b28fe3bc09b643ddaf639f2648f33ecbc0634/ci/download-compiler-rt.sh will need to be updated to get CI in that repo to work, but I can do that later.

c-b changes LGTM

View changes since the review

@Kobzol

Kobzol commented Aug 3, 2026

Copy link
Copy Markdown
Member

#160421 might fix this. @ZuseZ4 Can you please add it to your test PR and run the Illumos job?

@ZuseZ4

ZuseZ4 commented Aug 3, 2026

Copy link
Copy Markdown
Member

@bors try jobs=dist-x86_64-illumos

@rust-bors

This comment has been minimized.

@ZuseZ4

ZuseZ4 commented Aug 3, 2026

Copy link
Copy Markdown
Member

runner is unexpectedly slow, restarting
@bors try jobs=dist-x86_64-illumos

@rust-bors

rust-bors Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

⌛ Trying commit 8937199 with merge 9523e21

(The previously running try build was automatically cancelled.)

To cancel the try build, run the command @bors try cancel.

Workflow: https://github.com/rust-lang/rust/actions/runs/30843935591

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

Labels

A-CI Area: Our Github Actions CI A-compiler-builtins Area: compiler-builtins (https://github.com/rust-lang/compiler-builtins) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc F-autodiff `#![feature(autodiff)]` perf-regression Performance regression. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.