summary refs log tree commit diff
path: root/src/bootstrap/dist.rs
AgeCommit message (Collapse)AuthorLines
2017-04-04Only use cargo-vendor if building from git sourcesJosh Stone-19/+22
2017-03-13rustbuild: Don't hardcode 'nightly' for CargoAlex Crichton-8/+11
It now follows rustc release trains
2017-03-11rustbuild: Fix a bug when manifesting with CargoAlex Crichton-1/+1
The wrong Cargo version was passed down so it ended up panicking the build-manifest script as it couldn't find the right tarball.
2017-03-10Test fixes and rebase conflictsAlex Crichton-1/+1
2017-03-10Don't put Cargo into the rustc workspaceAlex Crichton-5/+6
This causes problems when first cloning and bootstrapping the repository unfortunately, so let's ensure that Cargo sticks around in its own workspace. Because Cargo is a submodule it's not available by default on the inital clone of the rust-lang/rust repository. Normally it's the responsibility of the rustbuild to take care of this, but unfortunately to build rustbuild itself we need to resolve the workspace conflicts. To deal with this we'll just have to ensure that all submodules are in their own workspace, which sort of makes sense anyway as updates to dependencies as bugfixes to Cargo should go to rust-lang/cargo instead of rust-lang/rust. In any case this commit removes Cargo from the global workspace which should resolve the issues that we've been seeing. To actually perform this the `cargo` submodule has been moved to the top directory to ensure it's outside the scope of `src/Cargo.toml` as a workspace.
2017-03-03rustbuild: Add support for compiling CargoAlex Crichton-58/+76
This commit adds support to rustbuild for compiling Cargo as part of the release process. Previously rustbuild would simply download a Cargo snapshot and repackage it. With this change we should be able to turn off artifacts from the rust-lang/cargo repository and purely rely on the artifacts Cargo produces here. The infrastructure added here is intended to be extensible to other components, such as the RLS. It won't exactly be a one-line addition, but the addition of Cargo didn't require too much hooplah anyway. The process for release Cargo will now look like: * The rust-lang/rust repository has a Cargo submodule which is used to build a Cargo to pair with the rust-lang/rust release * Periodically we'll update the cargo submodule as necessary on rust-lang/rust's master branch * When branching beta we'll create a new branch of Cargo (as we do today), and the first commit to the beta branch will be to update the Cargo submodule to this exact revision. * When branching stable, we'll ensure that the Cargo submodule is updated and then make a stable release. Backports to Cargo will look like: * Send a PR to cargo's master branch * Send a PR to cargo's release branch (e.g. rust-1.16.0) * Send a PR to rust-lang/rust's beta branch updating the submodule * Eventually send a PR to rust-lang/rust's master branch updating the submodule For reference, the process to add a new component to the rust-lang/rust release would look like: * Add `$foo` as a submodule in `src/tools` * Add a `tool-$foo` step which compiles `$foo` with the specified compiler, likely mirroring what Cargo does. * Add a `dist-$foo` step which uses `src/tools/$foo` and the `tool-$foo` output to create a rust-installer package for `$foo` likely mirroring what Cargo does. * Update the `dist-extended` step with a new dependency on `dist-$foo` * Update `src/tools/build-manifest` for the new component.
2017-02-16Auto merge of #39824 - alexcrichton:disable-dist-src, r=brsonbors-0/+4
travis: Disable source tarballs on most builders Currently we create a source tarball on almost all of the `DEPLOY=1` builders but this has the adverse side effect of all source tarballs overriding themselves in the S3 bucket. Normally this is ok but unfortunately a source tarball created on Windows is not buildable on Unix. On Windows the vendored sources contain paths with `\` characters in them which when interpreted on Unix end up in "file not found" errors. Instead of this overwriting behavior, whitelist just one linux builder for producing tarballs and avoid producing tarballs on all other hosts.
2017-02-15travis: Disable source tarballs on most buildersAlex Crichton-0/+4
Currently we create a source tarball on almost all of the `DEPLOY=1` builders but this has the adverse side effect of all source tarballs overriding themselves in the S3 bucket. Normally this is ok but unfortunately a source tarball created on Windows is not buildable on Unix. On Windows the vendored sources contain paths with `\` characters in them which when interpreted on Unix end up in "file not found" errors. Instead of this overwriting behavior, whitelist just one linux builder for producing tarballs and avoid producing tarballs on all other hosts.
2017-02-15use bash when invoking dist shell scripts on solarisShawn Walker-Salas-7/+14
Partially fixes #25845
2017-02-14Automatically vendor Cargo deps when building the source tarballs.Eduard-Mihai Burtescu-7/+25
2017-02-08Rollup merge of #39598 - alexcrichton:cargo-branch, r=brsonCorey Farwell-3/+1
Fix branch name Cargo's downloaded from This landed on beta in #39546 and this is bringing the patch back to master.
2017-02-06Fix branch name Cargo's downloaded fromAlex Crichton-3/+1
This landed on beta in #39546 and this is bringing the patch back to master.
2017-02-06rustbuild: Fix a few locations with makefiles goneAlex Crichton-2/+0
* Add version info to channel.rs as main.mk is no longer available * Update `Makefile.in` used with bootstrap to not try to require `mk/util.mk` * Update the `dist` target to avoid the makefile pieces
2017-02-02rustbuild: Add x.py to source tarballsAlex Crichton-1/+2
We should be sure to add our build system entry point! Closes #39476
2017-01-30travis: Tweak artifact uploadsAlex Crichton-1/+3
* Don't upload `*.wixpdb` files by accident * Don't upload `doc` dir by accident * Fix level of indirection on Travis
2017-01-25rustbuild: Add manifest generation in-treeAlex Crichton-1/+32
This commit adds a new tool, `build-manifest`, which is used to generate a distribution manifest of all produced artifacts. This tool is intended to replace the `build-rust-manifest.py` script that's currently located on the buildmaster. The intention is that we'll have a builder which periodically: * Downloads all artifacts for a commit * Runs `./x.py dist hash-and-sign`. This will generate `sha256` and `asc` files as well as TOML manifests. * Upload all generated hashes and manifests to the directory the artifacts came from. * Upload *all* artifacts (tarballs and hashes and manifests) to an archived location. * If necessary, upload all artifacts to the main location. This script is intended to just be the second step here where orchestrating uploads and such will all happen externally from the build system itself.
2017-01-24rustbuild: Start building --enable-extendedAlex Crichton-8/+384
This commit adds a new flag to the configure script, `--enable-extended`, which is intended for specifying a desire to compile the full suite of Rust tools such as Cargo, the RLS, etc. This is also an indication that the build system should create combined installers such as the pkg/exe/msi artifacts. Currently the `--enable-extended` flag just indicates that combined installers should be built, and Cargo is itself not compiled just yet but rather only downloaded from its location. The intention here is to quickly get to feature parity with the current release process and then we can start improving it afterwards. All new files in this PR inside `src/etc/installer` are copied from the rust-packaging repository.
2017-01-12travis: Start uploading artifacts on commitsAlex Crichton-4/+7
This commit starts adding the infrastructure for uploading release artifacts from AppVeyor/Travis on each commit. The idea is that eventually we'll upload a full release to AppVeyor/Travis in accordance with plans [outlined earlier]. Right now this configures Travis/Appveyor to upload all tarballs in the `dist` directory, and various images are updated to actually produce tarballs in these directories. These are nowhere near ready to be actual release artifacts, but this should allow us to play around with it and test it out. Once this commit lands we should start seeing artifacts uploaded on each commit. [outlined earlier]: https://internals.rust-lang.org/t/rust-ci-release-infrastructure-changes/4489
2017-01-04rustbuild: Quickly `dist` cross-host compilersAlex Crichton-6/+1
This commit optimizes the compile time for creating tarballs of cross-host compilers and as a proof of concept adds two to the standard Travis matrix. Much of this commit is further refactoring and refining of the `step.rs` definitions along with the interpretation of `--target` and `--host` flags. This has gotten confusing enough that I've also added a small test suite to `src/bootstrap/step.rs` to ensure what we're doing works and doesn't regress. After this commit when you execute: ./x.py dist --host $MY_HOST --target $MY_HOST the build system will compile two compilers. The first is for the build platform and the second is for the host platform. This second compiler is then packaged up and placed into `build/dist` and is ready to go. With a fully cached LLVM and docker image I was able to create a cross-host compiler in around 20 minutes locally. Eventually we plan to add a whole litany of cross-host entries to the Travis matrix, but for now we're just adding a few before we eat up all the extra capacity. cc #38531
2017-01-02rustbuild: fix dist-analysis with full bootstrap disabledWang Xuerui-1/+9
2016-12-30rustbuild: Fix source tarballs and the vendor dirAlex Crichton-0/+7
The source tarball creation step would attempt to skip a number of files that we want to ignore ourselves, but once we've hit the vendor directory we don't want to skip anything so be sure to vendor everything inside that directory. Closes #38690
2016-12-20rustbuild: package src only once for build tripleWang Xuerui-1/+7
2016-12-17rustbuild: Create directories in mingw distAlex Crichton-0/+1
Previously we accidentally relied on the mingw dist step running last, but the step just needed to ensure the directories were created.
2016-12-13rustbuild: Don't dist docs if disabledAlex Crichton-0/+5
This commit skips the `docs` dist step if the `--disable-docs` flag is passed, fixing a compile error seen on nightly.
2016-12-13rustbuild: Skip some more non-relevant dist stepsAlex Crichton-1/+14
This commit skips a few more dist tragets during compilation which shouldn't be necessary. * First, when packaging std we only take action when the host target is the build target. Otherwise we package the same artifacts a number of times, which shouldn't be necessary. * Next, we apply the same logic to the save-analysis build. This is actually required for correctness as the build compiler is the only one which actually has save analysis information. This should fix an error seen on nightlies.
2016-12-12rustbuild: Fix dist of save-analysis infoAlex Crichton-8/+1
We don't need an extra bare tarball, the save-analysis info is already produced with a version/target in the filename.
2016-12-12rustbuild: Check for .git as a dirAlex Crichton-1/+1
Git worktrees have this as a file and typically won't work inside docker containers, but that's ok, so instead of just checking for existence check for a directory to see if the git commands will succeed.
2016-12-09Create tar balls of save-analysis-api metadata for the standard libraries as ↵Nick Cameron-1/+45
part of `make dist`.
2016-12-08rustbuild: Implement distcheckAlex Crichton-1/+6
This commit implements the `distcheck` target for rustbuild which is only ever run on our nightly bots. This essentially just creates a tarball, un-tars it, and then runs a full build, validating that the release tarballs do indeed have everything they need to build Rust.
2016-11-14rustbuild: Allow configuration of python interpreterAlex Crichton-2/+2
Add a configuration key to `config.toml`, read it from `./configure`, and add auto-detection if none of those were specified. Closes #35760
2016-10-08rustbuild: Optimize build times slightlyAlex Crichton-42/+23
As the entry point for building the Rust compiler, a good user experience hinges on this compiling quickly to get to the meat of the problem. To that end use `#[cfg]`-specific dependencies to avoid building Windows crates on Unix and drop the `regex` crate for now which was easily replacable with some string searching.
2016-10-05Install docs, std and rustc using results from dist.Ahmed Charles-3/+3
2016-09-03Add rustc version info (git hash + date) to dist tarballJoseph Dunne-0/+8
fixes #32444
2016-08-12Produce source package in rust-installer format in addition to vanilla tarballDiggory Blake-1/+115
Copy source files from rust code Add missing wildcard Remove unused function Remove use of tar --transform
2016-07-05rustbuild: Remove the `build` directoryAlex Crichton-0/+319
The organization in rustbuild was a little odd at the moment where the `lib.rs` was quite small but the binary `main.rs` was much larger. Unfortunately as well there was a `build/` directory with the implementation of the build system, but this directory was ignored by GitHub on the file-search prompt which was a little annoying. This commit reorganizes rustbuild slightly where all the library files (the build system) is located directly inside of `src/bootstrap` and all the binaries now live in `src/bootstrap/bin` (they're small). Hopefully this should allow GitHub to index and allow navigating all the files while maintaining a relatively similar layout to the other libraries in `src/`.