about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
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
2022-12-28-Zrustdoc-scrape-examples no longer takes argumentsMark Rousskov-1/+1
2022-12-28delete more `cfg(bootstrap)`Lukas Markeffsky-19/+16
2022-12-27Add changelog entryAlbert Larsan-0/+1
2022-12-27Make `x clean` also clean the stamp fileAlbert Larsan-0/+1
2022-12-27Put final touchesAlbert Larsan-40/+34
2022-12-27Add rustfmt version checkAlbert Larsan-15/+70
2022-12-27Format only modified filesAlbert Larsan-0/+46
As discussed on #105688, this makes x fmt only format modified files
2022-12-27Auto merge of #106168 - jyn514:clean-crates, r=Mark-Simulacrumbors-75/+152
Allow cleaning individual crates As a bonus, this stops special casing `clean` in `Builder`. ## Motivation Cleaning artifacts isn't strictly necessary to get cargo to rebuild; `touch compiler/rustc_driver/src/lib.rs` (for example) will also work. There's two reasons I thought making this part of bootstrap proper was a better approach: 1. `touch` does not *remove* artifacts, it just causes a rebuild. This is unhelpful for when you want to measure how long the compiler itself takes to build (e.g. for https://github.com/rust-lang/rust/issues/65031). 2. It seems a little more discoverable; and I want to extend it in the future to things like `x clean --stage 1 rustc`, which makes it easier to work around https://github.com/rust-lang/rust/issues/76720 without having to completely wipe all the stage 0 artifacts, or having to be intimately familiar with which directories to remove.
2022-12-26Allow cleaning individual cratesJoshua Nelson-75/+152
As a bonus, this stops special casing `clean` in `Builder`.
2022-12-26Fix panic on `x build --help --verbose`Joshua Nelson-2/+15
This also makes the panic message a little more informative in case it happens again.
2022-12-24Rollup merge of #105465 - jyn514:docs, r=Mark-SimulacrumMatthias Krüger-12/+3
Improve top-level docs See a detailed explanation in the commit messages. This is a companion PR to https://github.com/rust-lang/rustc-dev-guide/pull/1528. * Link to other resources instead of inlining their information * Remove ancient and outdated reference to `config.mk` * Suggest `profile = "user"` in the README * Add detail about dependencies from the dev-guide * Link to CONTRIBUTING.md instead of rustc-dev-guide in the main readme * Link to `std-dev-guide` in CONTRIBUTING.md
2022-12-23Pass `branch.{branch}.remote=origin` to `git submodule update`Joshua Nelson-3/+23
This works around a bug in git itself; see https://github.com/rust-lang/rust/issues/101144.
2022-12-23Remove ancient and outdated references to `config.mk`Joshua Nelson-12/+3
2022-12-23Auto merge of #106070 - matthiaskrgr:rollup-jv9ctkl, r=matthiaskrgrbors-5/+23
Rollup of 6 pull requests Successful merges: - #105978 (Mark `proc_macro_decls_static` as always used) - #106051 (Allow building std with cranelift) - #106056 (Make `sess.bug` much less noisy) - #106057 (Give a more helpful error for "trimmed_def_paths constructed") - #106058 (Fix the issue number in comment for as_local_call_operand) - #106059 (Avoid running the `Profile` step twice on `x setup`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-23Rollup merge of #106059 - jyn514:setup-twice, r=NilstriebMatthias Krüger-0/+4
Avoid running the `Profile` step twice on `x setup` Prevents runs like the following: ``` $ x setup Welcome to the Rust project! What do you want to do with x.py? a) library: Contribute to the standard library b) compiler: Contribute to the compiler itself c) codegen: Contribute to the compiler, and also modify LLVM or codegen d) tools: Contribute to tools which depend on the compiler, but do not modify it directly (e.g. rustdoc, clippy, miri) e) user: Install Rust from source Please choose one (a/b/c/d/e): b To get started, try one of the following commands: - `x.py check` - `x.py build` - `x.py test` For more suggestions, see https://rustc-dev-guide.rust-lang.org/building/suggested.html `x.py` will now use the configuration at /home/nilsh/projects/rustfast/src/bootstrap/defaults/config.compiler.toml Welcome to the Rust project! What do you want to do with x.py? ... ``` r? `@Nilstrieb`
2022-12-23Rollup merge of #106051 - jyn514:cranelift-std, r=bjorn3Matthias Krüger-5/+19
Allow building std with cranelift - Don't pass llvm-specific args when using cranelift - Don't use `asm` in compiler_builtins when using cranelift r? `@bjorn3` cc `@Mark-Simulacrum`
2022-12-22Support documenting CargoJoshua Nelson-11/+54
The primary motivation is to have the cargo docs show up on https://doc.rust-lang.org/nightly/nightly-rustc/cargo, but as a nice side effect this makes `x doc cargo` work locally.
2022-12-22Avoid running the `Profile` step twice on `x setup`Joshua Nelson-0/+4
Prevents runs like the following: ``` $ x setup Welcome to the Rust project! What do you want to do with x.py? a) library: Contribute to the standard library b) compiler: Contribute to the compiler itself c) codegen: Contribute to the compiler, and also modify LLVM or codegen d) tools: Contribute to tools which depend on the compiler, but do not modify it directly (e.g. rustdoc, clippy, miri) e) user: Install Rust from source Please choose one (a/b/c/d/e): b To get started, try one of the following commands: - `x.py check` - `x.py build` - `x.py test` For more suggestions, see https://rustc-dev-guide.rust-lang.org/building/suggested.html `x.py` will now use the configuration at /home/nilsh/projects/rustfast/src/bootstrap/defaults/config.compiler.toml Welcome to the Rust project! What do you want to do with x.py? ... ```
2022-12-22Allow building std with craneliftJoshua Nelson-5/+19
- Don't pass llvm-specific args when using cranelift - Don't use `asm` in compiler_builtins when using cranelift
2022-12-22Auto merge of #106000 - nikic:lld-build, r=Mark-Simulacrumbors-99/+58
Make LLD build forward-compatible with LLVM 16 Switch to using the cmake module instead of llvm-config. I believe this also removes the need for llvm-config-wrapper.
2022-12-22Use LLVM_CMAKE_DIR for lld buildNikita Popov-95/+58
LLVM_CONFIG_PATH is no longer supported as of LLVM 16, switch to using the cmake module instead. We separately return the llvm-config and cmake directory paths, because llvm-config always refers to the host binary, while the cmake directory is for the target triple.
2022-12-21Don't explicitly set C++ standard for lldNikita Popov-4/+0
LLVM does this itself since 606cb8548a1b7763e0c8489c5efe66803a7ede72, and 14 is no longer the correct standard when building lld 16, causing build failures.
2022-12-20Rollup merge of #105976 - jyn514:unused-make-targets, r=Mark-SimulacrumMatthias Krüger-5/+0
Remove unused `check-stage2-T-arm-linux-androideabi-H-x86_64-unknown-linux-gnu` make rule It's not used anywhere in CI, and it seems of questionable use. It was first added in 0e272de69f4a9c889e5f1a024a88b3e1f60cb6c5, which looks like it's just intended for CI, not as a user-facing feature.
2022-12-20Rollup merge of #105904 - MarcusCalhoun-Lopez:darwin_arch_i386, r=bjorn3Matthias Krüger-0/+3
Fix arch flag on i686-apple-darwin i686-apple-darwin should use `-arch i386` instead of `-arch i686`
2022-12-20Remove unused `check-stage2-T-arm-linux-androideabi-H-x86_64-unknown-linux-gnu`Joshua Nelson-5/+0
It's not used anywhere in CI, and it seems of questionable use. It was first added in 0e272de69f4a9c889e5f1a024a88b3e1f60cb6c5, which looks like it's just intended for CI, not as a user-facing feature.