You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use dynamic linking and download LLVM from CI for rustc across platforms #77084
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustA-linkageArea: linking into static, shared libraries and binariesC-feature-requestCategory: A feature request, i.e: not implemented / a PR.E-hardCall for participation: Hard difficulty. Experience needed to fix: A lot.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Longer-term I do think it's best to get back to a point where we're consistently doing the same thing for LLVM across all our platforms. It's been the case for quite some time that LLVM is built with ThinLTO on Linux but nowhere else. Differing in linkage is also unfortunate across the major platforms too.
I've given up on trying to make link-shared work well across the board -- see PR description and the last few CI failures -- it seems link LLVM is just not ready for a shared link on macOS or when cross-compiling, which excludes almost all of our builders.
Switching to static linking would preclude any of the improvements from #76349, so it would be better to use dynamic linking instead which would allow any contributor to get started without building LLVM from source or using system LLVM. That said, it sounds like dynamic linking will be very hard to do on other platforms.
Cc @cuviper@nikic@nagisa - do we know what the right way to bring the issues (bugs?) I found to LLVM developers? Are there active maintainers of LLVMs build system?
LLVM’s bugzilla is pretty much the only place for bug reports. If its something less defined than a precise bug report, talking it out on the mailing lists is the way to go.
I don't think it's impossible to download/ship the statically linked LLVM, it's something I want to explore. That said, we want to move to dynamically linking LLVM because we ideally want to be applying ThinLTO to LLVM everywhere, not just on x86_64-unknown-linux-gnu, and since LTO happens at link-time, we want that to happen once, not on the multiple LLVM links occurring during CI.
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustA-linkageArea: linking into static, shared libraries and binariesC-feature-requestCategory: A feature request, i.e: not implemented / a PR.E-hardCall for participation: Hard difficulty. Experience needed to fix: A lot.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Activity
Mark-Simulacrum commentedon Sep 23, 2020
Cc @cuviper @nikic @nagisa - do we know what the right way to bring the issues (bugs?) I found to LLVM developers? Are there active maintainers of LLVMs build system?
nagisa commentedon Sep 23, 2020
LLVM’s bugzilla is pretty much the only place for bug reports. If its something less defined than a precise bug report, talking it out on the mailing lists is the way to go.
est31 commentedon Sep 23, 2020
In which way is static linking making downloaded LLVM impossible?
Mark-Simulacrum commentedon Sep 23, 2020
I don't think it's impossible to download/ship the statically linked LLVM, it's something I want to explore. That said, we want to move to dynamically linking LLVM because we ideally want to be applying ThinLTO to LLVM everywhere, not just on x86_64-unknown-linux-gnu, and since LTO happens at link-time, we want that to happen once, not on the multiple LLVM links occurring during CI.
Rollup merge of rust-lang#80932 - jyn514:download-windows-llvm, r=Mar…
Rollup merge of rust-lang#80932 - jyn514:download-windows-llvm, r=Mar…
Rollup merge of rust-lang#80932 - jyn514:download-windows-llvm, r=Mar…