summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2023-03-18Create dir for build_tripleMu001999-0/+1
2023-02-14Bring tests back into rustc source tarballTomasz Miąsko-1/+1
They were missing after recent move from src/test to tests.
2023-01-21Rollup merge of #107015 - cuviper:ra-riscv64, r=Mark-SimulacrumMichael Goulet-6/+0
Re-enable building rust-analyzer on riscv64 It was disabled in #75103 due to an LLVM bug, but followup comments have confirmed that it builds fine on Fedora with LLVM 15. r? ```@Mark-Simulacrum``` cc ```@matklad``` ```@davidlt```
2023-01-18Auto merge of #105716 - chriswailes:ndk-update-redux, r=pietroalbinibors-6/+18
Ndk update redux Blocked on https://github.com/rust-lang/blog.rust-lang.org/pull/1055
2023-01-17Re-enable building rust-analyzer on riscv64Josh Stone-6/+0
It was disabled in #75103 due to an LLVM bug, but followup comments have confirmed that it builds fine on Fedora with LLVM 15.
2023-01-14Auto merge of #106520 - ehuss:update-mdbook, r=Mark-Simulacrumbors-18/+102
Update mdbook This updates mdbook from 0.4.21 to 0.4.25. The list of changes is [here](https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0425). The only user-visible changes are some changes around the theme picker, and change to the copy-to-clipboard ignoring hidden lines. Internally there were some dependency updates and small fixes. This also updates `clap` from 4.0.15 to 4.0.32 whose changelog is [here](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md#4032---2022-12-22). This impacts tools like cargo. I don't see anything particularly noteworthy there, though there are some small user-visible changes. Unfortunately this required adding a hack for building `rustix` with a bootstrap tool. The comment explains why. I am unable to think of some other workaround (or even a cleaner way to set the rustflag). Ideas are welcome if you can think of alternatives. I'm struggling to even think of a long-term solution, other than asking projects not to do auto-nightly feature detection. One medium-term solution is to avoid the clap dependency for the mdbook library (which is how rustix gets pulled in). That is one of my goals for the 0.5 release of mdbook, but that probably won't happen until later this year. It would also require dropping clap from `rustbook` and using some other means to parse arguments (there's only two options, so it can probably be done manually).
2023-01-11Revert "warn newer available version of the x tool"J Haigh-1/+2
2023-01-11Change `src/test` to `tests` in source files, fix tidy and testsAlbert Larsan-56/+48
2023-01-09Update mdbookEric Huss-18/+102
2023-01-10Rollup merge of #106387 - jyn514:clippy, r=Mark-SimulacrumYuki Okushi-14/+41
Revert "bootstrap: Get rid of `tail_args` in `stream_cargo`" This reverts commit 9dfe50440e6d48bd2fd40a4b7b3992998e55eace. (Note: that merged as part of https://github.com/rust-lang/rust/pull/106305, but https://github.com/rust-lang/rust/pull/106305/ contains more commits than just 9dfe50440e6d48bd2fd40a4b7b3992998e55eace.) Fixes `x clippy`. It turns out `clippy` was the only one using `tail_args` 🤦 sorry for not testing this earlier. r? `@Mark-Simulacrum`
2023-01-08Rollup merge of #106457 - kadiwa4:no-bless, r=Mark-SimulacrumYuki Okushi-2/+2
Adjust comments about pre-push.sh hook Follow-up to #101175.
2023-01-06Auto merge of #106415 - Nilstrieb:where-is-my-master-branch, r=jyn514bors-75/+62
Handle non-existent upstream master branches in `x fmt` People who do have a remote for `rust-lang/rust` but don't have the master branch checked out there used to get this error when running `x fmt`: > fatal: ambiguous argument 'rust/master': unknown revision or path not in the working tree. > Use '--' to separate paths from revisions, like this: > 'git <command> [<revision>...] -- [<file>...]' > rust/master Which is not exactly helpful. Now, we fall back to `origin/master` (hoping that at least that remote exists) for that case. If there is still some error, we just fall back to `x fmt .` and print a warning. r? `@jyn514`
2023-01-06Handle non-existant upstream master branches in `x fmt`Nilstrieb-17/+52
2023-01-05Add vendor to Fuchsia's target tripleDavid Koloski-2/+2
Historically, Rust's Fuchsia targets have been labeled x86_64-fuchsia and aarch64-fuchsia. However, they should technically contain vendor information. This CL changes Fuchsia's target triples to include the "unknown" vendor since Clang now does normalization and handles all triple spellings. This was previously attempted in #90510, which was closed due to inactivity.
2023-01-04adjust comments about pre-push.sh hookKaDiWa-2/+2
2023-01-04Rollup merge of #106396 - jyn514:bump-stage-date, r=pietroalbiniMatthias Krüger-0/+1
Allow passing a specific date to `bump-stage0` This allows regenerating `src/stage0.json` on changes to the tool, without needing to hard-code the date in the source. It was useful for https://github.com/rust-lang/rust/pull/106394, which added clippy to the list of required components. r? `@pietroalbini`
2023-01-03Rollup merge of #104748 - lqd:download_lld, r=jyn514Michael Goulet-10/+26
Ensure `lld` is supported with `download-ci-llvm` This PR: - ensures LLD's step in bootstrap's dist, but it's not strictly necessary since dist will already package it when it's present. - makes bootstrap's `native::LLD` step support using the packaged `ci-llvm/bin/lld`, instead of building it from source (which would most likely not be available today, nor in the future where `download-ci-llvm = if-available` is the default). If I understand correctly, `--enable-full-tools` will also enable `rust.lld`, and this is why LLD is already packaged today in the `rust-dev` component on the main targets (and why `-Zgcc-ld=lld` does work there). That means it's likely that this PR will not be able to land before I've reworked and landed #101792: if LLD is available in `download-ci-llvm`, the `needs-rust-lld` tests should start being executed on the x64 macOS test builders, and CI would fail today. I've tested locally that building with `download-ci-llvm = true` and `lld = true` with the LLVM submodule unregistered was successful, and that `rust-lld` and the various `lld-wrapper`s are present and `-Zgcc-ld=lld` works as well, on a few different platforms: - `x86_64-unknown-linux-gnu` - `aarch64-apple-darwin` - `x86_64-pc-windows-msvc` (with `-Clinker=rust-lld` rather than `-Zgcc-ld=lld`) - `x86_64-apple-darwin`, with the `MACOSX_DEPLOYMENT_TARGET` workaround for #101653 I don't think we really need to bump the `download-ci-llvm-stamp` in this case, since `./build/$triple/ci-llvm/bin/lld` is present on all the above targets already, but have added it mechanically, and it should probably be removed to avoid unnecessary downloads/churn. Fixes #98340 Supersedes #100010
2023-01-04Revert "bootstrap: Get rid of `tail_args` in `stream_cargo`"Joshua Nelson-14/+41
This reverts commit 9dfe50440e6d48bd2fd40a4b7b3992998e55eace. Fixes `x clippy`.
2023-01-03ensure lld's step unconditionally for RustDev componentRémy Rakic-5/+2
2023-01-03bump download-ci-llvm-stampRémy Rakic-1/+1
2023-01-03turn a comment into an actual doc commentRémy Rakic-7/+7
2023-01-03slight cleanupRémy Rakic-2/+1
2023-01-03make the `native::LLD` step able to use an already built lldRémy Rakic-0/+14
Makes the lld step avoid building it from source when possible: when dist has packaged it along the other LLVM binaries for the rust-dev component.
2023-01-03bootstrap dist: ensure LLD's stepRémy Rakic-0/+6
2023-01-03Add `build_helper` crate to share code between tidy and bootstrapNilstrieb-60/+12
2023-01-03Rollup merge of #104552 - DebugSteven:warn-newer-x, r=jyn514Matthias Krüger-2/+1
warn newer available version of the x tool This PR adds a check to `tidy` to assert that the installed version of `x` is equal to the version in `src/tools/x/Cargo.toml`. It adds a `--wrapper-version` argument to `x` to determine the version at runtime, . It does not warn if `x` has not yet been installed, on the assumption that the user isn't interested in using it.
2023-01-03Auto merge of #105609 - bjorn3:shrink_rustc_dev, r=jyn514bors-10/+56
Only include metadata for non-dynamic libraries in rustc-dev The actual object code should be linked from librustc_driver.so, which is still included in rustc-dev. This saves on download time and disk usage. Fixes https://github.com/rust-lang/rust/issues/103538
2023-01-03Allow passing a specific date to `bump-stage0`Joshua Nelson-0/+1
This allows regenerating `src/stage0.json` on changes to the tool, without needing to hard-code the date in the source.
2022-12-31Run `cargo test` on tidy itself.Eric Huss-0/+35
2022-12-31remove commented out old codeDebugSteven-1/+0
2022-12-31remove leading comma from macro expansionDebugSteven-2/+2
2022-12-31Only include metadata for non-dynamic libraries in rustc-devbjorn3-10/+56
The actual object code should be linked from librustc_driver.so, which is still included in rustc-dev. This saves on download time and disk usage.
2022-12-30Rollup merge of #106314 - jyn514:fix-panic, r=jyn514Michael Goulet-22/+22
Fix panic on `x build --help` Fixes https://github.com/rust-lang/rust/issues/106313. This avoids trying to run `get_help` unless we actually need to see the paths that are available for the subcommand. This originally regressed in https://github.com/rust-lang/rust/pull/106166.
2022-12-30Rollup merge of #106310 - compiler-errors:old-git, r=jyn514Michael Goulet-14/+9
Dont use `--merge-base` during bootstrap formatting subcommand I use a development image with Ubuntu 20.04 LTS, which has git 2.25. Recently, `./x.py test tidy --bless` regressed in #105702 because it uses the `--merge-base` option on `diff-index`, which was only introduced in git 2.30 (git/git@0f5a1d449b9538c2765de9d6683abbb83a7fb4e2). Luckily, it can be replicated via two calls to `git merge-base` + `git diff-index`, so let's just use that.
2022-12-30Rollup merge of #106305 - jyn514:tail-args, r=Mark-SimulacrumMichael Goulet-77/+82
bootstrap: Get rid of tail_args in stream_cargo Based on https://github.com/rust-lang/rust/pull/106303 for convenience. r? ````@Mark-Simulacrum````
2022-12-31Revert "Auto merge of #105058 - ↵Joshua Nelson-12/+60
Nilstrieb:no-merge-commits-for-you-only-bors-is-allowed-to-do-that, r=jyn514" This reverts commit 4839886f0abe208ab8f2bb73a3076a59fe2ab60c, reversing changes made to ce85c98575e3016cf2007d90a85be321e592aa96.
2022-12-31Fix panic on `x build --help`Joshua Nelson-22/+22
2022-12-30Dont use `--merge-base` during bootstrap formatting subcommandMichael Goulet-14/+9
2022-12-30bootstrap: Get rid of `tail_args` in `stream_cargo`Joshua Nelson-52/+17
2022-12-30Use more consistent progress messages in bootstrapJoshua Nelson-24/+40
Before: ``` Testing ["rustc_interface"] stage0 (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu) ``` After: ``` Testing {rustc_interface} stage0 (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu) ``` Note there is a slight consistency between `build` and `test`: The former doesn't print "compiler artifacts". It would be annoying to fix and doesn't hurt anything, so I left it be. ``` ; x t rustc_interface --stage 0 --dry-run Testing {rustc_interface} stage0 (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu) ; x b rustc_interface --stage 0 --dry-run Building {rustc_interface} stage0 compiler artifacts (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu) ```
2022-12-30Add `build_helper` crate to share code between tidy and bootstrapNilstrieb-60/+12
2022-12-29Auto merge of #105920 - MarcusCalhoun-Lopez:respect_set, r=jyn514bors-1/+6
Respect --set=target.platform when building rustbuild itself `--set=target.platform.cc` and `--set=target.platform.cxx` are ignored if target is quoted. `--set=target.platform.linker` is ignored if RUSTFLAGS is not set. Undo parts of https://github.com/rust-lang/rust/commit/d1291dc8b4ac9a98ff1d286402559e4ba5d68488 and https://github.com/rust-lang/rust/commit/1532fd8cd0db93f469e414f9da31ef083a44fcba
2022-12-29Support `x clean --stage 1 rustc_query_impl`Joshua Nelson-16/+40
Previously, clean only supported `--stage 0` for specific crates. The new `crate_description` function generates a string that looks like ``` : {rustc_query_impl} ```
2022-12-29Respect --set=target.platform during buildMarcus Calhoun-Lopez-1/+6
Avoid quoting targets that do not contain a period. See https://github.com/rust-lang/rust/commit/1532fd8cd0db93f469e414f9da31ef083a44fcba `--set=target.platform.linker` is ignored if RUSTFLAGS is not set. Undo parts of https://github.com/rust-lang/rust/commit/d1291dc8b4ac9a98ff1d286402559e4ba5d68488
2022-12-29Rollup merge of #106263 - chenyukang:yukang/fix-106261-formater, r=jyn514Matthias Krüger-3/+4
Formatter should not try to format non-Rust files Fixes #106261
2022-12-30fix #106261, formater should not try to format non-Rust filesyukang-3/+4
2022-12-29`./x doc library --open` opens `std`Lukas Markeffsky-1/+5
2022-12-29Auto merge of #105741 - pietroalbini:pa-1.68-nightly, r=Mark-Simulacrumbors-2/+3
Bump master bootstrap compiler This PR bumps the bootstrap compiler to the beta created earlier this week, cherry-picks the stabilization version number updates, and updates the `cfg(bootstrap)`s. r? `@Mark-Simulacrum`
2022-12-28Rollup merge of #105702 - albertlarsan68:x-fmt-opt, r=jyn514Matthias Krüger-1/+98
Format only modified files As discussed on #105688, this makes x fmt only format modified files. Fixes #105688
2022-12-28Skip LTO in stage0 (again)Mark Rousskov-16/+20