Don't dynamically link LLVM tools unless rustc is too
This PR initially tried to support link-shared on all of our target platforms (other than Windows), but ran into a number of difficulties:
* LLVM doesn't really support a shared link on macOS (llvm-config runs into problems with the version suffix)
* LLVM doesn't seem to support a shared link when cross-compiling (the libLLVM.so ends up empty and symbols are not found)
So, this PR has now been revised such that we don't attempt to dynamically link LLVM tools (even if that would, otherwise, be supported) on targets where LLVM is statically linked to rustc. Currently that's basically everything except for x86_64-unknown-linux-gnu (where we dynamically link to avoid rerunning ThinLTO in each stage).
Follow-up to #76708.
Fixes#76698.
Continuation of #74526
Adds the #[track_caller] attribute to almost all panicking Cell
functions. The ones that borrow two Cells in their function
body are spared, because the panic location helps pinpoint
which of the two borrows failed. You'd need to have
full debuginfo and backtraces enabled together with column
info in order to be able to discern the cases.
Column info is only available on non-Windows platforms.
Function to convert OpenOptions to c_int
Fixes: #74943
The creation_mode and access_mode function were already available in the OpenOptions struct, but currently private. I've added a new free functions to unix/fs.rs which takes the OpenOptions, and returns the c_int to be used as parameter for the `open` call.
Add a changelog for x.py and nag contributors until they read it
Add a changelog for x.py
- Add a changelog and instructions for updating it
- Use `changelog-seen` in `config.toml` and `VERSION` in bootstrap to determine whether the changelog has been read. There's no way to tie reading the changelog to updating the version, so unfortunately they still have to update `config.toml` manually. Actually reading the changelog is optional, anyone can set `changelog-seen = N` without reading (although it's not recommended).
- Nag people if they haven't read the x.py changelog
+ Print message twice to make sure it's seen
- Give different error messages depending on whether the version needs to be updated or added
Closes https://github.com/rust-lang/rust/issues/76617
r? `@Mark-Simulacrum`
Fix cross compiling dist/build invocations
I am uncertain why the first commit is not affecting CI. I suspect it's because we pass --disable-docs on most of our cross-compilation builders. The second commit doesn't affect CI because CI runs x.py dist, not x.py build.
Both commits are standalone; together they should resolve#76733. The first commit doesn't really fix that issue but rather just fixes cross-compiled x.py dist, resolving a bug introduced in #76549.
Rollup of 13 pull requests
Successful merges:
- #72734 (Reduce duplicate in liballoc reserve error handling)
- #76131 (Don't use `zip` to compare iterators during pretty-print hack)
- #76150 (Don't recommend ManuallyDrop to customize drop order)
- #76275 (Implementation of Write for some immutable ref structs)
- #76489 (Add explanation for E0756)
- #76581 (do not ICE on bound variables, return `TooGeneric` instead)
- #76655 (Make some methods of `Pin` unstable const)
- #76783 (Only get ImplKind::Impl once)
- #76807 (Use const-checking to forbid use of unstable features in const-stable functions)
- #76888 (use if let instead of single match arm expressions)
- #76914 (extend `Ty` and `TyCtxt` lints to self types)
- #77022 (Reduce boilerplate for BytePos and CharPos)
- #77032 (lint missing docs for extern items)
Failed merges:
r? `@ghost`