about summary refs log tree commit diff
path: root/src/bootstrap/lib.rs
AgeCommit message (Collapse)AuthorLines
2023-04-29Fix `x test --no-deps`jyn-0/+1
- Use `cargo metadata` to determine whether a crate has a library package or not - Collect metadata for all workspaces, not just the root workspace and cargo - Don't pass `--lib` for crates without a library - Use `run_cargo_test` for rust-installer - Don't build documentation in `lint-docs` if `--no-doc` is passed
2023-04-28handle cfg(bootstrap)Pietro Albini-4/+1
2023-04-22Group entire build steps in the gha logsOli Scherer-1/+81
2023-04-16chore: remove `rustc-workspace-hack`Weihang Lo-3/+0
Co-authored-by: Scott Schafer <schaferjscott@gmail.com> Co-authored-by: Eric Huss <eric@huss.org>
2023-04-14Auto merge of #110263 - jyn514:ui-fulldeps-llvm, r=albertlarsan68bors-0/+5
Add `libLLVM.so` to the target libdir when download-rustc is enabled Previously, we would only add it to the host libdir, which meant it couldn't be loaded by `ui-fulldeps` tests that used rustc_private. Fixes https://github.com/rust-lang/rust/issues/110225, fixes https://github.com/rust-lang/rust/issues/110226.
2023-04-14Rollup merge of #106249 - Ezrashaw:suggest-test-tool, r=jyn514,albertlarsan68Yuki Okushi-5/+14
Create "suggested tests" tool in `rustbuild` Not the claimed person in #97339 but: I've done a very rough implementation of this feature in-tree. I'm very new to `rustc` development (outside of docs) so some help would be greatly appreciated. The UI of this new subcommand obviously will change and I need some mentoring with the `--run` flag. r? ```@jyn514```
2023-04-12Add `libLLVM.so` to the target libdir when download-rustc is enabledjyn-0/+5
Previously, we would only add it to the host libdir, which meant it couldn't be loaded by `ui-fulldeps` tests that used rustc_private.
2023-04-11Rollup merge of #96971 - zhaixiaojuan:master, r=wesleywiserMichael Goulet-1/+2
Initial support for loongarch64-unknown-linux-gnu Hi, We hope to add a new port in rust for LoongArch. LoongArch intro LoongArch is a RISC style ISA which is independently designed by Loongson Technology in China. It is divided into two versions, the 32-bit version (LA32) and the 64-bit version (LA64). LA64 applications have application-level backward binary compatibility with LA32 applications. LoongArch is composed of a basic part (Loongson Base) and an expanded part. The expansion part includes Loongson Binary Translation (LBT), Loongson VirtualiZation (LVZ), Loongson SIMD EXtension (LSX) and Loongson Advanced SIMD EXtension(LASX). Currently the LA464 processor core supports LoongArch ISA and the Loongson 3A5000 processor integrates 4 64-bit LA464 cores. LA464 is a four-issue 64-bit high-performance processor core. It can be used as a single core for high-end embedded and desktop applications, or as a basic processor core to form an on-chip multi-core system for server and high-performance machine applications. Documentations: ISA: https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html ABI: https://loongson.github.io/LoongArch-Documentation/LoongArch-ELF-ABI-EN.html More docs can be found at: https://loongson.github.io/LoongArch-Documentation/README-EN.html Since last year, we have locally adapted two versions of rust, rust1.41 and rust1.57, and completed the test locally. I'm not sure if I'm submitting all the patches at once, so I split up the patches and here's one of the commits
2023-04-12fix: disable `x suggest` when using `build-metrics`Ezra Shaw-1/+1
2023-04-09feat: implement basic suggest-tests toolEzra Shaw-5/+14
2023-04-08s/ignore_git/omit_git_hashGimbles-8/+8
2023-04-04Add loongarch64 to exception listzhaixiaojuan-1/+2
2023-04-02Replace any existing `build/host` symlinkJynn Nelson-11/+12
This has two advantages: 1. If `build.build` changes between runs, the symlink is no longer silently wrong. 2. If the entire build directory is moved, the symlink is no longer broken because it points to the wrong absolute path.
2023-03-29Auto merge of #108792 - Amanieu:ohos, r=petrochenkovbors-0/+2
Add OpenHarmony targets - `aarch64-unknown-linux-ohos` - `armv7-unknown-linux-ohos` Compiler team MCP: https://github.com/rust-lang/compiler-team/issues/568
2023-03-28Add OpenHarmony targetsAmanieu d'Antras-0/+2
- `aarch64-unknown-linux-ohos` - `armv7-unknown-linux-ohos`
2023-03-28Rollup merge of #91793 - devnexen:anc_data_fbsd, r=ChrisDentonnils-0/+1
socket ancillary data implementation for FreeBSD (from 13 and above). introducing new build config as well.
2023-03-27socket ancillary data implementation for FreeBSD (from 13 and above).David CARLIER-0/+1
introducing new build config as well.
2023-03-24Rename 'src/bootstrap/native.rs' to llvm.rsRobin Hafid-1/+1
Renamed 'native.rs' to 'llvm.rs', also moved `TestHelpers` to `test.rs`.Replaced all the `native.rs` ocurrences at `src/bootstrap` files to `llvm.rs`
2023-03-23Rollup merge of #109295 - ozkanonur:issue-109286, r=ozkanonurDylan DPC-6/+7
refactor `fn bootstrap::builder::Builder::compiler_for` logic - check compiler stage before forcing for stage2. - check if download_rustc is not set before forcing for stage1. resolves #109286
2023-03-21Auto merge of #108659 - ferrocene:pa-test-metrics, r=Mark-Simulacrumbors-0/+27
Include executed tests in the build metrics (and use a custom test display impl) The main goal of this PR is to include all tests executed in CI inside the build metrics JSON files. I need this for Ferrocene, and `@Mark-Simulacrum` expressed desire to have this as well to ensure all tests are executed at least once somewhere in CI. Unfortunately implementing this required rewriting inside of bootstrap all of the code to render the test output to console. libtest supports outputting JSON instead of raw text, which we can indeed use to populate the build metrics. Doing that suppresses the console output though, and compared to rustc and Cargo the console output is not included as a JSON field. Because of that, this PR had to reimplement both the "pretty" format (one test per line, with `rust.verbose-tests = true`), and the "terse" format (the wall of dots, with `rust.verbose-tests = false`). The current implementation should have the exact same output as libtest, except for the benchmark output. libtest's benchmark output is broken in the "terse" format, so since that's our default I slightly improved how it's rendered. Also, to bring parity with libtest I had to introduce support for coloring output from bootstrap, using the same dependencies `annotate-snippets` uses. It's now possible to use `builder.color_for_stdout(Color::Red, "text")` and `builder.color_for_stderr(Color::Green, "text")` across all of bootstrap, automatically respecting the `--color` flag and whether the stream is a terminal or not. I recommend reviewing the PR commit-by-commit. r? `@Mark-Simulacrum`
2023-03-20migrate compiler, bootstrap, and compiletest to windows-rsAndy Russell-0/+3
2023-03-18refactor `fn bootstrap::builder::Builder::compiler_for`ozkanonur-6/+7
- check compiler stage before forcing for stage2. - check if download_rustc is not set before forcing for stage1. Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-03-14Create dir for build_tripleMu001999-0/+1
2023-03-08Auto merge of #108534 - Mark-Simulacrum:compression, r=pietroalbinibors-6/+1
Import rust-installer & adjust compression settings This brings in rust-lang/rust-installer#123, which enables a larger compression window (8 -> 64MB) amongst other changes to the xz compression settings. The net effect should be smaller compressed tarballs which will decrease bandwidth usage for static.rust-lang.org, download times, and decompression time. This comes at the cost of higher baseline requirements for running rustup to use these files, which we believe should be largely acceptable (running rustc is likely to use at least this much memory) but if we get specific reports we may explore options to decrease impact (e.g., using the gzip tarballs automatically in rustup). To simplify iteration on compression settings this also imports the rust-lang/rust-installer submodule, it is now hosted fully inside rust-lang/rust. Once we land this I'll file a followup to add a note to that repo and we can subsequently archive it. -- CI times for dist-x86_64-linux builds: * threads=6, master - 2h 50m * threads=1, new - 3h 40m * threads=6, new - 2h 50m
2023-03-08Add force to use the stage 2 compiler in compiler_for when ↵morine0122-0/+9
config.download_rustc is set
2023-03-07Add bootstrap support for rust-installerMark Rousskov-6/+1
2023-03-07switch to termcolorPietro Albini-11/+19
2023-03-02add a splash of colorPietro Albini-0/+18
2023-03-02render compiletest output with render_testsPietro Albini-0/+1
2023-02-21Revert "port over symlink_file function from Build to Config and create ↵Jakub Beránek-1/+10
symlink for legacy rustfmt path" This reverts commit 41c6c5d4996728b5a635319ef9b077a3d0ccc480.
2023-02-09port over symlink_file function from Build to Config and create symlink for ↵Zephaniah Ong-10/+1
legacy rustfmt path
2023-02-04Rollup merge of #107116 - ozkanonur:consolidate-bootstrap-docs, r=jyn514Matthias Krüger-87/+0
consolidate bootstrap docs With this diff, I tried to consolidate bootstrap documentations and remove the duplicated informations. Coupled with https://github.com/rust-lang/rustc-dev-guide/pull/1563 Resolves #90686 Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-02-04consolidate bootstrap docsozkanonur-87/+0
Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-01-30Auto merge of #107080 - Urgau:cleanup-bootstrap-extra-check-cfgs, ↵bors-14/+8
r=Mark-Simulacrum bootstrap: cleanup the list of extra check cfgs This PR performs some cleanups on the `EXTRA_CHECK_CFGS` list in bootstrap. - `target_os=watchos`: no longer relevant because there are now proper targets `*-apple-watchos` - `target_arch=nvptx64`: target `nvptx64-nvidia-cuda` makes it useless - `target_arch=le32`: target was removed (https://github.com/rust-lang/rust/pull/45041) - `release`: was removed from rustfmt (https://github.com/rust-lang/rustfmt/pull/5375 and https://github.com/rust-lang/rustfmt/pull/5449) - `dont_compile_me`: was removed from stdarch (https://github.com/rust-lang/stdarch/pull/1308) Also made some external cfg exception mode clear and only activated for rustc and rustc tools (as to not have the Standard Library unintentionally depend on them).
2023-01-30Rollup merge of #106106 - jyn514:remote-tracking-branch, r=Mark-SimulacrumDylan DPC-3/+23
Pass `branch.{branch}.remote=origin` to `git submodule update` This works around a bug in git itself. Fixes https://github.com/rust-lang/rust/issues/101144.
2023-01-29When stamp doesn't exist, should say Error, and print path to stamp fileteapot4195-1/+2
2023-01-28Gracefully exit when --keep-stage used on clean source treeteapot4195-0/+7
2023-01-25Cleanup extra check configs in bootstrapUrgau-14/+8
- `target_os=watchos`: no longer relevant because there are now proper targets `*-apple-watchos` - `target_arch=nvptx64`: `nvptx64-nvidia-cuda` - `target_arch=le32`: target was removed (https://github.com/rust-lang/rust/pull/45041) - `release`: was removed from rustfmt (https://github.com/rust-lang/rustfmt/pull/5375 and https://github.com/rust-lang/rustfmt/pull/5449) - `dont_compile_me`: was removed from stdarch (https://github.com/rust-lang/stdarch/pull/1308) Also made some external cfg exception mode clear and only activated for rustc and rustc tools (as to not have the Standard Library unintentionally depend on them).
2023-01-03Add `build_helper` crate to share code between tidy and bootstrapNilstrieb-1/+2
2022-12-31Revert "Auto merge of #105058 - ↵Joshua Nelson-2/+1
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-30Add `build_helper` crate to share code between tidy and bootstrapNilstrieb-1/+2
2022-12-27Auto merge of #106168 - jyn514:clean-crates, r=Mark-Simulacrumbors-4/+0
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-4/+0
As a bonus, this stops special casing `clean` in `Builder`.
2022-12-26Fix panic on `x build --help --verbose`Joshua Nelson-1/+4
This also makes the panic message a little more informative in case it happens again.
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-23Auto merge of #106070 - matthiaskrgr:rollup-jv9ctkl, r=matthiaskrgrbors-1/+1
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 #106051 - jyn514:cranelift-std, r=bjorn3Matthias Krüger-1/+1
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-0/+1
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-22Allow building std with craneliftJoshua Nelson-1/+1
- Don't pass llvm-specific args when using cranelift - Don't use `asm` in compiler_builtins when using cranelift
2022-12-18Rollup merge of #96584 - bentongxyz:x-setup-h-v-should-work, r=jyn514Matthias Krüger-4/+0
Fix `x setup -h -v` should work r? `@jyn514` I have to convert profile to path and back in order to remove special-casing in bootstrap. I also check for `dry_run` so that `config.toml` and/ or `.git/hooks/pre-push` will not be created if `--dry-run` is specified. Please help me see if this is ok, thanks alot!