Commit Graph

174 Commits

Author SHA1 Message Date
Pietro Albini f3d07b36ed
build-manifest: allow configuring the number of threads 2020-10-12 19:53:28 +02:00
Pietro Albini 25cc75c924
build-manifest: accept the Rust version instead of the monorepo path
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-12 19:53:22 +02:00
Pietro Albini 5973fd42a2
build-manifest: stop generating numbered channel names except for stable
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-12 17:39:13 +02:00
Pietro Albini 8d2b15943b
bootstrap: always use the Rust version in package names
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-09 15:21:45 +02:00
Dylan DPC fffeaa7b83
Rollup merge of #77407 - pietroalbini:less-build-manifest, r=Mark-Simulacrum
Improve build-manifest to work with the improved promote-release

This PR makes some changes to build-manifest to have it work better with the other improvements I'm making to [promote-release](https://github.com/rust-lang/promote-release).

A new way to invoke the tool was added: `./x.py run src/tools/build-manifest`. The new invocation disables the generation of `.sha256` files and the generation of GPG signatures, as those steps are not tied to the Rust version we're building the manifest of: handling them in `promote-release` will improve the maintenability of our release process. Invocations through the old command (`./x.py dist hash-and-sign`) are referred inside the source code as "legacy". The new invocation also enables internal parallelism, disabled on legacy to avoid overloading our old server.

Improvements were also made on how the checksums included in the manifest are generated:

* The manifest is first generated with placeholder checksums, and then a function walks through the manifes and calculates only the needed hashes. Before this PR, all the hashes were calculated beforehand, including the hashes of unused files.
* Calculating the hashes is now done in parallel with rayon, to better utilize all the available disk bandwidth.
* The `sha2` crate is now used instead of the `sha256sum` CLI tool: this avoids the overhead of calling another process, but more importantly enables hardware acceleration whenever available (the `sha256sum` CLI tool doesn't support it at all).

r? @Mark-Simulacrum
This PR is best reviewed commit-by-commit.
2020-10-05 02:29:33 +02:00
Pietro Albini 9352062bc3
build-manifest: use BufReader 2020-10-01 19:42:02 +02:00
Carol (Nichols || Goulding) a8fe654448
Write MAJOR.MINOR manifest for stable channel only 2020-10-01 12:06:45 -04:00
Pietro Albini fde1135916
build-manifest: avoid collecting SHAs in parallel on legacy mode
This avoids overloading the old server, and disrupting the other
programs running on it.
2020-10-01 17:30:24 +02:00
Pietro Albini acd8e59b66
build-manifest: calculate checksums lazily and in parallel
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-01 17:30:24 +02:00
Pietro Albini 0375ee8b55
build-manifest: move generating a target to the manifest mod 2020-10-01 17:02:47 +02:00
Carol (Nichols || Goulding) 2033eb1495
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).
2020-09-30 21:27:04 -04:00
Pietro Albini 6e15975540
build-manifest: split the manifest struct definition in a separate file 2020-09-30 14:40:38 +02:00
Pietro Albini d4928ad7fd
build-manifest: keep legacy behavior when invoking through ./x.py dist 2020-09-30 14:29:02 +02:00
bors 9b77a6a200 Auto merge of #77145 - pietroalbini:refactor-build-manifest-versions, 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-29 16:41:53 +00:00
Pietro Albini 89ffab76b7
build-manifest: refactor detecting package versions 2020-09-24 19:26:43 +02:00
Ralf Jung b4c3f409af
Rollup merge of #76798 - alistair23:alistair/rv32-linux, r=jyn514
Build fixes for RISC-V 32-bit Linux support

This fixes build issues with the 32-bit RISC-V port.
2020-09-19 11:47:56 +02:00
Pietro Albini 3bddfea7e2
build-manifest: stop receiving release numbers from bootstrap 2020-09-18 17:42:58 +02:00
Pietro Albini 0917b2123f
build-manifest: move PkgType into the versions module 2020-09-18 17:32:37 +02:00
Alistair Francis 3e94295853 tools/build-manifest: Add support for RISC-V 32-bit
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2020-09-16 09:37:00 -07:00
Jens Reidel 78097d9682 initial attempt to add aarch64-unknown-linux-musl to dist-linux-arm 2020-09-06 19:24:37 +02:00
Mark Rousskov 35f89879fb Add rustc-docs as a component
Previously it was listed as a package but wasn't available in the component
lists in rustup, so wasn't actually installable.

rustc-docs is also only present for x86_64-unknown-linux-gnu. Eventually it'll
also be shipped for aarch64-gnu with current CI configuration, but that builder
isn't quite up and running yet.

We probably want to ship compiler docs for other platforms as well, though, but
this commit doesn't enable that quite yet. A future PR may do so by adding
--enable-compiler-docs to the relevant builders (but it would also need to
decide the set of builders which we'd ship on).
2020-08-15 07:11:29 -04:00
Matthias Krüger 2100e67126 make rustc-docs component available to rustup 2020-08-13 11:29:48 +02:00
David Sonder f130e18c01
Enable docs on in the x86_64-unknown-linux-musl manifest
Add the rust-docs component to toolchain x86_64-unknown-linux-musl, which allows
people using rustup on their musl-based linux distribution to download the
rust-docs.

Generating and uploading the docs was enabled in b5d143b.
2020-08-03 16:02:20 +02:00
msizanoen1 1813ae7d52 Add RISC-V GNU/Linux to src/tools/build-manifest as a host platform 2020-07-16 13:37:42 +07:00
Joshua M. Clulow 8368a35f83 build dist for x86_64-unknown-illumos
This change creates a new Docker image, "dist-x86_64-illumos", and sets
things up to build the full set of "dist" packages for illumos hosts, so
that illumos users can use "rustup" to install packages.  It also
adjusts the manifest builder to expect complete toolchains for this
platform.
2020-07-08 23:39:09 +00:00
Aleksey Kladov fdd39a343e Add rust-analyzer to the build manifest 2020-07-06 11:13:27 +02:00
Eric Huss 75983e137e Support configurable deny-warnings for all in-tree crates. 2020-06-25 21:17:21 -07:00
yuqio 9267b4f612 Remove unused crate imports in 2018 edition crates 2020-06-23 05:01:20 +02:00
Ralf Jung dc7524be27 remove lldb package from bootstrap, config and build-manifest
it's not been built since a long time ago
2020-05-10 22:43:58 +02:00
Patrick Mooney b77aefb76e Add illumos triple
Co-Authored-By: Jason King <jason.brian.king@gmail.com>
Co-Authored-By: Joshua M. Clulow <jmc@oxide.computer>
2020-04-14 20:36:07 +00:00
Andre Richter 176bf3c60f
AArch64 bare-metal targets: Build rust-std
This patch enables building of rust-std for the aarch64 bare-metal targets.

For the compiler intrinsics, it fetches the AArch64 bare-metal target
(aarch64-none-elf) GCC for the A-profile provided by ARM itself from
https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads
2020-02-28 19:05:42 +01:00
Tyler Mandry 9246b3056c
Rollup merge of #68253 - japaric:bare-metal-cortex-a, r=alexcrichton
add bare metal ARM Cortex-A targets to rustc

-> `rustc --target armv7a-none-eabi` will work

also build rust-std (rustup) components for them

-> `rustup target add armv7a-none-eabi` will work

this completes our bare-metal support of ARMv7 cores on stable Rust (by 1.42 or 1.43)

(these target specifications have been tested on a real (no emulation / QEMU) [Cortex-A7 core](https://github.com/iqlusioninc/usbarmory.rs/))
2020-01-22 16:02:09 -08:00
Jorge Aparicio 8abbd0beae for now, do not build rust-std for the armv7a-none-eabihf target
it needs some upstream changes in the build script of the compiler-builtins
crate
2020-01-21 17:18:37 +01:00
msizanoen1 45dd44c0e1
Add `riscv64gc-unknown-linux-gnu` into target list in build-manifest
Missed in #68037 

r? @alexcrichton
2020-01-18 18:59:51 +07:00
Jorge Aparicio 470cdf54ac add bare metal ARM Cortex-A targets to rustc
-> `rustc --target armv7-none-eabi` will work

also build rust-std (rustup) components for them

-> `rustup target add armv7-none-eabi` will work
2020-01-15 18:05:06 +01:00
Mark Rousskov 6891388e66 x.py fmt after previous deignore 2019-12-24 17:38:22 -05:00
Josh Stone 2206218d59 Remove rustc-dev from the default nightly components
It was already filtered from other branches, but we only kept it in
nightly's default to ease the transition. Now that the separation of
rust-std/rustc-dev has reached the 1.40 release, it seems like a good
time for that transition to end.
2019-12-20 15:45:03 -08:00
Ralf Jung 224378cc6a more correct error msg 2019-11-04 10:10:49 +01:00
Ralf Jung 2cf7c29675 avoid using nightly features 2019-11-04 10:08:58 +01:00
Ralf Jung a675fd6f2e don't fail manifest creation if the toolstate file is missing or mal-formed 2019-11-03 11:55:05 +01:00
Ralf Jung 9138d3bb80 when Miri tests are not passing, do not add Miri component 2019-11-03 11:47:07 +01:00
Tyler Mandry e15f1be63e
Rollup merge of #65843 - xen0n:mips64-musl-targets-with-ci, r=alexcrichton
Enable dist for MIPS64 musl targets

Continuing work in #63165, necessary libc changes are in place and published so here we go!
2019-10-29 12:01:40 -07:00
Wang Xuerui 23b382755d
ci: add support for MIPS64 musl targets 2019-10-26 18:47:08 +08:00
Stefan Lankes d349e32fc7 Merge branch 'master' into rusty-hermit, resolve conflicts 2019-10-25 09:09:55 +02:00
Josh Stone 4c906dc84e Add rustc-dev to nightly default and complete profiles 2019-10-15 18:38:18 -04:00
Josh Stone 3a05616cb6 minimize the rust-std component
This splits out a rustc-dev component with the compiler crates, and
keeps the status quo of default installed files on nightly. The default
changing to not install compiler libraries by default is left for a
future pull request.

However, on stable and beta, this does remove the compiler libraries
from the set of libraries installed by default, as they are never needed
there (per our stability story, they "cannot" be used).
2019-10-15 18:38:18 -04:00
Mark Rousskov fabba8f764 Revert "Auto merge of #64823 - cuviper:min-std, r=Mark-Simulacrum"
This reverts commit 000d90b11f, reversing
changes made to 898f36c83c.
2019-10-12 12:00:34 -04:00
Josh Stone d305254099 Add rustc-dev to nightly default and complete profiles 2019-10-07 15:49:51 -07:00
Josh Stone 2dcf2f0f7b Only install rustc-dev by default on nightly 2019-10-07 13:48:16 -07:00
Josh Stone bd4e9d5fe1 add rustc-dev to tools/build-manifest 2019-10-07 13:48:16 -07:00