about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2022-10-02re-add git-commit-hash file to tarballsdawnofmidnight-0/+7
rust-lang/rust#100557 removed the `git-commit-hash` file and replaced it with `git-commit-info`. However, build-manifest relies on the `git-commit-hash` file being present, so this adds it back.
2022-10-03Remove trailing whitespacesAnirudh-3/+3
2022-10-03Improve readability of bootstrap's README by adding commas and minor changesAnirudh-32/+32
(cherry picked from commit e5e4b85feba6463310d0fc0c27e8ff38891efac3)
2022-10-02Auto merge of #100557 - dawnofmidnight:tarball-commit-info, r=Mark-Simulacrumbors-47/+121
fix: use git-commit-info for version information Fixes #33286. Fixes #86587. This PR changes the current `git-commit-hash` file that `./x.py` dist puts in the `rustc-{version}-src.tar.{x,g}z` to contain the hash, the short hash, and the commit date from which the tarball was created, assuming git was available when it was. It uses this for reading the version so that rustc has all the appropriate metadata. # Testing Testing this is kind of a pain. I did it with something like ```sh ./x.py dist # ensure that `ignore-git` is `false` in config.toml cp ./build/dist/rustc-1.65.0-dev-src.tar.gz ../rustc-1.65.0-dev-src.tar.gz cd .. && tar -xzf rustc-1.65.0-dev-src && cd rustc-1.65.0-dev-src ./x.py build ``` Then, the output of `rustc -vV` with the stage1 compiler should have the `commit-hash` and `commit-date` fields filled, rather than be `unknown`. To be completely sure, you can use `rustc --sysroot` with the stdlib that the original `./x.py dist` made, which will require that the metadata matches.
2022-10-02Make the `config.src` handling for downloadable bootstrap a little more ↵Joshua Nelson-1/+10
conservative In particular, this supports build directories within an unrelated git repository. As a side effect, it will fall back to the old logic when the source directory is being built from a tarball within an unrelated git repository. However, that second case is unsupported and untested; we reserve the right to break it in the future.
2022-10-02Auto merge of #102558 - matthiaskrgr:rollup-0odec1c, r=matthiaskrgrbors-2/+5
Rollup of 6 pull requests Successful merges: - #102195 (Improve the COPYRIGHT file) - #102313 (Update docs so that deprecated method points to relevant method) - #102353 (Allow passing rustix_use_libc cfg using RUSTFLAGS) - #102405 (Remove a FIXME whose code got moved away in #62883.) - #102525 (rustdoc: remove orphaned link on array bracket) - #102557 (fix issue with x.py setup running into explicit panic) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-10-02Rollup merge of #102557 - Joshument:master, r=jyn514Matthias Krüger-2/+3
fix issue with x.py setup running into explicit panic Fixes problem with [Issue #102555](https://github.com/rust-lang/rust/issues/102555) causing `x.py` setup to fail. Simply requires `rustfmt` be downloaded a little later.
2022-10-02Rollup merge of #102353 - bjorn3:allow_rustix_use_libc, r=Mark-SimulacrumMatthias Krüger-0/+2
Allow passing rustix_use_libc cfg using RUSTFLAGS Before this would error with ``` error: unexpected `rustix_use_libc` as condition name | = note: `-D unexpected-cfgs` implied by `-D warnings` = help: was set with `--cfg` but isn't in the `--check-cfg` expected names ``` I'm setting rustix_use_libc when testing bootstrapping rustc with cg_clif as I'm disabling inline asm here.
2022-10-01fix issue with x.py setup running into explicit panicJoshument-2/+3
2022-10-01Auto merge of #102193 - ferrocene:pa-remote-test-server-improvements, ↵bors-0/+2
r=Mark-Simulacrum Change argument handling in `remote-test-server` and add new flags This PR updates `remote-test-server` to add two new flags: * `--sequential` disables parallel test execution, accepting one connection at the time instead. We need this for Ferrocene as one of our emulators occasionally deadlocks when running multiple tests in parallel. * `--bind <ip:port>` allows customizing the IP and port `remote-test-server` binds to, rather than using the default value. While I was changing the flags, and [after chatting on what to do on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/remote-test-server.20flags), I took this opportunity to cleanup argument handling in `remote-test-server`, which is a breaking change: * The `verbose` argument has been renamed to the `--verbose` flag. * The `remote` argument has been removed in favor of the `--bind 0.0.0.0:12345` flag. The only thing the argument did was to change the bound IP to 0.0.0.0, which can easily be replicated with `--bind` and also is not secure as our "remote" default. I'm also open to keep the old arguments with deprecation warnings. r? `@Mark-Simulacrum`
2022-10-01fix: use git-commit-info for version informationdawnofmidnight-47/+121
This PR adds support for fetching version information from the `git-commit-info` file when building the compiler from a source tarball.
2022-10-01Package `rust-docs-json` into nightly components (take 3)Joshua Nelson-0/+1
`dist` creates a `rust-docs-json.tar.xz` tarfile. But build-manifest expected it to be named `rust-docs-json-preview.tar.xz`. Change build-manifest to allow the name without the `-preview` suffix. This also adds `rust-docs-json` to the `rust` component. I'm not quite sure why it exists, but rustup uses it to determine which components are available.
2022-10-01Auto merge of #101969 - reez12g:issue-101306, r=reez12gbors-0/+2
Make fmt downloaded on every invocation of bootstrap Fixes https://github.com/rust-lang/rust/issues/101306
2022-10-01Add a comment to downloading fmt statementRento Ezoe-0/+1
Co-authored-by: Joshua Nelson <github@jyn.dev>
2022-09-29Auto merge of #101833 - jyn514:cross-compile-compiler-builtins, ↵bors-22/+29
r=Mark-Simulacrum Make the `c` feature for `compiler-builtins` an explicit opt-in Its build script doesn't support cross-compilation. I tried fixing it, but the cc crate itself doesn't appear to support cross-compiling to windows either unless you use the -gnu toolchain: ``` error occurred: Failed to find tool. Is `lib.exe` installed? ``` Fixes https://github.com/rust-lang/rust/issues/101172.
2022-09-28Make the `c` feature for `compiler-builtins` opt-in instead of inferredJoshua Nelson-22/+29
The build script for `compiler_builtins` doesn't support cross-compilation. I tried fixing it, but the cc crate itself doesn't appear to support cross-compiling to windows either unless you use the -gnu toolchain: ``` error occurred: Failed to find tool. Is `lib.exe` installed? ``` Rather than trying to fix it or special-case the platforms without bugs, make it opt-in instead of automatic.
2022-09-27Allow passing rustix_use_libc cfg using RUSTFLAGSbjorn3-0/+2
Before this would error with ``` error: unexpected `rustix_use_libc` as condition name | = note: `-D unexpected-cfgs` implied by `-D warnings` = help: was set with `--cfg` but isn't in the `--check-cfg` expected names ``` I'm setting rustix_use_libc when testing bootstrapping rustc with cg_clif as I'm disabling inline asm here.
2022-09-26fix check_cfgPietro Albini-0/+1
2022-09-26Make fmt downloaded on every invocation of bootstrapreez12g-0/+1
2022-09-26Rollup merge of #102267 - jyn514:smaller-build-script, r=Mark-Simulacrumfee1-dead-36/+0
Don't set RUSTC in the bootstrap build script We no longer use this for anything since https://github.com/rust-lang/rust/pull/98483/files#diff-7eddc76f1be9eca2599a9ae58c65ffe247fbdff9b02ef687439894cab9afe749L781. Remove it, so that we spuriously rebuild bootstrap fewer times on Windows (where PATH changes often). Helps with https://github.com/rust-lang/rust/issues/92369. cc https://github.com/rust-lang/rust/pull/102266 r? ``@Mark-Simulacrum``
2022-09-26Rollup merge of #102178 - RalfJung:bootstrap-backtrace, r=Mark-Simulacrumfee1-dead-3/+2
bootstrap: the backtrace feature is stable, no need to allow it any more
2022-09-25Don't set RUSTC in the bootstrap build scriptJoshua Nelson-36/+0
We no longer use this for anything since https://github.com/rust-lang/rust/pull/98483/files#diff-7eddc76f1be9eca2599a9ae58c65ffe247fbdff9b02ef687439894cab9afe749L781. Remove it, so that we spuriously rebuild bootstrap fewer times on Windows (where PATH changes often).
2022-09-25Support overriding initial rustc and cargo pathsMark Rousskov-6/+8
This restores functionality broken by #98483. Unfortunately, it doesn't add a test to verify this works, but in this case we notice pretty quickly as perf uses this functionality and so reports breakage immediately after merging.
2022-09-24Auto merge of #98483 - dvtkrlbs:bootstrap-dist, r=jyn514bors-18/+101
Distribute bootstrap in CI This pre-compiles bootstrap from source and adds it to the existing `rust-dev` component. There are two main goals here: 1. Make it faster to build rust from source, both the first time and incrementally 2. Make it easier to add non-python entrypoints, since they can call out to bootstrap directly rather than having to figure out the right flags to pre-compile it. This second part is still in a bit of flux, see the tracking issue below for more information. There are also several changes to make bootstrap able to run on a machine other than the one it was built (particularly around `config.src` and `config.out` detection). I (`@jyn514)` am slightly concerned these will regress unless tested - maybe we should add an automated test that runs bootstrap in a chroot or something? Unclear whether the effort is worth the test coverage. Helps with https://github.com/rust-lang/rust/issues/94829.
2022-09-24Move style guide to rust-lang/rustJosh Triplett-0/+2
Per [RFC 3309](https://rust-lang.github.io/rfcs/3309-style-team.html).
2022-09-24Copy `bootstrap.exe` on Windows, not `bootstrap`Joshua Nelson-1/+1
2022-09-24Rollup merge of #102226 - RalfJung:miri-sysroot-build, r=oli-obkMatthias Krüger-1/+1
bootstrap/miri: switch to non-deprecated env var for setting the sysroot folder r? `@oli-obk`
2022-09-24bootstrap/miri: switch to non-deprecated env var for setting the sysroot folderRalf Jung-1/+1
2022-09-24Rollup merge of #102176 - ojeda:add-llvm-dis-to-ci-llvm, r=Mark-SimulacrumMatthias Krüger-1/+2
Add `llvm-dis` to the set of tools in `ci-llvm` The LLVM disassembler is needed for the test introduced in https://github.com/rust-lang/rust/pull/97550. Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2022-09-24Rollup merge of #102175 - oli-obk:miri_subtree_cleanup, r=jyn514Matthias Krüger-22/+22
Also require other subtrees to always build successfully r? ``@jyn514``
2022-09-23add changelog lines for the remote-test-server changesPietro Albini-0/+2
2022-09-23bootstrap: the backtrace feature is stable, no need to allow it any moreRalf Jung-3/+2
2022-09-23Add `llvm-dis` to the set of tools in `ci-llvm`Miguel Ojeda-1/+2
The LLVM disassembler is needed for the test introduced in https://github.com/rust-lang/rust/pull/97550. Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2022-09-23Also require other subtrees to always build successfullyOli Scherer-22/+22
2022-09-23Rollup merge of #102042 - LukeMathWalker:add-rust-json-docs-to-rustup, ↵Matthias Krüger-10/+4
r=Mark-Simulacrum Distribute rust-docs-json via rustup. I am not 100% sure on how to treat `rust-json-docs` in `target_host_combination`. I went along with a similar strategy to the one used for `rust-docs`, but looking for guidance there.
2022-09-22Distribute rust-json-docs via rustup.Luca Palmieri-10/+4
2022-09-22Auto merge of #102028 - oli-obk:miri_subtree, r=oli-obkbors-173/+126
Make miri a subtree instead of a submodule r? `@RalfJung` fixes #101867 fixes https://github.com/rust-lang/rust/issues/100134
2022-09-22Allow miri docs to keep failing for nowOli Scherer-1/+1
2022-09-21miri is not in toolstate any moreRalf Jung-1/+0
2022-09-21HACK: Treat miri as if it were a submoduleOli Scherer-1/+3
2022-09-21Remove miri from the submodule list and require it for CI to passOli Scherer-174/+126
2022-09-21Rollup merge of #89891 - ojeda:modular-alloc, r=Mark-SimulacrumDylan DPC-0/+2
`alloc`: add unstable cfg features `no_rc` and `no_sync` In Rust for Linux we are using these to make `alloc` a bit more modular. See https://github.com/rust-lang/rust/pull/86048 and https://github.com/rust-lang/rust/pull/84266 for similar requests. Of course, the particular names are not important.
2022-09-20Update src/bootstrap/config.rsTuna-0/+1
Co-authored-by: Joshua Nelson <github@jyn.dev>
2022-09-20Update src/bootstrap/config.rsTuna-1/+8
Co-authored-by: Bruno Kolenbrander <59372212+mejrs@users.noreply.github.com>
2022-09-20fix #102002, Delete the stage1 and stage0-sysroot directories when using ↵yukang-4/+12
download-rustc
2022-09-19Auto merge of #101799 - LukeMathWalker:distribute-json-doc, r=jyn514bors-62/+219
Distribute json doc # Overview We add a new component, `rust-json-docs`, to distribute the JSON version of rustdoc's output for public compiler crates (i.e. `std`, `alloc`, `proc_macro`, `core` and `test`). As discussed in #101383, we do not bundle this up as part of the existing `rust-docs` component since `rustdoc`'s JSON format is still unstable. # Open questions / Doubts I tried my best, but I never touched this codebase and I couldn't find much documentation on how `dist` works - I pattern-matched existing code, which might have led to some non-sensical choices in the eyes of people more familiar with the codebase. In particular, I am not sure if my choice of adding a new config flag is appropriate or if the decision to build/not build the JSON docs is more appropriately gated by one of the existing flags. Any suggestion is more than welcome. Closes #101383
2022-09-18Rollup merge of #101923 - jsha:aux-pages-no-rustdoc-css, r=Mark-SimulacrumMatthias Krüger-8/+2
Don't add rustdoc's CSS to other doc pages This was originally added so those doc pages could use the same font files, but it turns out to be fragile. And those doc pages are just stubs that link to other pages, so they don't need fancy fonts. Before: ![Screenshot from 2022-09-16 16-45-44](https://user-images.githubusercontent.com/220205/190831650-b626ee66-046a-4b71-8e57-dd06872359db.png) After: ![Screenshot from 2022-09-16 16-52-06](https://user-images.githubusercontent.com/220205/190831657-f7d10a3f-d8c0-48a3-b30d-666db5a50563.png) Demo of all affected pages: https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/complement-design-faq.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/complement-lang-faq.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/complement-project-faq.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/grammar.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/guide-crates.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/guide-error-handling.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/guide-ffi.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/guide-macros.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/guide.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/guide-ownership.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/guide-plugins.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/guide-pointers.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/guide-strings.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/guide-tasks.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/guide-testing.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/guide-unsafe.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/index.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/intro.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/not_found.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/reference.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/rustdoc.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/rust.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/tutorial.html Prior art: https://github.com/rust-lang/rust/pull/86663
2022-09-17Auto merge of #101949 - matthiaskrgr:rollup-xu5cqnd, r=matthiaskrgrbors-38/+5
Rollup of 7 pull requests Successful merges: - #101093 (Initial version of 1.64 release notes) - #101713 (change AccessLevels representation) - #101821 (Bump Unicode to version 15.0.0, regenerate tables) - #101826 (Enforce "joined()" and "joined_with_noop()" test) - #101835 (Allow using vendoring when running bootstrap from outside the source root) - #101942 (Revert "Copy stage0 binaries into stage0-sysroot") - #101943 (rustdoc: remove unused CSS `.non-exhaustive { margin-bottom }`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-09-17Rollup merge of #101942 - Mark-Simulacrum:fix-perf, r=jyn514Matthias Krüger-37/+0
Revert "Copy stage0 binaries into stage0-sysroot" This reverts PR #101711. The PR broke the rustc/bootstrap benchmark on rustc-perf, I believe due to the assumption that the stage0 directory exists. Fixing that by just skipping this logic might be reasonable, but I think there's a larger discussion to be had around the right behavior when we don't have a single bin/ directory (when rustc= and cargo= are specified in config.toml). I think it's potentially reasonable to put those binaries (cargo, rustc, rustfmt?) into the bin directory, but for now just want to get us back to a healthy state. r? `@jyn514` (but would appreciate review from others as this is just a direct revert).
2022-09-17Rollup merge of #101835 - jyn514:fix-vendoring, r=Mark-SimulacrumMatthias Krüger-1/+5
Allow using vendoring when running bootstrap from outside the source root Fixes https://github.com/rust-lang/rust/issues/100364.