about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2020-10-13Handle included config in bootstrap.pyAntoine Martin-0/+10
2020-10-13Implement "if-available" option for download-ci-llvmAntoine Martin-4/+22
2020-10-13 Give an error when running `x.py test --stage 0 src/test/ui`Joshua Nelson-0/+9
2020-10-13Auto merge of #77762 - pietroalbini:dist-build-manifest, r=Mark-Simulacrumbors-23/+98
Dist build manifest This PR makes two changes that should remove a significant chunk of the time spent in our release process: cloning the `rust-lang/rust` monorepo, all its submodules, and building `bootstrap` to then invoke `build-manifest`: * `build-manifest` doesn't rely on a clone of the monorepo being present anymore. The only remaining bit of information it fetched from it (the Rust version) is instead bundled in the binary. * A new "component" is added, `build-manifest`. That component includes a prebuilt version of the tool, and it's *not* included in the Rustup manifest. This will allow `promote-release` to directly invoke the tool without interacting with our build system. * The Linux x86_64 CI is changed to also build the component mentioned above. It's the only CI builder tasked to do so, and to cleanly support this a new `--include-default-paths` flag was added to `./x.py`. * The `BUILD_MANIFEST_NUM_THREADS` environment variable is added to configure the number of threads at runtime. This PR is best reviewed commit-by-commit. r? `@Mark-Simulacrum`
2020-10-12Include `llvm-dis`, `llc` and `opt` in `llvm-tools-preview` componentAaron Hill-0/+3
Fixes #55890 It's useful to have `llc` and `opt` available when debugging an LLVM miscompilation,.
2020-10-13Rollup merge of #77852 - 12101111:fix-bootstrap-doc, r=jonas-schievinkYuki Okushi-3/+3
update url in bootstrap README (gcc-rs -> cc-rs) gcc-rs is renamed to cc-rs 3 years ago.
2020-10-13Rollup merge of #77746 - winnayx:issue-77572-fix, r=jyn514Yuki Okushi-7/+10
Fix `x.py setup` sets `changelog-seen` Fixes #77572 by setting changelog-seen in setup.rs
2020-10-12build-manifest: bundle the rustc version in the binaryPietro Albini-2/+0
2020-10-12bootstrap: add --include-default-paths to ./x.pyPietro Albini-21/+30
2020-10-12bootstrap: add disabled by default build-manifest dist componentPietro Albini-0/+68
2020-10-12build-manifest: accept the Rust version instead of the monorepo pathPietro Albini-2/+2
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-12update url in bootstrap README12101111-3/+3
2020-10-11Mostly print statements to see where things areWinnie Xiao-7/+10
More print statementsstatements lol Solved the basic case of eliminating check_version ifk_version if subcommand = setup Finished v1 checking out old bootstrap.py checked out old irrelevant files fixed tidy Moved VERSION from bin/main.rs to lib.rs Fixed semicolon return issue x.py fmt
2020-10-11bootstrap: only use compiler-builtins-c if they existGeorge Burgess IV-5/+5
The assignment of `features` above was added in rust-lang#60981, but never used. Presumably the intent was to replace the string literal here with it. While I'm in the area, `compiler_builtins_c_feature` doesn't need to be a `String`.
2020-10-10Mention rustdoc in `x.py setup`Joshua Nelson-2/+2
This also allows 'rustdoc' as a string for the compiler profile.
2020-10-10Allow setting up git hooks from other worktreesJoshua Nelson-3/+11
2020-10-09bootstrap: always use the Rust version in package namesPietro Albini-52/+1
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-08Auto merge of #77631 - jyn514:helpful-changelog, r=RalfJungbors-3/+3
Make src/bootstrap/CHANGELOG.md more helpful Addresses https://github.com/rust-lang/rust/commit/fe6fc555acd51bd7ba8755d9fbc7060feb67be25#r42949241. r? `@RalfJung` cc `@Mark-Simulacrum`
2020-10-06Make src/bootstrap/CHANGELOG.md more helpfulJoshua Nelson-3/+3
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.