about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2020-10-29Add support for rustc-env and unset-rustc-env for aux-buildsTomasz Miąsko-0/+5
2020-10-28Merge commit '645ef505da378b6f810b1567806d1bcc2856395f' into clippyupEduardo Broto-672/+2832
2020-10-28Update cargoEric Huss-0/+0
2020-10-28Auto merge of #78409 - pietroalbini:build-manifest-checksum-cache, ↵bors-50/+106
r=Mark-Simulacrum Add checksums cache to build-manifest During the release process we're currently calculating the SHA256 of each file three times: 1. In `build-manifest`, to fill the `hash = "f00"` keys of the manifests. 2. In `promote-release`, to generate the `.sha256` files. 3. In `promote-release`, to generate the `.asc` GPG signatures. Calculations 1. and 2. could be merged into a single one if there was a way for `build-manifest` to pass the checksums it generated over to `promote-release`. Unfortunately calculation 3. can't be merged as GPG requires extra metadata to be hashed. This PR adds support for merging 1. and 2. by creating the `BUILD_MANIFEST_CHECKSUM_CACHE` environment variable, which points to a JSON file storing a cache of all the calculated checksums. `build-manifest` will load it at startup and avoid generating existing checksums, and it will dump its internal checksums cache into it when it exits successfully. This PR also allows to run `build-manifest` multiple times without the need to wait for checksums to be calculated in the following invocations. The speedup will allow to work torwards a fix for https://github.com/rust-lang/promote-release/issues/15 without impacting the release process duration nor our storage costs. This PR can be reviewed commit-by-commit. r? `@Mark-Simulacrum`
2020-10-28build-manifest: include artifacts in a new tablePietro Albini-22/+125
This commit adds to the generated manifest all files we ship that are not rustup components, namely: * Source code tarballs (rustc-{channel}-src.tar.xz) * Windows installers (rust-{channel}-{target}.msi) * macOS installers (rust-{channel}-{target}.pkg) Those files are included in a new "artifacts" table of the manifest, to avoid interfering with existing rustup installations.
2020-10-27Auto merge of #75671 - nathanwhit:cstring-temp-lint, r=oli-obkbors-140/+3
Uplift `temporary-cstring-as-ptr` lint from `clippy` into rustc The general consensus seems to be that this lint covers a common enough mistake to warrant inclusion in rustc. The diagnostic message might need some tweaking, as I'm not sure the use of second-person perspective matches the rest of rustc, but I'd like to hear others' thoughts on that. (cc #53224). r? `@oli-obk`
2020-10-26Remove lint from clippyNathan Whitaker-140/+3
2020-10-26build-manifest: add BUILD_MANIFEST_CHECKSUM_CACHEPietro Albini-5/+29
The checksum cache allows to reuse the calculated checksums between build-manifest and promote-release, or between multiple invocations of build-manifest.
2020-10-26build-manifest: refactor checksum generation into a structPietro Albini-50/+82
2020-10-26Auto merge of #77975 - bjorn3:cg_clif_subtree3, r=Mark-Simulacrumbors-0/+1
Add cg_clif as optional codegen backend Rustc_codegen_cranelift is an alternative codegen backend for rustc based on Cranelift. It has the potential to improve compilation times in debug mode. In my experience the compile time improvements over debug mode LLVM for a clean build are about 20-30% in most cases. This PR adds cg_clif as optional codegen backend. By default it is only enabled for `./x.py check`. It can be enabled for `./x.py build` too by adding `cranelift` to the `rust.codegen-backends` array in `config.toml`. MCP: https://github.com/rust-lang/compiler-team/issues/270 r? `@Mark-Simulacrum`
2020-10-26Auto merge of #78395 - RalfJung:miri, r=RalfJungbors-11/+7
update Miri Fixes https://github.com/rust-lang/rust/issues/78339 Cc `@rust-lang/miri` r? `@ghost`
2020-10-26Auto merge of #78196 - pietroalbini:shipped-files, r=Mark-Simulacrumbors-12/+41
Allow creating a list of files shipped in a release This PR adds the `BUILD_MANIFEST_SHIPPED_FILES_PATH` environment variable to `build-manifest`, which writes a list of all the files referenced in the manifest to the path defined in the variable. The use for this is for `promote-release` to prune files unused files before publishing a release. This PR **does not implement any pruning**, it just adds support for it to be implemented in the future on `promote-release`'s side. r? `@Mark-Simulacrum`
2020-10-26update MiriRalf Jung-11/+7
2020-10-26build-manifest: allow creating a list of files shipped in a releasePietro Albini-12/+41
2020-10-26Add support for using cg_clif to bootstrap rustcbjorn3-0/+1
2020-10-26Rollup merge of #78137 - tmiasko:compiletest-tracing, r=Mark-SimulacrumDylan DPC-2/+2
Initialize tracing subscriber in compiletest tool The logging in compiletest was migrated from log crate to a tracing, but the initialization code was never changed, so logging is non-functional. Initialize tracing subscriber using default settings.
2020-10-25Rollup merge of #78326 - Aaron1011:fix/min-stmt-lints, r=petrochenkovYuki Okushi-2/+2
Split out statement attributes changes from #78306 This is the same as PR https://github.com/rust-lang/rust/pull/78306, but `unused_doc_comments` is modified to explicitly ignore statement items (which preserves the current behavior). This shouldn't have any user-visible effects, so it can be landed without lang team discussion. --------- When the 'early' and 'late' visitors visit an attribute target, they activate any lint attributes (e.g. `#[allow]`) that apply to it. This can affect warnings emitted on sibiling attributes. For example, the following code does not produce an `unused_attributes` for `#[inline]`, since the sibiling `#[allow(unused_attributes)]` suppressed the warning. ```rust trait Foo { #[allow(unused_attributes)] #[inline] fn first(); #[inline] #[allow(unused_attributes)] fn second(); } ``` However, we do not do this for statements - instead, the lint attributes only become active when we visit the struct nested inside `StmtKind` (e.g. `Item`). Currently, this is difficult to observe due to another issue - the `HasAttrs` impl for `StmtKind` ignores attributes for `StmtKind::Item`. As a result, the `unused_doc_comments` lint will never see attributes on item statements. This commit makes two interrelated fixes to the handling of inert (non-proc-macro) attributes on statements: * The `HasAttr` impl for `StmtKind` now returns attributes for `StmtKind::Item`, treating it just like every other `StmtKind` variant. The only place relying on the old behavior was macro which has been updated to explicitly ignore attributes on item statements. This allows the `unused_doc_comments` lint to fire for item statements. * The `early` and `late` lint visitors now activate lint attributes when invoking the callback for `Stmt`. This ensures that a lint attribute (e.g. `#[allow(unused_doc_comments)]`) can be applied to sibiling attributes on an item statement. For now, the `unused_doc_comments` lint is explicitly disabled on item statements, which preserves the current behavior. The exact locatiosn where this lint should fire are being discussed in PR #78306
2020-10-24Add unbounded_depth to serde_json (clippy-driver)Eduardo Broto-1/+1
2020-10-24Fix inconsistencies in handling of inert attributes on statementsAaron Hill-2/+2
When the 'early' and 'late' visitors visit an attribute target, they activate any lint attributes (e.g. `#[allow]`) that apply to it. This can affect warnings emitted on sibiling attributes. For example, the following code does not produce an `unused_attributes` for `#[inline]`, since the sibiling `#[allow(unused_attributes)]` suppressed the warning. ```rust trait Foo { #[allow(unused_attributes)] #[inline] fn first(); #[inline] #[allow(unused_attributes)] fn second(); } ``` However, we do not do this for statements - instead, the lint attributes only become active when we visit the struct nested inside `StmtKind` (e.g. `Item`). Currently, this is difficult to observe due to another issue - the `HasAttrs` impl for `StmtKind` ignores attributes for `StmtKind::Item`. As a result, the `unused_doc_comments` lint will never see attributes on item statements. This commit makes two interrelated fixes to the handling of inert (non-proc-macro) attributes on statements: * The `HasAttr` impl for `StmtKind` now returns attributes for `StmtKind::Item`, treating it just like every other `StmtKind` variant. The only place relying on the old behavior was macro which has been updated to explicitly ignore attributes on item statements. This allows the `unused_doc_comments` lint to fire for item statements. * The `early` and `late` lint visitors now activate lint attributes when invoking the callback for `Stmt`. This ensures that a lint attribute (e.g. `#[allow(unused_doc_comments)]`) can be applied to sibiling attributes on an item statement. For now, the `unused_doc_comments` lint is explicitly disabled on item statements, which preserves the current behavior. The exact locatiosn where this lint should fire are being discussed in PR #78306
2020-10-23Remove duplicate import of `Target`Eduardo Broto-1/+0
2020-10-23Merge commit 'bf1c6f9871f430e284b17aa44059e0d0395e28a6' into clippyupEduardo Broto-566/+2120
2020-10-23Rollup merge of #78169 - ehuss:update-cargo, r=ehussYuki Okushi-0/+0
Update cargo 3 commits in 79b397d72c557eb6444a2ba0dc00a211a226a35a..dd83ae55c871d94f060524656abab62ec40b4c40 2020-10-15 14:41:21 +0000 to 2020-10-20 19:31:26 +0000 - Support glob patterns for package/target selection (rust-lang/cargo#8752) - Update env_logger requirement from 0.7.0 to 0.8.1 (rust-lang/cargo#8795) - Fix man page links inside `option` blocks. (rust-lang/cargo#8793)
2020-10-23Rollup merge of #77488 - varkor:repr128-incomplete_features, r=jonas-schievinkYuki Okushi-0/+3
Mark `repr128` as `incomplete_features` As mentioned in https://github.com/rust-lang/rust/issues/56071 and noticed in https://github.com/rust-lang/rust/issues/77457, `repr(u128)` and `repr(i128)` do not work properly due to lack of LLVM support. We should thus warn users trying to use the feature that they may encounter ICEs when using it. Closes https://github.com/rust-lang/rust/issues/77457.
2020-10-22Fix clippy testsvarkor-0/+3
2020-10-21Update rustc-demanglevarkor-1/+1
2020-10-20Update cargoEric Huss-0/+0
2020-10-20Initialize tracing subscriber in compiletest toolTomasz Miąsko-2/+2
The logging in compiletest was migrated from log crate to a tracing, but the initialization code was never changed, so logging is non-functional. Initialize tracing subscriber using default settings.
2020-10-18Rollup merge of #78059 - JohnTitor:fix-linkcheck, r=ehussYuki Okushi-0/+3
Set `MDBOOK_OUTPUT__HTML__INPUT_404` on linkchecker This is found in https://github.com/rust-lang/nomicon/pull/240. It seems the spurious failure shows up without this flag.
2020-10-18Rollup merge of #77851 - exrook:split-btreemap, r=dtolnayYuki Okushi-1/+1
BTreeMap: refactor Entry out of map.rs into its own file btree/map.rs is approaching the 3000 line mark, splitting out the entry code buys about 500 lines of headroom. I've created this PR because the changes I've made in #77438 will push `map.rs` over the 3000 line limit and cause tidy to complain. I picked `Entry` to factor out because it feels less tightly coupled to the rest of `BTreeMap` than the various iterator implementations. Related: #60302
2020-10-18Rollup merge of #76607 - Mark-Simulacrum:tidy-bins, r=pnkfelixYuki Okushi-12/+50
Modify executable checking to be more universal This uses a dummy file to check if the filesystem being used supports the executable bit in general. Supersedes #74753.
2020-10-17Appease the almightly lord clippy, hallowed be thy nameJacob Hughes-1/+1
2020-10-18Set `MDBOOK_OUTPUT__HTML__INPUT_404` on linkcheckerYuki Okushi-0/+3
2020-10-17Auto merge of #77124 - spastorino:const-exprs-rfc-2920, r=oli-obkbors-1/+17
Implement const expressions and patterns (RFC 2920) cc `@ecstatic-morse` `@lcnr` `@oli-obk` `@petrochenkov`
2020-10-17Rollup merge of #77971 - jyn514:broken-intra-doc-links, r=mark-simulacrumYuki Okushi-0/+66
Deny broken intra-doc links in linkchecker Since rustdoc isn't warning about these links, check for them manually. This also fixes the broken links that popped up from the lint.
2020-10-16Handle ExprKind::ConstBlock on clippySantiago Pastorino-1/+17
2020-10-16update miriRalf Jung-8/+10
2020-10-15Update submodules for link fixesJoshua Nelson-0/+0
- [rust-embedded](https://github.com/rust-embedded/book/compare/79ab7776929c66db83203397958fa7037d5d9a30...ca8169e69b479f615855d0eece7e318138fcfc00) - [cargo](https://github.com/rust-lang/cargo/compare/12db56cdedbc2c26a9aa18f994c0188cdcc67df5...79b397d72c557eb6444a2ba0dc00a211a226a35a)
2020-10-15Deny broken intra-doc links in linkcheckerJoshua Nelson-0/+66
Since rustdoc isn't warning about these links, check for them manually.
2020-10-16Rollup merge of #77493 - ↵Dylan DPC-3/+5
hosseind88:ICEs_should_always_print_the_top_of_the_query_stack, r=oli-obk ICEs should always print the top of the query stack see #76920
2020-10-15Auto merge of #77943 - est31:target_refactor, r=petrochenkovbors-3/+3
No more target.target Two main changes of this PR: * Turn `target_pointer_width` into an integer and rename to `pointer_width`. The compiler only allowed three valid values for the width anyways. An integer is more natural for this value, and saves a few allocations and copies. * Remove the `rustc_session::config::Config` wrapper and replace it with its inner member `Target`. Aka. no more `target.target`. This makes life so much easier, but it also causes a ton of downstream breakage. Some changes of this PR were done using tooling. These tooling-made changes were isolated to their own commits to make review easier. It's best to review the PR commit-by-commit. Miri PR: https://github.com/rust-lang/miri/pull/1583 I request p=10 bors priority because of the breakage.
2020-10-15Remove rustc_session::config::Configest31-3/+3
The wrapper type led to tons of target.target across the compiler. Its ptr_width field isn't required any more, as target_pointer_width is already present in parsed form.
2020-10-15Auto merge of #77952 - ehuss:update-cargo, r=ehussbors-0/+0
Update cargo 11 commits in 9d1a4863abd9237dbf9d1b74c78632b6a205f6bb..12db56cdedbc2c26a9aa18f994c0188cdcc67df5 2020-10-05 18:29:52 +0000 to 2020-10-14 23:07:45 +0000 - Reinstate CARGO_PRIMARY_PACKAGE (take 2) (rust-lang/cargo#8758) - Add actionable help message for --features (rust-lang/cargo#8773) - Fix panic in `cargo doc` with -Zfeatures=itarget (rust-lang/cargo#8777) - Update git2. (rust-lang/cargo#8778) - Document RUSTFMT environment variable (rust-lang/cargo#8767) - Update crossbeam-utils requirement from 0.7 to 0.8 (rust-lang/cargo#8769) - Update toml dependency (rust-lang/cargo#8772) - Mark proc-macro crates (rust-lang/cargo#8765) - cargo-tree: mention special target `all` in CLI help text (rust-lang/cargo#8766) - Bump to 0.50.0, update changelog (rust-lang/cargo#8764) - Update deprecated GitHub add-path in workflows. (rust-lang/cargo#8760)
2020-10-14Update cargoEric Huss-0/+0
2020-10-14Add support for SHA256 source file hashing for LLVM 11+.Arlo Siemsen-0/+2
2020-10-14fix stderr file of clippy/custom_ice_message testhosseind88-1/+1
2020-10-13Include aarch64-pc-windows-msvc in the dist manifestsArlo Siemsen-0/+1
2020-10-14Rollup merge of #77895 - shepmaster:silicon-manifest, r=pietroalbiniYuki Okushi-0/+2
Include aarch64-apple-darwin in the dist manifests r? @ehuss /cc @pietroalbini @Mark-Simulacrum
2020-10-13Auto merge of #77762 - pietroalbini:dist-build-manifest, r=Mark-Simulacrumbors-32/+25
Dist build manifest This PR makes two changes that should remove a significant chunk of the time spent in our release process: cloning the `rust-lang/rust` monorepo, all its submodules, and building `bootstrap` to then invoke `build-manifest`: * `build-manifest` doesn't rely on a clone of the monorepo being present anymore. The only remaining bit of information it fetched from it (the Rust version) is instead bundled in the binary. * A new "component" is added, `build-manifest`. That component includes a prebuilt version of the tool, and it's *not* included in the Rustup manifest. This will allow `promote-release` to directly invoke the tool without interacting with our build system. * The Linux x86_64 CI is changed to also build the component mentioned above. It's the only CI builder tasked to do so, and to cleanly support this a new `--include-default-paths` flag was added to `./x.py`. * The `BUILD_MANIFEST_NUM_THREADS` environment variable is added to configure the number of threads at runtime. This PR is best reviewed commit-by-commit. r? `@Mark-Simulacrum`
2020-10-13Include aarch64-apple-darwin in the dist manifestsJake Goulding-0/+2
2020-10-13Auto merge of #77796 - jonas-schievink:switchint-refactor, r=oli-obkbors-1/+0
Refactor how SwitchInt stores jump targets Closes https://github.com/rust-lang/rust/issues/65693