summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2020-11-16build-manifest: strip newline from rustc versionPietro Albini-4/+4
2020-11-15Replace run_compiler with RunCompiler builder pattern.Darshan Kathiriya-2/+2
RunCompiler::new takes non-optional params, and optional params can be set using set_*field_name* method. finally `run` will forward all fields to `run_compiler`.
2020-11-15Bump Rustfmt and RLSAlessandro Ghedini-5/+6
Should hopefully fix #78341 and #78340.
2020-10-20build-manifest: bundle the rustc version in the binaryPietro Albini-13/+7
2020-10-20build-manifest: use var_os instead of var to check if vars existPietro Albini-3/+3
This will prevent the tool mistakenly ignoring the variables if they happen to contain non-utf8 data.
2020-10-20build-manifest: allow configuring the number of threadsPietro Albini-7/+13
2020-10-20build-manifest: accept the Rust version instead of the monorepo pathPietro Albini-14/+7
This commit changes the way build-manifest is invoked, to let it accept the Rust version directly instead of requiring the path of the Rust monorepo and letting build-manifest figure out the path on its own. This allows to run build-manifest without a clone of the monorepo.
2020-10-20build-manifest: stop generating numbered channel names except for stablePietro Albini-4/+5
This fixes numbered channel names being created for the nightly channel, and once the root cause of this rides the trains, for beta.
2020-10-20bootstrap: always use the Rust version in package namesPietro Albini-59/+10
The format of the tarballs produced by CI is roughly the following: {component}-{release}-{target}.{ext} While on the beta and nightly channels `{release}` is just the channel name, on the stable channel is either the Rust version or the version of the component we're shipping: cargo-0.47.0-x86_64-unknown-linux-gnu.tar.xz clippy-0.0.212-x86_64-unknown-linux-gnu.tar.xz llvm-tools-1.46.0-x86_64-unknown-linux-gnu.tar.xz miri-0.1.0-x86_64-unknown-linux-gnu.tar.xz rls-1.41.0-x86_64-unknown-linux-gnu.tar.xz rust-1.46.0-x86_64-unknown-linux-gnu.tar.xz ... This makes it really hard to get the package URL without having access to the manifest (and there is no manifest on ci-artifacts.rlo), as there is no consistent version number to use. This commit addresses the problem by always using the Rust version number as `{release}` for the stable channel, regardless of the version number of the component we're shipping. I chose that instead of "stable" to avoid breaking the URL scheme *that* much. Rustup should not be affected by this change, as it fetches the URLs from the manifest. Unfortunately we don't have a way to test other clients before making a stable release, as this change only affects the stable channel.
2020-10-14Rollup merge of #77863 - JohnTitor:remove-mark-i-m, r=pietroalbiniYuki Okushi-1/+1
Remove `mark-i-m` from rustc-dev-guide maintainers They aren't a maintainer anymore and it causes failure on our CI now: https://github.com/rust-lang-ci/rust/runs/1243600577
2020-10-14[beta] Update cargoEric Huss-0/+0
2020-10-08Update RLS and RustfmtIgor Matuszewski-5/+5
2020-10-08build-manifest: use BufReaderPietro Albini-2/+2
2020-10-08build-manifest: avoid collecting SHAs in parallel on legacy modePietro Albini-0/+8
This avoids overloading the old server, and disrupting the other programs running on it.
2020-10-08build-manifest: calculate checksums lazily and in parallelPietro Albini-21/+100
This commit improves the way build-manifest calculates the checksums included in the manifest, speeding it up: * Instead of calculating all the hashes beforehand and then using the ones we need, the manifest is first generated with placeholder hashes, and then a function walks through the manifest and calculates only the needed checksums. * Calculating the checksums is now done in parallel with rayon, to better utilize all the available disk bandwidth. * Calculating the checksums now uses the sha2 crate instead of the sha256sum CLI tool: this avoids the overhead of calling another process, but more importantly uses hardware acceleration whenever available (the CLI tool doesn't support it at all).
2020-10-08build-manifest: move generating a target to the manifest modPietro Albini-40/+55
2020-10-08build-manifest: split the manifest struct definition in a separate filePietro Albini-52/+55
2020-10-08build-manifest: keep legacy behavior when invoking through ./x.py distPietro Albini-20/+20
2020-10-03Rollup merge of #76107 - integer32llc:manifest-alias, r=pietroalbiniJonas Schievink-0/+4
Write manifest for MAJOR.MINOR channel to enable rustup convenience This connects to https://github.com/rust-lang/rustup/issues/794. It's hard to remember if there have been patch releases for old versions when you'd like to install the latest in a MAJOR.MINOR series. When we're doing a stable release, we write duplicate manifests to `stable`. With this change, only when we're doing a stable release, also write duplicate manifests to `MAJOR.MINOR` to eventually enable rustup (and any other tooling that builds Rust release URLs) to request, say, `1.45` and get `1.45.2` (assuming `1.45.2` is the latest available `1.45` and assuming that we never publish patch releases out of order). I tested the best I could; it's a bit hard to get everything set up right to be able to run the build-manifest tool. But I was able to run it with a release of "1.45.2" and in addition to the files like `channel-rust-1.45.2.toml` and `channel-rust-stable.toml` (and other manifests) that I got before this change, I now get `channel-rust-1.45.toml`. I believe this change to be safe to deploy as it does not change or remove anything about manifests, just adds more. The actions in rust-central-station that interact with manifests appear to use wildcards in such a way that it will pick up these files without any problems. There will need to be changes to `rustup` before `rustup install 1.45` will work, but we can wait for a stable release and stable patch releases to happen with this change before making the `rustup` changes, so that we're not committing to anything before we know it works.
2020-10-02Auto merge of #77436 - JohnTitor:rollup-65dh7rp, r=JohnTitorbors-3/+0
Rollup of 11 pull requests Successful merges: - #76851 (Fix 'FIXME' about using NonZeroU32 instead of u32.) - #76979 (Improve std::sys::windows::compat) - #77111 (Stabilize slice_ptr_range.) - #77147 (Split sys_common::Mutex in StaticMutex and MovableMutex.) - #77312 (Remove outdated line from `publish_toolstate` hook) - #77362 (Fix is_absolute on WASI) - #77375 (rustc_metadata: Do not forget to encode inherent impls for foreign types) - #77385 (Improve the example for ptr::copy) - #77389 (Fix some clippy lints) - #77399 (BTreeMap: use Unique::from to avoid a cast where type information exists) - #77429 (Link `new` method in `DefautHasher`s doc) Failed merges: r? `@ghost`
2020-10-02Rollup merge of #77312 - LeSeulArtichaut:toolstate-msg, r=Mark-SimulacrumYuki Okushi-3/+0
Remove outdated line from `publish_toolstate` hook We no longer add `I-nominated` to toolstate failure issues since T-compiler changed its meeting preparation workflow.
2020-10-01Remove outdated line from `publish_toolstate` hookLeSeulArtichaut-3/+0
2020-10-01Update rlsMark Rousskov-0/+0
* https://github.com/rust-lang/rls/pull/1700
2020-10-01Write MAJOR.MINOR manifest for stable channel onlyCarol (Nichols || Goulding)-0/+2
2020-09-30Write manifest for MAJOR.MINOR channel to enable rustup convenienceCarol (Nichols || Goulding)-0/+2
This connects to https://github.com/rust-lang/rustup/issues/794. It's hard to remember if there have been patch releases for old versions when you'd like to install the latest in a MAJOR.MINOR series. When we're doing a stable release, we write duplicate manifests to `stable`. With this change, only when we're doing a stable release, also write duplicate manifests to `MAJOR.MINOR` to eventually enable rustup (and any other tooling that builds Rust release URLs) to request, say, `1.45` and get `1.45.2` (assuming `1.45.2` is the latest available `1.45` and assuming that we never publish patch releases out of order).
2020-10-01Rollup merge of #77349 - ehuss:update-cargo, r=ehussDylan DPC-0/+0
Update cargo 8 commits in 05c611ae3c4255b7a2bcf4fcfa65b20286a07839..75615f8e69f748d7ef0df7bc0b064a9b1f5c78b2 2020-09-23 23:10:38 +0000 to 2020-09-29 18:42:19 +0000 - Correct mistake about supporting sub-makes and document CARGO_MAKEFLAGS (rust-lang/cargo#8741) - Properly set for_host for proc-macro tests. (rust-lang/cargo#8742) - Add Zsh completion for target triples (rust-lang/cargo#8740) - Reinitialize index on "Object not found" error. (rust-lang/cargo#8735) - Normalize raw string indentation. (rust-lang/cargo#8739) - Update links to rustup docs. (rust-lang/cargo#8738) - Add contributor guide. (rust-lang/cargo#8715) - Fix minor error in `cargo update` docs. (rust-lang/cargo#8737)
2020-10-01Rollup merge of #77202 - ehuss:defer-apple-sdkroot, r=petrochenkovDylan DPC-2/+0
Defer Apple SDKROOT detection to link time. This defers the detection of the SDKROOT for Apple iOS/tvOS targets to link time, instead of when the `Target` is defined. This allows commands that don't need to link to work (like `rustdoc` or `rustc --print=target-list`). This also makes `--print=target-list` a bit faster. This also removes the note in the platform support documentation about these targets being missing. When I wrote it, I misunderstood how the SDKROOT stuff worked. Notes: * This means that JSON spec targets can't explicitly override these flags. I think that is probably fine, as I believe the value is generally required, and can be set with the SDKROOT environment variable. * This changes `x86_64-apple-tvos` to use `appletvsimulator`. I think the original code was wrong (it was using `iphonesimulator`). Also, `x86_64-apple-tvos` seems broken in general, and I cannot build it locally. The `data_layout` does not appear to be correct (it is a copy of the arm64 layout instead of the x86_64 layout). I have not tried building Apple's LLVM to see if that helps, but I suspect it is just wrong (I'm uncertain since I don't know how the tvOS simulator works with its bitcode-only requirements). * I'm tempted to remove the use of `Result` for built-in target definitions, since I don't think they should be fallible. This was added in https://github.com/rust-lang/rust/pull/34980, but that only relates to JSON definitions. I think the built-in targets shouldn't fail. I can do this now, or not. Fixes #36156 Fixes #76584
2020-09-30Rollup merge of #77280 - petrochenkov:llvmcomp, r=Mark-SimulacrumJonas Schievink-2/+5
Ensure that all LLVM components requested by tests are available on CI Addresses https://github.com/rust-lang/rust/pull/75064#issuecomment-667722652 I used an environment variable because passing a command line option all the way from CI to compiletest would be just too much hassle for this task. I added a new variable, but any of the already existing ones defined by CI could be used instead. r? @Mark-Simulacrum
2020-09-30update miriRalf Jung-7/+34
2020-09-29Update cargoEric Huss-0/+0
2020-09-29Auto merge of #77145 - pietroalbini:refactor-build-manifest-versions, ↵bors-209/+288
r=Mark-Simulacrum Refactor versions detection in build-manifest This PR refactors how `build-manifest` handles versions, making the following changes: * `build-manifest` now detects the "package releases" on its own, without relying on rustbuild providing them through CLI arguments. This drastically simplifies calling the tool outside of `x.py`, and will allow to ship the prebuilt tool in a tarball in the future, with the goal of stopping to invoke `x.py` during `promote-release`. * The `tar` command is not used to extract the version and the git hash from tarballs anymore. The `flate2` and `tar` crates are used instead. This makes detecting those pieces of data way faster, as the archive is decompressed just once and we stop parsing the archive once all the information is retrieved. * The code to extract the version and the git hash now stores all the collected data dynamically, without requiring to add new fields to the `Builder` struct every time. I tested the changes locally and it should behave the same as before. r? `@Mark-Simulacrum`
2020-09-29Ensure that all LLVM components requested by tests are available on CIVadim Petrochenkov-2/+5
2020-09-28Rollup merge of #76474 - bjorn3:driver_selected_codegen, r=oli-obkRalf Jung-2/+2
Add option to pass a custom codegen backend from a driver This allows the driver to pass information to the codegen backend. For example the headcrab debugger may in the future want to use cg_clif to JIT code to be injected in the debuggee. This would PR make it possible to tell cg_clif which symbol can be found at which address and to tell it to inject the JITed code into the right process. This PR may also help with https://github.com/rust-lang/miri/pull/1540 by allowing miri to provide a codegen backend that only emits metadata and doesn't perform any codegen. cc @nbaksalyar (headcrab) cc @RalfJung (miri)
2020-09-27Add option to pass a custom codegen backend from a driverbjorn3-2/+2
2020-09-27Auto merge of #71274 - RalfJung:raw-init-check-aggregate, r=petrochenkovbors-2/+2
might_permit_raw_init: also check aggregate fields This is the next step for https://github.com/rust-lang/rust/issues/66151: when doing `mem::zeroed`/`mem::uninitialized`, also recursively check fields of aggregates (except for arrays) for whether they permit zero/uninit initialization.
2020-09-27update tokei and ripgrep in cargotestRalf Jung-2/+2
2020-09-27Rollup merge of #77231 - oli-obk:clippy_const_fn, r=ManishearthJonas Schievink-1/+393
Move helper function for `missing_const_for_fn` out of rustc to clippy cc @rust-lang/clippy @ecstatic-morse #76618 r? @Manishearth I also removed all support for suggesting a function could be `const fn` when that would require feature gates to actually work. This means we'll now have to maintain this ourselves in clippy, but that's how most lints work anyway, so...
2020-09-27Rollup merge of #77129 - ehuss:update-cargo, r=ehussJonas Schievink-0/+0
Update cargo 7 commits in 8777a6b1e8834899f51b7e09cc9b8d85b2417110..05c611ae3c4255b7a2bcf4fcfa65b20286a07839 2020-09-15 19:11:03 +0000 to 2020-09-23 23:10:38 +0000 - --workspace flag for locate-project to find the workspace root (rust-lang/cargo#8712) - Remove some badges documentation. (rust-lang/cargo#8727) - Add plain message format for locate-project (rust-lang/cargo#8707) - Add a term option to configure the progress bar (rust-lang/cargo#8165) - Replace d_as_f64 with as_secs_f64 (rust-lang/cargo#8721) - Add cross check to filters_target test. (rust-lang/cargo#8713) - Add test for whitespace behavior in env flags. (rust-lang/cargo#8706)
2020-09-26Remove all unstable feature support in the `missing_const_for_fn` lintOliver Scherer-97/+25
2020-09-26Move `qualify_min_const_fn` out of rustc into clippyOliver Scherer-1/+465
2020-09-26Rollup merge of #77166 - RalfJung:miri, r=RalfJungRalf Jung-9/+7
update Miri Fixes https://github.com/rust-lang/rust/issues/77130
2020-09-26Rollup merge of #77127 - camelid:update-mdbook, r=Dylan-DPCRalf Jung-1/+1
Update mdBook 0.4.2 -> 0.4.3 Also updated version requirement in `Cargo.toml` from 0.4.0 to 0.4.3.
2020-09-25Remove note about missing ios/tvos targets in platform docs.Eric Huss-2/+0
I misunderstood how this works, and I have fixed the linux builds to support ios/tvos.
2020-09-25build-manifest: handle rust-src being target-independentPietro Albini-9/+14
2020-09-25Auto merge of #77144 - flip1995:clippyup, r=Manishearthbors-965/+3418
Update Clippy Bi-weekly Clippy update. This includes a `Cargo.lock` update (d445493479711389f4dea3a0f433041077ba2088), so probably needs `rollup=never`. r? `@Manishearth`
2020-09-25Rollup merge of #76724 - ecstatic-morse:dataflow-pass-names, r=lcnrJonas Schievink-0/+1
Allow a unique name to be assigned to dataflow graphviz output Previously, if the same analysis were invoked multiple times in a single compilation session, the graphviz output for later runs would overwrite that of previous runs. Allow callers to add a unique identifier to each run so this can be avoided.
2020-09-24update MiriRalf Jung-9/+7
2020-09-24build-manifest: add documentation on the PkgType methodsPietro Albini-0/+5
2020-09-24build-manifest: refactor detecting package versionsPietro Albini-132/+116
2020-09-24Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyupflip1995-965/+3418