Commit Graph

221 Commits

Author SHA1 Message Date
Nick Cameron 97d21e29df review changes 2017-11-13 10:51:30 +13:00
Nick Cameron 63d854acf2 Distribute Rustfmt 2017-11-13 10:51:29 +13:00
Alex Crichton 6bc8f164b0 std: Remove `rand` crate and module
This commit removes the `rand` crate from the standard library facade as
well as the `__rand` module in the standard library. Neither of these
were used in any meaningful way in the standard library itself. The only
need for randomness in libstd is to initialize the thread-local keys of
a `HashMap`, and that unconditionally used `OsRng` defined in the
standard library anyway.

The cruft of the `rand` crate and the extra `rand` support in the
standard library makes libstd slightly more difficult to port to new
platforms, namely WebAssembly which doesn't have any randomness at all
(without interfacing with JS). The purpose of this commit is to clarify
and streamline randomness in libstd, focusing on how it's only required
in one location, hashmap seeds.

Note that the `rand` crate out of tree has almost always been a drop-in
replacement for the `rand` crate in-tree, so any usage (accidental or
purposeful) of the crate in-tree should switch to the `rand` crate on
crates.io. This then also has the further benefit of avoiding
duplication (mostly) between the two crates!
2017-11-08 20:41:17 -08:00
leonardo.yvens 19aa23b6d3 Remove deprecated `collections` crate.
This reverts commit 6484258f17.
2017-10-22 14:55:02 -02:00
bors b633341c49 Auto merge of #44792 - Mark-Simulacrum:correct-deps, r=alexcrichton
Make sure to clear out the stageN-{rustc,std,tools} directories.

We copy built tool binaries into a dedicated directory to avoid deleting them,
stageN-tools-bin.  These aren't ever cleared out by code, since there should be
no reason to do so, and we'll simply overwrite them as necessary.

When clearing out the stageN-{std,rustc,tools} directories, make sure to delete
both Cargo directories -- per-target and build scripts. This ensures that
changing libstd doesn't cause problems due to build scripts not being rebuilt,
even though they should be.

Fixes https://github.com/rust-lang/rust/issues/44739.
2017-10-20 17:36:40 +00:00
Mark Simulacrum 686c1015cf Make tools which may not build return Option.
This makes it mandatory for other steps to have to handle the potential
failure instead of failing in an odd way later down the road.
2017-10-19 17:30:37 -06:00
Marc-Antoine Perennou 27cc11931a rustbuild: fix dist in debug mode
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2017-10-19 12:22:16 +02:00
Alex Crichton 5050dadfc6 rustbuild: Allow setting rls/rustfmt to "broken"
This commit enables configuring the RLS/rustfmt tools to the "broken" state and
actually get it past CI. The main changes here were to update all dist-related
code to handle the situation where the RLS isn't available. This in turn
involved a homegrown preprocessor-like-function to edit the configuration files
we pass to the various combined installer tools.
2017-10-16 09:06:51 -07:00
Vadim Petrochenkov b434c84bab cleanup: rustc doesn't use an external archiver 2017-10-09 22:36:08 +03:00
Nick Cameron c0ea270f70 Rename rls component to rls-preview on nightly 2017-09-27 15:40:57 -07:00
Oliver Schneider 68fc65eaf2
Prevent distribution if miri is enabled 2017-09-17 21:41:45 +02:00
Nick Cameron 39c9a3d796 Attempt to fix the component manifest problem for rls-preview
cc #44270
2017-09-14 16:36:29 +12:00
bors a7b7dce02d Auto merge of #44413 - est31:move_man, r=nikomatsakis
Move the man directory to a subdirectory

There is no reason it should be in the top directory.
2017-09-12 12:41:23 +00:00
Alex Crichton eb26d5b7c9 rustbuild: Fix a distribution bug with rustdoc
Apparently `File::create` was called when there was an existing hard link or the
like, causing an existing file to get accidentally truncated!

Closes #44487
2017-09-11 11:01:48 -07:00
Alex Crichton 38bedfabb9 rustbuild: Switch back to using hard links
The `copy` function historically in rustbuild used hard links to speed up the
copy operations that it does. This logic was backed out, however, in #39518 due
to a bug that only showed up on Windows, described in #39504. The cause
described in #39504 happened because Cargo, on a fresh build, would overwrite
the previous artifacts with new hard links that Cargo itself manages.

This behavior in Cargo was fixed in rust-lang/cargo#4390 where it no longer
should overwrite files on fresh builds, opportunistically leaving the filesystem
intact and not touching it.

Hopefully this can help speed up local builds by doing fewer copies all over the
place!
2017-09-09 21:14:44 -07:00
est31 d587558269 Move the man directory to a subdirectory
There is no reason it should be in the top directory.
2017-09-08 12:51:19 +02:00
Mark Simulacrum 596e97fdce Rollup merge of #44321 - jakllsch:jakllsch-4f2d6c87-2674-43e4-9c5f-2415136e6bdc, r=Mark-Simulacrum
bootstrap: only include docs in extended distribution if enabled

Fixes #44163
2017-09-06 18:27:56 -06:00
Mark Simulacrum da5e5ef4a2 Rollup merge of #44218 - SimonSapin:commit-hash, r=alexcrichton
Add full git commit hash to release channel manifests

The full hash is necessary to build the download URL for "alternate" compiler builds. This is a first step for https://github.com/rust-lang-nursery/rustup.rs/issues/1099.
2017-09-06 18:27:47 -06:00
Jonathan A. Kollasch fcefe36ce7 bootstrap: only include docs in extended distribution if enabled
Issue #44163
2017-09-04 15:42:11 -05:00
Simon Sapin 9412fd7371 Only include git-commit-hash in tarballs when available
… instead of writing an empty file.
2017-09-04 16:30:36 +02:00
Simon Sapin 9abc549aa1 Add git-commit-hash in source and extended tarballs too. 2017-09-01 09:08:59 +02:00
Simon Sapin de038b746e Add full git commit hash to release channel manifests
The full hash is necessary to build the download URL for "alternate"
compiler builds.
This is a first step for
https://github.com/rust-lang-nursery/rustup.rs/issues/1099
2017-08-31 16:37:14 +02:00
Josh Stone 35f8a2065b rustbuild: update the rust-src filter for compiler-rt
We wanted `src/compiler-rt/test` filtered from the `rust-src` package,
but that path is now `src/libcompiler_builtins/compiler-rt/test`.  This
saves over half of the installed rust-src size. (50MB -> 22MB)
2017-08-30 18:20:59 -07:00
Ariel Ben-Yehuda ba304b96c4 Rollup merge of #44076 - RalfJung:src, r=alexcrichton
include Cargo.{toml,lock} in rust-src tarball

The lock file is interesting because e.g. xargo could use it to build libstd against the same dependencies that were used for the main build. More generally speaking, just documenting in this form which exact dependencies should be used IMHO makes lots of sense.

I added the Cargo.toml mostly because having the lock without the toml feels odd. Of course, the toml contains references to paths that don't actually exist in the rust-src tarball. Not sure if that is considered a problem.
2017-08-29 21:40:56 +00:00
Alex Crichton a9b0a7ba93 rustbuild: Rewrite the configure script in Python
This commit rewrites our ancient `./configure` script from shell into Python.
The impetus for this change is to remove `config.mk` which is just a vestige of
the old makefile build system at this point. Instead all configuration is now
solely done through `config.toml`.

The python script allows us to more flexibly program (aka we can use loops
easily) and create a `config.toml` which is based off `config.toml.example`.
This way we can preserve comments and munge various values as we see fit.

It is intended that the configure script here is a drop-in replacement for the
previous configure script, no functional change is intended. Also note that the
rationale for this is also because our build system requires Python, so having a
python script a bit earlier shouldn't cause too many problems.

Closes #40730
2017-08-27 18:53:30 -07:00
Ralf Jung bd24325ce1 Do not include the src/Cargo.toml
distcheck complains that this file references projects not cotnained in the tarball
2017-08-26 15:29:17 +02:00
Ralf Jung 8cd4cacbc7 include Cargo.{toml,lock} in rust-src tarball 2017-08-24 23:25:35 +02:00
Mark Simulacrum facf5a91c4 Build rustdoc only at the top stage 2017-08-13 05:15:43 +05:00
Mark Simulacrum 44ffb61623 Unify flags into config.
This introduces a slight change in behavior, where we unilaterally
respect the --host and --target parameters passed for all sanity
checking and runtime configuration.
2017-08-13 05:15:43 +05:00
Mark Simulacrum e2e9b40e9a Build rustdoc on-demand.
Rustdoc is no longer compiled in every stage, alongside rustc, instead
it is only compiled when requested, and generally only for the last
stage.
2017-07-27 05:51:22 -06:00
Mark Simulacrum fe0eca0d3f Change tools to take a compiler instead of a stage. 2017-07-27 05:51:22 -06:00
Mark Simulacrum fef9b48252 Make dist equivalent to old build system. 2017-07-24 09:05:27 -06:00
Mark Simulacrum 1c118231ad Make distcheck work again. 2017-07-22 10:48:29 -06:00
Mark Simulacrum 6a67a050c6 Change make_run signature to taking a RunConfig struct for refactorability. 2017-07-20 17:51:07 -06:00
Mark Simulacrum b05af49086 Add an optional condition to constrain defaults.
Utilized primarily to not be a default rule unless some configuration is
given (e.g., compiler docs are enabled).
2017-07-20 17:24:11 -06:00
Mark Simulacrum e9c2242050 Remove step.rs comments 2017-07-20 16:41:26 -06:00
Mark Simulacrum 56128fb3ac Implement available paths list. 2017-07-20 11:24:37 -06:00
Mark Simulacrum 528646e127 Utilize interning to allow Copy/Clone steps 2017-07-20 11:24:32 -06:00
Mark Simulacrum e7b1a60ad7 Remove core_intrinsics feature gate 2017-07-20 11:24:00 -06:00
Mark Simulacrum 5984e70af2 Cleanups and fixes throughout 2017-07-20 11:24:00 -06:00
Mark Simulacrum a5ab2ceef8 Fix a few errors introduced during rebase. 2017-07-20 11:23:59 -06:00
Mark Simulacrum c114fe576f Finish fixing warnings and errors. Bootstrap builds. 2017-07-20 11:23:58 -06:00
Mark Simulacrum 60388303c7 Fixes warnings and errors introduced while moving code around 2017-07-20 11:23:58 -06:00
Mark Simulacrum 6b3413d825 Change code to work with the new system 2017-07-20 11:23:57 -06:00
Mark Simulacrum 001e9f3490 Move code into Step trait implementations.
No changes are introduced to code body. This commit will not build; it
is done to permit a better diff in later commits.
2017-07-20 11:23:57 -06:00
Mark Simulacrum 0a1b5e8bc0 Move rule configs out of step 2017-07-20 11:23:57 -06:00
Matthew Dawson ce3abc5801
Fix stage 2 builds with a custom libdir.
When copying libstd for the stage 2 compiler, the builder ignores the
configured libdir/libdir_relative configuration parameters.  This causes
the compiler to fail to find libstd, which cause any tools built with the
stage 2 compiler to fail.

To fix this, make the copy steps of rustbuild aware of the libdir_relative
parameter when the stage >= 2.  Also update the dist target to be aware of
the new location of libstd.
2017-07-07 23:07:01 -04:00
bors 8cab2c73d4 Auto merge of #42899 - alexcrichton:compiler-builtins, r=nikomatsakis
Switch to rust-lang-nursery/compiler-builtins

This commit migrates the in-tree `libcompiler_builtins` to the upstream version
at https://github.com/rust-lang-nursery/compiler-builtins. The upstream version
has a number of intrinsics written in Rust and serves as an in-progress rewrite
of compiler-rt into Rust. Additionally it also contains all the existing
intrinsics defined in `libcompiler_builtins` for 128-bit integers.

It's been the intention since the beginning to make this transition but
previously it just lacked the manpower to get done. As this PR likely shows it
wasn't a trivial integration! Some highlight changes are:

* The PR rust-lang-nursery/compiler-builtins#166 contains a number of fixes
  across platforms and also some refactorings to make the intrinsics easier to
  read. The additional testing added there also fixed a number of integration
  issues when pulling the repository into this tree.

* LTO with the compiler-builtins crate was fixed to link in the entire crate
  after the LTO process as these intrinsics are excluded from LTO.

* Treatment of hidden symbols was updated as previously the
  `#![compiler_builtins]` crate would mark all symbol *imports* as hidden
  whereas it was only intended to mark *exports* as hidden.
2017-07-06 02:34:29 +00:00
Alex Crichton 7e6c9f3635 Switch to rust-lang-nursery/compiler-builtins
This commit migrates the in-tree `libcompiler_builtins` to the upstream version
at https://github.com/rust-lang-nursery/compiler-builtins. The upstream version
has a number of intrinsics written in Rust and serves as an in-progress rewrite
of compiler-rt into Rust. Additionally it also contains all the existing
intrinsics defined in `libcompiler_builtins` for 128-bit integers.

It's been the intention since the beginning to make this transition but
previously it just lacked the manpower to get done. As this PR likely shows it
wasn't a trivial integration! Some highlight changes are:

* The PR rust-lang-nursery/compiler-builtins#166 contains a number of fixes
  across platforms and also some refactorings to make the intrinsics easier to
  read. The additional testing added there also fixed a number of integration
  issues when pulling the repository into this tree.

* LTO with the compiler-builtins crate was fixed to link in the entire crate
  after the LTO process as these intrinsics are excluded from LTO.

* Treatment of hidden symbols was updated as previously the
  `#![compiler_builtins]` crate would mark all symbol *imports* as hidden
  whereas it was only intended to mark *exports* as hidden.
2017-07-05 07:08:36 -07:00
Mark Simulacrum 1654a2f5ac Use build.build instead of build.config.build 2017-07-04 07:39:47 -06:00
Mark Simulacrum 712bd0d841 Remove src_is_git, instead call method on rust_info directly. 2017-07-04 07:31:56 -06:00
Mark Simulacrum 2cc5b084a0 Clarify meaning of Build.cargo, Build.rustc.
Rename Build.{cargo, rustc} to {initial_cargo, initial_rustc}.
2017-07-04 07:31:56 -06:00
Mark Simulacrum 6766abbfa9 Clippy lints 2017-07-04 07:31:55 -06:00
Mark Simulacrum 802b6db004 Cleanup dist 2017-07-04 07:31:55 -06:00
Alex Crichton 5c3d0e6de3 Switch to the crates.io `getopts` crate
This commit deletes the in-tree `getopts` crate in favor of the crates.io-based
`getopts` crate. The main difference here is with a new builder-style API, but
otherwise everything else remains relatively standard.
2017-06-20 12:43:12 -07:00
Murarth 6484258f17 Reintroduce deprecated `collections` crate 2017-06-17 13:18:18 -07:00
bors 258ae6dd9b Auto merge of #42648 - murarth:merge-alloc-collections, r=alexcrichton
Merge crate `collections` into `alloc`

This is a necessary step in order to merge #42565
2017-06-15 12:37:54 +00:00
Murarth eadda7665e Merge crate `collections` into `alloc` 2017-06-13 23:37:34 -07:00
Marco Castelluccio 5c084fd8ed Add libprofiler_builtins to the list of paths for the rust-src component 2017-06-13 20:22:43 +01:00
Corey Farwell 2221f9c6b9 Rollup merge of #42306 - efyang:rls-packaging, r=alexcrichton
Add the RLS to .exe, .msi, and .pkg installers

This directly addresses issue #42157, adding the RLS as a non-default component in the mentioned installers. The windows installers appear to have the right functionality added, but I don't have a machine that runs OSX, so it would be great if someone could test whether my .pkg commit adds the RLS correctly. The final commit also fixes some formatting issues I'd noticed while working on the installers, but I don't know if that's within the scope of this PR, so input would be appreciated.
2017-06-01 00:09:24 -04:00
Edward Yang 7c362732dc Add RLS to .pkg installer 2017-05-29 21:50:23 -05:00
Edward Yang eeebfd667b Add RLS to .exe and .msi installers 2017-05-29 21:31:33 -05:00
Ralf Jung 6620c4b078 rust-src: include everything needed to compile libstd with jemalloc 2017-05-28 21:55:54 -07:00
bors a11c26f6ac Auto merge of #42109 - Keruspe:master, r=alexcrichton
rustbuild: don't create a source tarball when installing

This splits Install out of Dist as it is not a full dist anymore, and creates the source tarball only for the Dist command.
This will allow splitting install in a few rules if we want as it's done for other phases.
2017-05-27 11:23:45 +00:00
bors d86d134c38 Auto merge of #41932 - wesleywiser:py-to-rust, r=alexcrichton
Rewrite make-win-dist.py in Rust

Fixes #41568
2017-05-25 10:35:04 +00:00
Wesley Wiser 7eebabeb92 Create the bin dir 2017-05-22 21:32:27 -04:00
Marc-Antoine Perennou 150d644c21 rustbuild: split Install out of Dist subcommand
only create source tarball for the Dist subcommand
mark install rule as default for Kind::Install
split install-docs
split install-std
factor out empty_dir handling
split install-cargo
split install-analysis
split install-src
rework install-rustc
properly handle cross-compilation setups for install
use pkgname in install
split plain source tarball generation from rust-src dist
document src-tarball in config.toml.exmaple

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2017-05-22 22:10:12 +02:00
Marc-Antoine Perennou dda2d756fa rustbuild: fix bash completion installation dir
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2017-05-16 17:22:52 +02:00
Josh Stone 1e709fcff3 Don't use sanitize_sh with rust-installer
There's no shell interpreting the file paths under the new Rusty
rust-installer, so we don't need to use `sanitize_sh` for it.  Plus,
the drive-letter transformation is actually harmful for the now-native
Windows rust-installer to understand those paths.
2017-05-14 21:06:23 -07:00
Josh Stone 6edb4e22c4 Use "rust-installer tarball" to create rustc-src too
This gives us an extra rustc-src.tar.xz, which is 33% smaller than the .tar.gz!
2017-05-14 21:06:23 -07:00
Josh Stone 020c5ecca7 Update to the oxidized rust-installer 2017-05-14 21:06:23 -07:00
Wesley Wiser 173f6930ba Rewrite make-win-dist.py in Rust
Fixes #41568
2017-05-14 21:24:29 -04:00
Corey Farwell b14694071c Rollup merge of #41608 - cuviper:distcheck-rust-src, r=alexcrichton
Add a distcheck for rust-src completeness

This is for the last commit of #41546.  For some reason, @bors only saw the first two commits, and wouldn't approve the last even when explicitly directed so.

r? @alexcrichton
2017-04-29 23:44:28 -04:00
Alex Crichton 5daf557a77 Update stage0 bootstrap compiler
We've got a freshly minted beta compiler, let's update to use that on nightly!
This has a few other changes associated with it as well

* A bump to the rustc version number (to 1.19.0)
* Movement of the `cargo` and `rls` submodules to their "proper" location in
  `src/tools/{cargo,rls}`. Now that Cargo workspaces support the `exclude`
  option this can work.
* Updates of the `cargo` and `rls` submodules to their master branches.
* Tweak to the `src/stage0.txt` format to be more amenable for Cargo version
  numbers. On the beta channel Cargo will bootstrap from a different version
  than rustc (e.g. the version numbers are different), so we need different
  configuration for this.
* Addition of `dev` as a readable key in the `src/stage0.txt` format. If present
  then stage0 compilers are downloaded from `dev-static.rust-lang.org` instead
  of `static.rust-lang.org`. This is added to accomodate our updated release
  process with Travis and AppVeyor.
2017-04-29 12:11:14 -07:00
Ariel Ben-Yehuda 95c2f06162 Rollup merge of #41546 - cuviper:reduced-rust-src, r=alexcrichton
Shrink the rust-src component

Before this change, the installable rust-src component had essentially the same contents as the rustc-src dist tarball, just additionally wrapped in a rust-installer.  As discussed on [internals], rust-src is only meant to support uses for the standard library, so it doesn't really need the rest of the compiler sources.

Now rust-src only contains libstd and its path dependencies, which roughly matches the set of crates that have rust-analysis data.  The result is **significantly** smaller, from 36MB to 1.3MB compressed, and from 247MB to 8.5MB uncompressed.

[internals]: https://internals.rust-lang.org/t/minimizing-the-rust-src-component/5117
2017-04-26 22:11:08 +00:00
Josh Stone c5cd4cb51e Add a distcheck for rust-src completeness 2017-04-26 12:37:12 -07:00
Josh Stone b9bdb1766d Reduce the contents of the rust-src component 2017-04-25 16:13:46 -07:00
Josh Stone 7248f67f1b Build the rustc-src tarball before the rust-src component 2017-04-25 16:13:45 -07:00
Andrew Gaspar 70e673952e Adds rust-windbg.cmd script 2017-04-24 16:26:00 -07:00
Alex Crichton 13d008d1e8 Touch up rls integration
* Use the right version when building combined installer
* Update dependencies of rls as it depends on rustc and plugins
* Fix build-manifest and the versions it uses for the rls
2017-04-11 10:47:53 -07:00
Nick Cameron 5766d526a2 Remove --enable-save-analysis configure flag 2017-04-10 08:46:20 +12:00
Nick Cameron 223b280f31 Reviewer changes 2017-04-10 08:30:34 +12:00
Nick Cameron c55325e0f7 Build an RLS package as part of the dist target 2017-04-10 08:30:34 +12:00
Josh Stone e9cfc300a3 Only use cargo-vendor if building from git sources 2017-04-03 13:46:53 -07:00
Alex Crichton fe2b7a4952
rustbuild: Don't hardcode 'nightly' for Cargo
It now follows rustc release trains
2017-03-21 16:26:13 -04:00
bors 0aeb9c1297 Auto merge of #40383 - ishitatsuyuki:easy-dist-analysis, r=alexcrichton
rustbuild: Make save-analysis an option

This makes save-analysis an option independent from the release channel.

The CI build scripts have been modified to enable the flag.

*Merge with caution.* I haven't tested this, and this can cause nightly breakage.
2017-03-15 13:50:13 +00:00
Alex Crichton 8db566ee96 rustbuild: Fix a bug when manifesting with Cargo
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-11 09:30:51 -08:00
Tatsuyuki Ishi 5a88c7e5a1 rustbuild: Skip saving analysis when disabled 2017-03-11 20:00:06 +09:00
Tatsuyuki Ishi e31e264c55 rustbuild: Make save-analysis an option 2017-03-11 20:00:05 +09:00
Alex Crichton 3493d91a18 Test fixes and rebase conflicts 2017-03-10 20:05:06 -08:00
Alex Crichton c65996ea3b Don't put Cargo into the rustc workspace
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-10 14:49:19 -08:00
Alex Crichton 44a01b8a54 rustbuild: Add support for compiling Cargo
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-03-03 07:29:31 -08:00
bors ccd96c945f Auto merge of #39824 - alexcrichton:disable-dist-src, r=brson
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-16 08:20:29 +00:00
Alex Crichton 1902488228 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-15 18:07:16 -08:00
Shawn Walker-Salas 087c2337c1 use bash when invoking dist shell scripts on solaris
Partially fixes #25845
2017-02-15 12:51:26 -08:00
Eduard-Mihai Burtescu d29f0bc8fa Automatically vendor Cargo deps when building the source tarballs. 2017-02-14 01:52:03 +02:00
Corey Farwell a7017b582c Rollup merge of #39598 - alexcrichton:cargo-branch, r=brson
Fix branch name Cargo's downloaded from

This landed on beta in #39546 and this is bringing the patch back to master.
2017-02-08 23:55:45 -05:00
Alex Crichton 19bbd855ef Fix branch name Cargo's downloaded from
This landed on beta in #39546 and this is bringing the patch back to master.
2017-02-06 13:29:03 -08:00
Alex Crichton 9ad13c8d02 rustbuild: Fix a few locations with makefiles gone
* 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-06 08:44:27 -08:00
Alex Crichton 681bc5c66c rustbuild: Add x.py to source tarballs
We should be sure to add our build system entry point!

Closes #39476
2017-02-02 19:24:20 -08:00
Alex Crichton 45d203df30 travis: Tweak artifact uploads
* Don't upload `*.wixpdb` files by accident
* Don't upload `doc` dir by accident
* Fix level of indirection on Travis
2017-01-30 08:56:30 -08:00
Alex Crichton 9e8785f017 rustbuild: Add manifest generation in-tree
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-25 10:57:21 -08:00
Alex Crichton f3dfcae202 rustbuild: Start building --enable-extended
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-24 14:48:03 -08:00
Alex Crichton 318767266f travis: Start uploading artifacts on commits
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-12 15:29:04 -08:00
Alex Crichton 1a040b36cb rustbuild: Quickly `dist` cross-host compilers
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-04 11:41:16 -08:00
Wang Xuerui 24c7340e3e
rustbuild: fix dist-analysis with full bootstrap disabled 2017-01-02 04:12:49 +08:00
Alex Crichton d0881eaec7 rustbuild: Fix source tarballs and the vendor dir
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-30 09:36:22 -08:00
Wang Xuerui 8e38b2de42
rustbuild: package src only once for build triple 2016-12-20 21:43:59 +08:00
Alex Crichton bc06bbb401 rustbuild: Create directories in mingw dist
Previously we accidentally relied on the mingw dist step running last, but the
step just needed to ensure the directories were created.
2016-12-17 13:51:51 -08:00
Alex Crichton 194c3fb154 rustbuild: Don't dist docs if disabled
This commit skips the `docs` dist step if the `--disable-docs` flag is passed,
fixing a compile error seen on nightly.
2016-12-13 09:21:42 -08:00
Alex Crichton bbf2b70893 rustbuild: Skip some more non-relevant dist steps
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-13 09:17:33 -08:00
Alex Crichton 6cb8bbc3ff rustbuild: Fix dist of save-analysis info
We don't need an extra bare tarball, the save-analysis info is already produced
with a version/target in the filename.
2016-12-12 12:28:22 -08:00
Alex Crichton 5f07d3dea9 rustbuild: Check for .git as a dir
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-12 11:05:29 -08:00
Nick Cameron c49ba058a0 Create tar balls of save-analysis-api metadata for the standard libraries as part of `make dist`. 2016-12-09 08:37:42 -10:00
Alex Crichton d38db82b29 rustbuild: Implement distcheck
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-12-08 17:14:44 -08:00
Alex Crichton 5f626138a0 rustbuild: Allow configuration of python interpreter
Add a configuration key to `config.toml`, read it from `./configure`, and add
auto-detection if none of those were specified.

Closes #35760
2016-11-14 08:07:02 -08:00
Alex Crichton d17f0b0dd7 rustbuild: Optimize build times slightly
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-08 11:11:00 -07:00
Ahmed Charles a580f8f80d Install docs, std and rustc using results from dist. 2016-10-05 22:42:40 -07:00
Joseph Dunne 72da8b82c1 Add rustc version info (git hash + date) to dist tarball
fixes #32444
2016-09-03 13:34:21 +01:00
Diggory Blake 7341d68a40 Produce source package in rust-installer format in addition to vanilla tarball
Copy source files from rust code

Add missing wildcard

Remove unused function

Remove use of tar --transform
2016-08-12 18:13:18 +01:00
Alex Crichton 48a07bfb95 rustbuild: Remove the `build` directory
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/`.
2016-07-05 21:58:20 -07:00