about summary refs log tree commit diff
path: root/src/bootstrap/lib.rs
AgeCommit message (Collapse)AuthorLines
2023-07-14bootstrap: update defaults for `compiler` and `library` aliasesLukas Markeffsky-0/+1
2023-07-11Rollup merge of #113373 - jyn514:download-rustc-fixes, r=albertlarsan68Jubilee-5/+0
various download-rustc fixes separated out from https://github.com/rust-lang/rust/pull/112143 because it keeps getting stuck in limbo. best reviewed commit-by-commit
2023-07-11Move `ci_rustc_dir` to Config and use it consistentlyjyn-5/+0
2023-07-05Fix submodule handling when the current branch is named after a tagjyn-0/+3
If: 1. The current branch has the same name as git tag, and 2. The current branch is set to track a remote other than `origin`, and 3. We try to update a submodule then we'll get the following error: ``` ; x c Updating submodule src/doc/reference remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0 fatal: 'personal' does not appear to be a git repository fatal: Could not read from remote repository. ``` The problem is that 1. causes `git symbolic-ref --short HEAD` to try and disambiguate the branch from the tag using `heads/branch-name`, which breaks a previous workaround for a bug in `git submodule update` that uses the wrong remote. Adapt the workaround to strip `heads/` from the output.
2023-07-01Use RustOptimize to set optimizehi-rustin-1/+1
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2023-06-25Switch some more Steps to `builder.msg`jyn-0/+9
In particular, this hides compiletest suites under a dropdown - some builders are configured with `verbose-tests`, which makes the suites take up many thousands of lines. before: ``` Documenting stage1 cargo (x86_64-unknown-linux-gnu) Check compiletest suite=rustdoc-js mode=js-doc-test (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu) ``` after: ``` ::group::Documenting stage1 cargo (x86_64-unknown-linux-gnu) ::group::Testing stage1 compiletest suite=rustdoc-js mode=js-doc-test (x86_64-unknown-linux-gnu) ```
2023-06-23Make `try_run` return a `Result<(), ()>` instead of a booleanGuillaume Gomez-6/+8
2023-06-12add support for blessing panic=abort mir-opt testsPietro Albini-0/+1
2023-06-12return dummy cc and friends during dry runsPietro Albini-0/+18
Some targets are added to these hashmaps at runtime, and are not present during dry runs. To avoid errors, this commit changes all the related functions to always return empty strings/paths during dry runs.
2023-06-12allow mutating the c compilers detected by bootstrapPietro Albini-24/+24
This will be needed to create synthetic targets in future commits.
2023-06-07Auto merge of #111495 - Kobzol:dist-tests, r=Mark-Simulacrumbors-2/+7
Run tests on PGO/LTO/BOLT optimized dist artifacts This PR adds baisc tests for the optimized dist builds on x64 Linux and Windows. A subset of the test suite is run, so it's not perfect, but it's better than the status quo (which is basically no testing at all, apart from the perf bot on Linux). r? `@ghost`
2023-06-05Test the PGO/BOLT/LTO optimized x64 Linux compiler on CIJakub Beránek-2/+7
2023-06-04Don't double-print status messages in GHAjyn-1/+0
Before: ``` Building stage0 tool jsondocck (x86_64-unknown-linux-gnu) Building stage0 tool jsondocck (x86_64-unknown-linux-gnu) Downloading crates ... ``` After: ``` Building stage0 tool jsondocck (x86_64-unknown-linux-gnu) Downloading crates ... ```
2023-05-31Fix the progress message for `x doc rustc`jyn-4/+4
This makes it more clear that we're using stage 0 *to document* rustc, not that we're documenting stage0 rustc itself. It also fixes a bug in `msg_sysroot_tool` that would print `Docing`, and removes the `Debug` impl for `Kind` to make sure it doesn't happen again. Before: ``` Documenting stage0 compiler {rustc-main} (aarch64-apple-darwin) ``` After: ``` Documenting compiler {rustc-main} (stage0 -> stage1, aarch64-apple-darwin) ```
2023-05-31Rollup merge of #112084 - ozkanonur:improvements, r=clubby789Matthias Krüger-15/+4
enhancements on build_helper utilization and rustdoc-gui-test This change provides codebase improvements, resolves `FIXME` in `rustdoc-gui-test` and makes `rustdoc-gui` test able to find local `node_modules` directory outside of the source root.
2023-05-30create `build_helper/src/util` modozkanonur-15/+4
Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-05-29Extend `msg` and `description` to work with any subcommandjyn-2/+2
Previously `description` only supported `Testing` and `Benchmarking`, and `msg` gave weird results for `doc` (it would say `Docing`).
2023-05-27Revert "Rollup merge of #111538 - ↵Mark Rousskov-1/+0
chenyukang:yukang-fix-110067-version-issue, r=jyn514" This reverts commit 9267843e72c8692f934c2ef5505c8a7496c0f06e, reversing changes made to e52fbff5e8c2de7ba085ef84d7d50500b695d521. This breaks our ability to bump the src/version where we're bootstrapping with an older compiler than usual (according to version number). It's not clear whether the intended use case has a clean solution given this constraint, so reverting for now - we can reland with a fix of some kind implemented.
2023-05-25Generate docs for bootstrap itselfjyn-0/+4
This verifies the intra-doc links are correct, and hopefully makes things easier for new contributors.
2023-05-20Read beta version from the version file ...liushuyu-6/+27
... if building from a source tarball
2023-05-14fixyukang-0/+1
2023-05-06Migrate bootstrap to Clap-based argumentsclubby789-2/+2
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