Support static linking with glibc and target-feature=+crt-static
With this change, it's possible to build on a linux-gnu target and pass
RUSTFLAGS='-C target-feature=+crt-static' or the equivalent via a
`.cargo/config.toml` file, and get a statically linked executable.
Update to libc 0.2.78, which adds support for static linking with glibc.
Add `crt_static_respected` to the `linux_base` target spec.
Update `android_base` and `linux_musl_base` accordingly. Avoid enabling
crt_static_respected on Android platforms, since that hasn't been
tested.
Closes https://github.com/rust-lang/rust/issues/65447.
Add a command to install a git hook to automatically run `x.py test tidy --bless`
Some folks (such as myself) would probably find a lot of convenience in a pre-commit hook that automatically runs tidy before committing, to avoid burning CI time learning that your commit wasn't tidy.
I'm absolutely positive I have missed some stuff. I basically just got this to where you can run `./x.py run install-git-hook` and then clicked the commit button. Please let me know what else you'd like me to add before this can be merged!
[rustc-dev-guide companion PR](https://github.com/rust-lang/rustc-dev-guide/pull/848)
Sometimes, a backend may need to emit warnings, errors, or otherwise
need to know the span of the current item in a basic block. So, add a
set_span method to give the backend that information.
Separate projection bounds and predicates
Follow up to #72788.
- Rename `projection_predicates` to `item_bounds`
- Separate bounds on associated types (the things after the `:` in `type X: ...`) and opaque types (the things after `impl`) from predicates.
- Projection candidates now have the correct nested obligations
- Trait object candidates now check that the associated types on the trait object satisfy their bounds as nested obligations
- Type alias impl trait types are now checked (#73035)
- `feature(generic_associated_types)` no longer changes how we handle bounds (#73816)
Opening for a perf and crater runs.
r? `@nikomatsakis`
Only check the own predicates of associated types when confirming
projection candidates.
Also consider implied bounds when comparing trait and impl methods.
Normalizing `<dyn Iterator<Item = ()> as Iterator>::Item` no longer
requires selecting `dyn Iterator<Item = ()>: Iterator`. This was
previously worked around by using a special type-folder to normalize
things.
Bounds of the form `type Future: Future<Result=Self::Result>` exist in
some ecosystem crates. To validate these bounds for trait objects we
need to normalize `Self::Result` in a way that doesn't cause a cycle.