about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2020-10-07Rollup merge of #77624 - akoptelov:c-all-targets-fix, r=jyn514Dylan DPC-1/+1
Add c as a shorthand check alternative for new options #77603 There is a missing "c" that is a shorthand for "check" in newly added match arm for handling check-specific options.
2020-10-07Rollup merge of #77400 - alarsyo:xpy-setup-suggestions, r=jyn514Dylan DPC-38/+81
Fix suggestions for x.py setup #76631 introduced a new `setup` command to x.py By default the command prompts for a profile to use: ``` Welcome to the Rust project! What do you want to do with x.py? a) Contribute to the standard library b) Contribute to the compiler c) Contribute to the compiler, and also modify LLVM or codegen d) Install Rust from source ``` and then displays command suggestions, depending on which profile was chosen. However [the mapping between chosen profile](https://github.com/rust-lang/rust/blob/9cba260df0f1c67ea3690035cd5611a7465a1560/src/bootstrap/setup.rs#L75-L85) and [suggestion](https://github.com/rust-lang/rust/blob/9cba260df0f1c67ea3690035cd5611a7465a1560/src/bootstrap/setup.rs#L42-L47) isn't exact, leading to suggestions not being shown if the user presses `c` or `d`. (because "c" is translated to "llvm" and "d" to "maintainer", but suggestions trigger for "codegen" and "user" respectively) A more thorough refactor would stop using "strings-as-type" to make sure this kind of error doesn't happen, but it may be overkill for that kind of "script" program? Tagging the setup command author: @jyn514
2020-10-06Add c as a shorthand check alternative for new options #77603Alexander Koptelov-1/+1
2020-10-06Auto merge of #76356 - caass:hooks, r=jyn514bors-1/+48
Add a command to install a git hook to automatically run `x.py test tidy --bless` Some folks (such as myself) would probably find a lot of convenience in a pre-commit hook that automatically runs tidy before committing, to avoid burning CI time learning that your commit wasn't tidy. I'm absolutely positive I have missed some stuff. I basically just got this to where you can run `./x.py run install-git-hook` and then clicked the commit button. Please let me know what else you'd like me to add before this can be merged! [rustc-dev-guide companion PR](https://github.com/rust-lang/rustc-dev-guide/pull/848)
2020-10-06Use String type for Profile parse errorAntoine Martin-11/+6
2020-10-06Show available profiles on errorAntoine Martin-1/+12
2020-10-06Use Profile enum for x.py setupAntoine Martin-38/+75
2020-10-06Fix suggestions for x.py setupAntoine Martin-2/+2
2020-10-06Rollup merge of #77558 - thomcc:defaults-toml-extension, r=jyn514Yuki Okushi-3/+5
Rename bootstrap/defaults/{config.toml.PROFILE => config.PROFILE.toml} This allows these files to have okay syntax highlighting in editors, and helps avoid nagging from editors which want to suggest that I install a plugin for `*.library` files to view the `config.toml.library` or whatever. It's a very minor change. r?@jyn514
2020-10-05Make changes based on @jyn514's commentsCassandra Fridkin-9/+16
2020-10-05Add install_git_hook_maybe to setup.rsCassandra Fridkin-0/+40
2020-10-05Remove the rust stuff and just make it a simple shell scriptCassandra Fridkin-25/+1
It's ok, now I'm writing enough Rust that i'm able to get my fix elsewhere
2020-10-05Merge branch 'master' into hooksCassandra Fridkin-471/+1345
2020-10-04Add changelog entry mentioning the renamed profile filesThom Chiovoloni-0/+2
2020-10-04Rename bootstrap/defaults/{config.toml.PROFILE => config.PROFILE.toml}Thom Chiovoloni-3/+3
2020-10-05Rollup merge of #77407 - pietroalbini:less-build-manifest, r=Mark-SimulacrumDylan DPC-2/+45
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-04Rollup merge of #77473 - Mark-Simulacrum:check-limited, r=ecstatic-morseYuki Okushi-33/+50
Make --all-targets in x.py check opt-in In particular due to #76822, making this the default is currently suboptimal. r? @ecstatic-morse
2020-10-03Add quotes around command in CHANGELOGecstatic-morse-1/+1
2020-10-03Place all-targets checking behind a flagMark Rousskov-33/+50
This matches Cargo behavior and avoids the (somewhat expensive) double checking, as well as the unfortunate duplicate error messages (#76822, rust-lang/cargo#5128).
2020-10-03Auto merge of #77347 - jyn514:dox, r=Amanieubors-7/+0
Remove --cfg dox from rustdoc.rs This was added in https://github.com/rust-lang/rust/pull/53076 because several dependencies were using `cfg(dox)` instead of `cfg(rustdoc)` (now `cfg(doc)`). I ran `rg 'cfg\(dox\)'` on the source tree with no matches, so I think this is now safe to remove. r? `@Mark-Simulacrum` cc `@QuietMisdreavus` :)
2020-09-30Auto merge of #77298 - jyn514:bootstrap-config, r=Mark-Simulacrumbors-5/+7
Don't warn if the config file is somewhere other than `config.toml` Previously, `config.config` was always hardcoded as `"config.toml"`. I thought that it was being overridden with the actual value later, but it turns out `flags.config` was being completely discarded. This keeps `config.config` in sync with `flags.config`. Fixes https://github.com/rust-lang/rust/issues/77293 r? `@Mark-Simulacrum` cc `@davidtwco`
2020-09-30build-manifest: keep legacy behavior when invoking through ./x.py distPietro Albini-0/+1
2020-09-30bootstrap: add ./x.py run src/tools/build-manifestPietro Albini-2/+44
2020-09-30Auto merge of #77133 - tmandry:bootstrap-host, r=Mark-Simulacrumbors-71/+37
bootstrap: Always build for host, even when target is given This changes the behavior from *not* building for host whenever an explicit target is specified. I find this much less confusing. You can still disable host steps by passing an explicit empty list for host. Fixes #76990. r? `@Mark-Simulacrum`
2020-09-29Filter out empty items in bootstrap::flags::splitTyler Mandry-1/+1
2020-09-29Remove unused --cfg stageNJoshua Nelson-3/+0
2020-09-29Remove --cfg dox from rustdoc.rsJoshua Nelson-4/+0
This was added in https://github.com/rust-lang/rust/pull/53076 because several dependencies were using `cfg(dox)` instead of `cfg(rustdoc)`. I ran `rg 'cfg\(dox\)'` on the source tree with no matches, so I think this is now safe to remove.
2020-09-29Auto merge of #77145 - pietroalbini:refactor-build-manifest-versions, ↵bors-8/+2
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-28Bump bootstrap version and update changelogTyler Mandry-2/+11
2020-09-28Remove skip_only_host_stepsTyler Mandry-58/+23
And make tests explicitly list their hosts and targets.
2020-09-28bootstrap: Always build for host, even when target is givenTyler Mandry-17/+9
This changes the behavior from *not* building for host whenever an explicit target is specified. I find this much less confusing. You can still disable host steps by passing an explicit empty list for host. Fixes #76990.
2020-09-28Don't warn if the config file is somewhere other than `config.toml`Joshua Nelson-5/+7
Previously, `config.config` was always hardcoded as `"config.toml"`. I thought that it was being overridden with the actual value later, but it turns out `flags.config` was being completely discarded. This keeps `config.config` in sync with `flags.config`.
2020-09-28Auto merge of #77008 - fortanix:raoul/lvi-tests, r=Mark-Simulacrumbors-2/+8
LVI hardening tests Mitigating the speculative execution LVI attack against SGX enclaves requires compiler changes (i.e., adding lfences). This pull requests adds various tests to check if this happens correctly.
2020-09-27reduce overlong lineTshepang Lekhonkhobe-1/+2
2020-09-26Rollup merge of #76631 - jyn514:x.py-setup, r=Mark-SimulacrumRalf Jung-8/+152
Add `x.py setup` Closes #76503. - Suggest `x.py setup` if config.toml doesn't exist yet - Prompt for a profile if not given on the command line - Print the configuration that will be used - Print helpful starting commands after setup - Link to the dev-guide after finishing
2020-09-25Rollup merge of #77146 - Mark-Simulacrum:xpyinstall, r=alexcrichtonJonas Schievink-1/+1
Install std for non-host targets It seems reasonable that when configuring various targets you'd expect all of them to get std installed, even if you're not building compiler toolchains for each of those. cc #76990 r? @alexcrichton
2020-09-25Rollup merge of #77126 - Mark-Simulacrum:llvm-less-often, r=alexcrichtonJonas Schievink-2/+13
Invalidate local LLVM cache less often This avoids a download of LLVM after every rebase. The downside to this is that if we land some patch affecting LLVM built in CI that breaks this option, but that PR does not update the LLVM submodule, we'll likely not notice until the next update -- but this seems unlikely to happen in practice and I am not personally worried about it. r? @alexcrichton
2020-09-25Rollup merge of #77120 - ecstatic-morse:keep-stage-std, r=Mark-SimulacrumJonas Schievink-2/+26
Add `--keep-stage-std` to `x.py` for keeping only standard library artifacts Unlike `--keep-stage 0`, `--keep-stage-std 0` will allow the stage 0 compiler artifacts (i.e., stage1/bin/rustc) to be rebuilt if it has changed. This allows contributors to iterate on later stages of the compiler in tandem with the standard library without needing to to rebuild the entire compiler. I often run into this when working on const-checking, since I may need to add a feature gate or make a small tweak to the standard library.
2020-09-25Rollup merge of #77106 - matthiaskrgr:changelog_seen, r=Mark-SimulacrumJonas Schievink-1/+1
clarify that `changelog-seen = 1` goes to the beginning of config.toml Fixes #77105
2020-09-25Rollup merge of #77086 - ehuss:src-libunwind, r=Mark-SimulacrumJonas Schievink-1/+1
Include libunwind in the rust-src component. Some targets, such as musl, need the libunwind source to build the unwind crate (referenced [here](https://github.com/rust-lang/rust/blob/0da58007451a154da2480160429e1604a1f5f0ec/library/unwind/build.rs#L142)). Fixes rust-lang/wg-cargo-std-aware#59
2020-09-25Patch compilation test helpers for sgx platformRaoul Strackx-2/+8
2020-09-24Add `x.py setup`Joshua Nelson-8/+152
- Suggest `x.py setup` if config.toml doesn't exist yet (twice, once before and once after the build) - Prompt for a profile if not given on the command line - Print the configuration file that will be used - Print helpful starting commands after setup - Link to the dev-guide after finishing - Note that distro maintainers will see the changelog warning
2020-09-24Install std for non-host targetsMark Rousskov-1/+1
2020-09-23Add entry to CHANGELOG for `--keep-stage-std`Dylan MacKenzie-0/+4
2020-09-23Remove warning about possible future deprecationDylan MacKenzie-4/+0
2020-09-23Re-download LLVM on submodule updates onlyMark Rousskov-2/+13
2020-09-23Add `keep-stage-std` to `x.py`Dylan MacKenzie-2/+26
This keeps only the `std` artifacts compiled by the given stage, not the compiler. This is useful when working on the latter stages of the compiler in tandem with the standard library, since you don't have to rebuild the *entire* compiler when the standard library changes.
2020-09-23clarify that `changelog-seen = 1` goes to the beginning of config.tomlMatthias Krüger-1/+1
Fixes #77105
2020-09-23Auto merge of #76864 - est31:downloaded_llvm_no_clone_sources, r=Mark-Simulacrumbors-2/+3
Don't download/sync llvm-project submodule if download-ci-llvm is set llvm-project takes > 1GB storage space and a long time to download. It's better to not download it unless needed.
2020-09-22Include libunwind in the rust-src component.Eric Huss-1/+1