Skip to content
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 and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[msys2] can not compile Rust 1.85.1 with LLVM20 and GCC (all required changes are backported) #138722

Open
ognevny opened this issue Mar 19, 2025 · 4 comments
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-bug Category: This is a bug. C-external-bug Category: issue that is caused by bugs in software beyond our control needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. O-windows-gnu Toolchain: GNU, Operating system: Windows 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.

Comments

@ognevny
Copy link
Contributor

ognevny commented Mar 19, 2025

originally opened in zulip.

compile error

tl;dr when using LLVM20 to compile Rust 1.85.1 for *-pc-windows-gnu host I get a compile error with multiple definitions found in PassWrapper.cpp. all needed changes for LLVM20 are backported there

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 19, 2025
@jieyouxu jieyouxu added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) C-bug Category: This is a bug. WG-llvm Working group: LLVM backend code generation A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. O-windows-gnu Toolchain: GNU, Operating system: Windows and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Mar 19, 2025
@jieyouxu
Copy link
Member

jieyouxu commented Mar 19, 2025

(I don't know enough about this so asked for a bug report for visibility, in case this is something we need to fix)

@jieyouxu jieyouxu added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 19, 2025
@dianqk
Copy link
Member

dianqk commented Mar 19, 2025

Could you try dianqk@73d739f?

@ognevny
Copy link
Contributor Author

ognevny commented Mar 20, 2025

Could you try dianqk@73d739f?

it didn't help, the same thing :(

edit: I was told that using clang and clang++ may also fix build, so the actual issue is failure under GCC compilers

@mati865
Copy link
Contributor

mati865 commented Mar 20, 2025

Important note: MSYS2 builds LLVM (with shared libllvm enabled) using Clang because it handles symbol visibility for DLLs on Windows. Building shared libllvm with GCC hits the DLL symbol count limit.
Theoretically, DLLs should be fully compatible between MSVC, GCC, and Clang, so it might be a GCC bug.

It would probably work if static LLVM libs built with GCC were used, but IMO retaining the shared linkage is nicer.

@ognevny ognevny changed the title [msys2] can not compile Rust 1.85.1 with LLVM20 (all required changes are backported) [msys2] can not compile Rust 1.85.1 with LLVM20 and GCC (all required changes are backported) Mar 20, 2025
@dianqk dianqk added C-external-bug Category: issue that is caused by bugs in software beyond our control and removed WG-llvm Working group: LLVM backend code generation labels Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-bug Category: This is a bug. C-external-bug Category: issue that is caused by bugs in software beyond our control needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. O-windows-gnu Toolchain: GNU, Operating system: Windows 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.
Projects
None yet
Development

No branches or pull requests

5 participants