Commit graph

1332 commits

Author SHA1 Message Date
Matthias Krüger a9fe2b95da
Rollup merge of #92807 - ehuss:update-cargo, r=ehuss
Update cargo

6 commits in 358e79fe56fe374649275ca7aebaafd57ade0e8d..06b9d31743210b788b130c8a484c2838afa6fc27
2022-01-04 18:39:45 +0000 to 2022-01-11 23:47:29 +0000
- Port cargo to clap3 (rust-lang/cargo#10265)
- feat: support rustflags per profile (rust-lang/cargo#10217)
- Make bors ignore the PR template so it doesn't end up in merge messages (rust-lang/cargo#10267)
- Be resilient to most IO error and filesystem loop while walking dirs (rust-lang/cargo#10214)
- Remove the option to disable pipelining (rust-lang/cargo#10258)
- Always ask rustc for messages about artifacts, and always process them (rust-lang/cargo#10255)
2022-01-13 08:11:22 +01:00
Matthias Krüger c7ada001ec
Rollup merge of #90001 - Fearyncess:master, r=alexcrichton
Make rlib metadata strip works with MIPSr6 architecture

Because MIPSr6 has many differences with previous MIPSr2 arch, the previous rlib metadata stripping code in `rustc_codegen_ssa` is only for MIPSr2/r3/r5 (which share the same elf e_flags).

This commit fixed this problem. It makes `rustc_codegen_ssa` happy when compiling rustc for MIPSr6 target or hosts.

e_flags REF: e356027016/llvm/include/llvm/BinaryFormat/ELF.h (L562)
2022-01-13 08:11:16 +01:00
Eric Huss 66f1e322c6 Update cargo 2022-01-11 20:18:29 -08:00
Dirkjan Ochtman 93a16cb7e2 Migrate rustdoc from Tera to Askama
See #84419.
2022-01-10 18:40:54 +01:00
Lain Yang 9a337b6fe0 update Cargo.lock and gimli-rs/object for rustc_codegen_ssa 2022-01-07 13:33:20 +08:00
David Wood 2dc1a8a779 cg: use thorin instead of llvm-dwp
`thorin` is a Rust implementation of a DWARF packaging utility that
supports reading DWARF objects from archive files (i.e. rlibs) and
therefore is better suited for integration into rustc.

Signed-off-by: David Wood <david.wood@huawei.com>
2022-01-06 09:32:42 +00:00
Matthias Krüger a0673468ae
Rollup merge of #92579 - RalfJung:miri, r=RalfJung
update Miri

Fixes https://github.com/rust-lang/rust/issues/92527
2022-01-05 11:26:09 +01:00
Matthias Krüger d83dd85253
Rollup merge of #92545 - dtolnay:rustlog, r=petrochenkov
Extract init_env_logger to crate

I've been doing some work on rustc_ast_pretty using an out-of-tree main.rs and Cargo.toml with the following:

```toml
[dependencies]
rustc_ast = { path = "../rust/compiler/rustc_ast" }
rustc_ast_pretty = { path = "../rust/compiler/rustc_ast_pretty" }
rustc_span = { path = "../rust/compiler/rustc_span" }
```

Rustc_ast_pretty helpfully uses `tracing::debug!` but I found that in order to enable the debug output, my test crate must depend on rustc_driver which is an enormously bigger dependency than what I have been using so far, and slows down iteration time because an enormous dependency tree between rustc_ast and rustc_driver must now be rebuilt after every ast change.

I pulled out the tracing initialization to a new minimal rustc_log crate so that projects depending on the other rustc crates, like rustc_ast_pretty, can access the `debug!` messages in them without building all the rest of rustc.
2022-01-05 11:26:08 +01:00
Ralf Jung e568423815 update Miri 2022-01-05 10:41:22 +01:00
David Tolnay ffbeebbf7a
Make rustc_log doc test runnable 2022-01-03 22:31:56 -08:00
David Tolnay 6152d15e7c
Extract init_env_logger to crate 2022-01-03 16:45:21 -08:00
Krasimir Georgiev a9698e22ec revert #92254 "Bump gsgdt to 0.1.3"
gsgdt 0.1.3 was yanked:
https://github.com/rust-lang/rust/pull/92254#issuecomment-1004269481
2022-01-03 20:25:46 +01:00
bjorn3 ad6f98cd28 Remove the merge dependency 2022-01-01 17:03:24 +01:00
bjorn3 043745cb96 Avoid the merge derive macro in rustbuild
The task of the macro is simple enough that a decl macro is almost ten
times shorter than the original proc macro. The proc macro is 159 lines
while the decl macro is just 18 lines.

This reduces the amount of dependencies of rustbuild from 45 to 37. It
also slight reduces compilation time from 47s to 44s for debug builds.
2022-01-01 16:56:03 +01:00
bjorn3 2fe2728fa9 Remove the lazy_static dependency from rustbuild
Rustbuild already depends on once_cell which in the future can be
replaced with std::lazy::Lazy.
2022-01-01 16:53:47 +01:00
bors ad0d4190fa Auto merge of #92374 - ehuss:update-libssh2-sys, r=Mark-Simulacrum
Update libssh2-sys

Updates libssh2-sys from 0.2.19 to 0.2.23.  This brings in libssh2 1.10 ([RELEASE-NOTES](https://github.com/libssh2/libssh2/blob/libssh2-1.10.0/RELEASE-NOTES)).  One of the major changes is to add support for OpenSSH agent on Windows.

Closes https://github.com/rust-lang/cargo/issues/10237
2022-01-01 05:21:22 +00:00
bors cfa3fe5af3 Auto merge of #90637 - Mark-Simulacrum:liveness-btree, r=lqd
Store liveness in interval sets for region inference

On the 100,000 line test case from https://github.com/rust-lang/rust/issues/90445, this reduces memory usage from 35 GB to 444 MB at peak (based on DHAT results, though with regular malloc), and yields a 9.4x speedup, with wall time going from 14.5 seconds to 1.5s. Performance results show that for the majority of real-world code this has little to no impact, but it's expected to generally scale better for auto-generated functions and other cases which stress this area of the compiler, as results on #90445 illustrate.

There may also be further room for improvement in future PRs making use of this data structures benefits over raw bitsets (which, at some level, are a less perfect fit for representing liveness, which is almost always composed of contiguous ranges, not point locations).

Fixes #90445.
2021-12-31 19:54:10 +00:00
bors 8ed935e92d Auto merge of #92252 - GuillaumeGomez:update-pulldown, r=camelid,xFrednet
Update pulldown-cmark version to 0.9

Fixes https://github.com/rust-lang/rust/issues/92206.

r? `@camelid`
2021-12-31 12:46:38 +00:00
Mark Rousskov 00c55a1bb8 Introduce IntervalSet
This is a compact, fast storage for variable-sized sets, typically consisting of
larger ranges. It is less efficient than a bitset if ranges are both small and
the domain size is small, but will still perform acceptably. With enormous
domain sizes and large ranges, the interval set performs much better, as it can
be much more densely packed in memory than the uncompressed bit set alternative.
2021-12-30 22:33:44 -05:00
Eric Huss 000d336216 Update libssh2-sys 2021-12-28 13:24:03 -08:00
Guillaume Gomez 4e2024c55d Update pulldown-cmark version in clippy 2021-12-28 16:19:23 +01:00
Guillaume Gomez b5898a1137 Update pulldown-cmark version to 0.9 2021-12-28 16:17:22 +01:00
Krasimir Georgiev 9127f497be Bump gsgdt to 0.1.3
No functional changes intended.

The 0.1.2 -> 0.1.3 commit 3e1dcec539
renames `Node::new` to `Node::from_list`.
2021-12-24 13:46:37 +01:00
bors c1d301bb29 Auto merge of #92167 - pierwill:chalk-update, r=jackh726
Update chalk to 0.75.0

- Compute flags in `intern_ty`
- Remove `tracing-serde` from `PERMITTED_DEPENDENCIES`
- Bump `tracing-tree` to 0.2.0
- Bump `tracing-subscriber` to 0.3.3
2021-12-23 08:59:55 +00:00
pierwill 155a4a87af Upgrade tracing-subscriber 2021-12-22 10:47:36 -06:00
pierwill ea25b779eb Update chalk to 0.75.0
- Compute flags in `intern_ty`
- Remove tracing-serde from PERMITTED_DEPENDENCIES
- Disable `tracing-full` feature in `chalk-solve`
- Bump tracing-tree to 0.2.0
2021-12-22 10:07:44 -06:00
Matthias Krüger 7407c4e37d
Rollup merge of #91172 - Ethiraric:ethiraric/fix90979, r=petrochenkov
Warn when a `#[test]`-like built-in attribute macro is present multiple times.

Fixes #90979.
2021-12-16 17:23:07 +01:00
Ayrton c12f7efd01 Bump compiler-builtins to 0.1.66
Adds intrinsics for truncdfsf2 and truncdfsf2vsp on ARM.
2021-12-15 21:00:06 -05:00
Ethiraric 2be94d4301 Add a lint for duplicated attributes. 2021-12-15 23:43:13 +01:00
Matthias Krüger 22fc403757
Rollup merge of #91940 - ehuss:update-cargo, r=ehuss
Update cargo

14 commits in 40dc281755137ee804bc9b3b08e782773b726e44..a359ce16073401f28b84840da85b268aa3d37c88
2021-12-06 21:54:44 +0000 to 2021-12-14 18:40:22 +0000
- Support `term.quiet` configuration (rust-lang/cargo#10152)
- Display alias target on 'cargo help &lt;alias&gt;` (rust-lang/cargo#10193)
- delete --host command and message (rust-lang/cargo#10145)
- Improve I/O error message for fingerprint of build script (rust-lang/cargo#10191)
- Explicitly mark aliases in `cargo list`. (rust-lang/cargo#10177)
- Don't emit "executable" JSON field for non-executables. (rust-lang/cargo#10171)
- Move scrape-examples docs to correct section. (rust-lang/cargo#10166)
- Do not suggest source config if nothing to vendor (rust-lang/cargo#10161)
- Bump versions of local deps. (rust-lang/cargo#10155)
- Bump to 0.60.0, update changelog (rust-lang/cargo#10154)
- Fix some profile documentation. (rust-lang/cargo#10153)
- Document lib before bin. (rust-lang/cargo#10172)
- Sync cargo-the-cli version with rustc. (rust-lang/cargo#10178)
- Remove `-Z future-incompat-report` from message displayed to user (rust-lang/cargo#10185)
2021-12-15 01:28:10 +01:00
Eric Huss d9dd360f59 Update cargo 2021-12-14 15:24:41 -08:00
bors 2f4da6243f Auto merge of #91728 - Amanieu:stable_asm, r=joshtriplett
Stabilize asm! and global_asm!

Tracking issue: #72016

It's been almost 2 years since the original [RFC](https://github.com/rust-lang/rfcs/pull/2850) was posted and we're finally ready to stabilize this feature!

The main changes in this PR are:
- Removing `asm!` and `global_asm!` from the prelude as per the decision in #87228.
- Stabilizing the `asm` and `global_asm` features.
- Removing the unstable book pages for `asm` and `global_asm`. The contents are moved to the [reference](https://github.com/rust-lang/reference/pull/1105) and [rust by example](https://github.com/rust-lang/rust-by-example/pull/1483).
  - All links to these pages have been removed to satisfy the link checker. In a later PR these will be replaced with links to the reference or rust by example.
- Removing the automatic suggestion for using `llvm_asm!` instead of `asm!` if you're still using the old syntax, since it doesn't work anymore with `asm!` no longer being in the prelude. This only affects code that predates the old LLVM-style `asm!` being renamed to `llvm_asm!`.
- Updating `stdarch` and `compiler-builtins`.
- Updating all the tests.

r? `@joshtriplett`
2021-12-14 21:15:22 +00:00
bors 6bda5b331c Auto merge of #90716 - euclio:libloading, r=cjgillot
replace dynamic library module with libloading

This PR deletes the `rustc_metadata::dynamic_lib` module in favor of the popular and better tested [`libloading` crate](https://github.com/nagisa/rust_libloading/).

We don't benefit from `libloading`'s symbol lifetimes since we end up leaking the loaded library in all cases, but the call-sites look much nicer by improving error handling and abstracting away some transmutes. We also can remove `rustc_metadata`'s direct dependencies on `libc` and `winapi`.

This PR also adds an exception for `libloading` (and its license) to tidy, so this will need sign-off from the compiler team.
2021-12-12 17:28:52 +00:00
Amanieu d'Antras 44a3a66ee8 Stabilize asm! and global_asm!
They are also removed from the prelude as per the decision in
https://github.com/rust-lang/rust/issues/87228.

stdarch and compiler-builtins are updated to work with the new, stable
asm! and global_asm! macros.
2021-12-12 11:20:03 +00:00
bors e6b883c74f Auto merge of #91665 - matthiaskrgr:rollup-o3wnkam, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #90709 (Only shown relevant type params in E0283 label)
 - #91551 (Allow for failure of subst_normalize_erasing_regions in const_eval)
 - #91570 (Evaluate inline const pat early and report error if too generic)
 - #91571 (Remove unneeded access to pretty printer's `s` field in favor of deref)
 - #91610 (Link to rustdoc_json_types docs instead of rustdoc-json RFC)
 - #91619 (Update cargo)
 - #91630 (Add missing whitespace before disabled HTML attribute)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-12-08 18:45:03 +00:00
Matthias Krüger 75e2f794dc
Rollup merge of #91619 - ehuss:update-cargo, r=ehuss
Update cargo

8 commits in 294967c53f0c70d598fc54ca189313c86c576ea7..40dc281755137ee804bc9b3b08e782773b726e44
2021-11-29 19:04:22 +0000 to 2021-12-06 21:54:44 +0000
- Unify the description of quiet flag (rust-lang/cargo#10168)
- Stabilize future-incompat-report (rust-lang/cargo#10165)
- Support abbreviating `--release` as `-r` (rust-lang/cargo#10133)
- doc: nudge towards simple version requirements (rust-lang/cargo#10158)
- Upgrade clap to 2.34.0 (rust-lang/cargo#10164)
- Treat EOPNOTSUPP the same as ENOTSUP when ignoring failed flock calls. (rust-lang/cargo#10157)
- Add note about RUSTFLAGS removal from build scripts. (rust-lang/cargo#10141)
- Make clippy happy (rust-lang/cargo#10139)
2021-12-08 16:08:11 +01:00
bors f9e77f2b46 Auto merge of #91604 - nikic:section-flags, r=nagisa
Use object crate for .rustc metadata generation

We already use the object crate for generating uncompressed .rmeta
metadata object files. This switches the generation of compressed
.rustc object files to use the object crate as well. These have
slightly different requirements in that .rmeta should be completely
excluded from any final compilation artifacts, while .rustc should
be part of shared objects, but not loaded into memory.

The primary motivation for this change is #90326: In LLVM 14, the
current way of setting section flags (and in particular, preventing
the setting of SHF_ALLOC) will no longer work. There are other ways
we could work around this, but switching to the object crate seems
like the most elegant, as we already use it for .rmeta, and as it
makes this independent of the codegen backend. In particular, we
don't need separate handling in codegen_llvm and codegen_gcc.
codegen_cranelift should be able to reuse the implementation as
well, though I have omitted that here, as it is not based on
codegen_ssa.

This change mostly extracts the existing code for .rmeta handling
to allow using it for .rustc as well, and adjusts the codegen
infrastructure to handle the metadata object file separately: We
no longer create a backend-specific module for it, and directly
produce the compiled module instead.

This does not `fix` #90326 by itself yet, as .llvmbc will need to be
handled separately.

r? `@nagisa`
2021-12-08 14:58:48 +00:00
bors abba5edf48 Auto merge of #91500 - ehuss:update-mdbook, r=Mark-Simulacrum
Update mdbook

This just includes a few minor fixes:
* https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0413
* https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0414
2021-12-08 04:46:39 +00:00
Nikita Popov 9488cacc52 Use object crate for .rustc metadata generation
We already use the object crate for generating uncompressed .rmeta
metadata object files. This switches the generation of compressed
.rustc object files to use the object crate as well. These have
slightly different requirements in that .rmeta should be completely
excluded from any final compilation artifacts, while .rustc should
be part of shared objects, but not loaded into memory.

The primary motivation for this change is #90326: In LLVM 14, the
current way of setting section flags (and in particular, preventing
the setting of SHF_ALLOC) will no longer work. There are other ways
we could work around this, but switching to the object crate seems
like the most elegant, as we already use it for .rmeta, and as it
makes this independent of the codegen backend. In particular, we
don't need separate handling in codegen_llvm and codegen_gcc.
codegen_cranelift should be able to reuse the implementation as
well, though I have omitted that here, as it is not based on
codegen_ssa.

This change mostly extracts the existing code for .rmeta handling
to allow using it for .rustc as well, and adjust the codegen
infrastructure to handle the metadata object file separately: We
no longer create a backend-specific module for it, and directly
produce the compiled module instead.

This does not fix #90326 by itself yet, as .llvmbc will need to be
handled separately.
2021-12-07 09:39:05 +01:00
Eric Huss 4aceaedb5e Update cargo 2021-12-06 20:33:00 -08:00
Andy Russell 923f939791
replace dynamic library module with libloading 2021-12-06 12:03:47 -05:00
flip1995 e36e5a519b
Update Cargo.lock 2021-12-06 12:33:55 +01:00
Eric Huss a882fdd334 Update mdbook 2021-12-03 12:25:07 -08:00
William D. Jones e500eb6950 Bump compiler_builtins to 0.1.55 to bring in fixes for targets lacking atomic support. 2021-11-28 23:01:03 -05:00
Jubilee Young 9a04ae4997 Update libc to 0.2.108
Changelog:
https://github.com/rust-lang/libc/releases/tag/0.2.107
https://github.com/rust-lang/libc/releases/tag/0.2.108
Primarily intended to pull in fd331f65f214ea75b6210b415b5fd8650be15c73
This should help with https://github.com/rust-lang/rust/pull/90044
2021-11-27 16:13:04 -08:00
Alessandro Decina 1cf37189bc Bump compiler-builtins to 0.1.53
Fixes a LLVM crash with the bpf targets
2021-11-26 10:33:32 +00:00
Esteban Kuber 5a68abb094 Tokenize emoji as if they were valid indentifiers
In the lexer, consider emojis to be valid identifiers and reject
them later to avoid knock down parse errors.
2021-11-23 20:35:07 +00:00
Eric Huss b086bd0412 Update cargo 2021-11-22 14:01:57 -08:00
Alex Crichton e4b3496618 Update stdarch/dlmalloc
Ensure that they compile with the now-a-feature-is-required logic.
2021-11-10 08:35:43 -08:00
Alex Crichton b5c3f4c5d8 Update dlmalloc for libstd
This pulls in a fix for wasm64 to work correctly with this dlmalloc
2021-11-10 08:35:43 -08:00