summary refs log tree commit diff
path: root/src/bootstrap/config.rs
AgeCommit message (Collapse)AuthorLines
2023-05-24Auto merge of #111566 - clubby789:bootstrap-override-config, r=ozkanonurbors-26/+124
Override config.toml options from command line https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/Running.20tests.20on.20precompiled.20rustc/near/357763280 cc `@jyn514`
2023-05-19Override config.toml options from command lineclubby789-26/+124
2023-05-14comment feedbackyukang-1/+2
2023-05-14fixyukang-2/+1
2023-05-14skip rustc version check in dry_runyukang-0/+4
2023-05-14Make sure the build.rustc version is either the same or 1 apartyukang-0/+34
2023-05-09Rollup merge of #111242 - wangkirin:support_rpath_independent_config, ↵Matthias Krüger-0/+7
r=albertlarsan68 support set `rpath` option for each target independently Currently the `rpath` option is a global config and it's effect on all targets. But sometimes when developers edit the rustc code and try to release rust toolchains themselves, they may not want to add `rpath` in all targets to avoid dynamically linked shared object library privilege escalation attack. This PR supports set `rpath` option for each target independently . Common developers are not aware of the existence of this configuration option and do not affect the existing development process. This configuration option takes effect only after developers explicitly sets . r? ``@albertlarsan68``
2023-05-07Auto merge of #110693 - clubby789:x-clap-take-2, r=Mark-Simulacrumbors-11/+28
Migrate bootstrap to Clap-based argument parsing Supercedes #108083 I chose to re-do the work rather than rebase the onto the large changes since the original PR. If it's preferred I can instead force-push the original PR to this version. cc `@jyn514` `@albertlarsan68`
2023-05-06Migrate bootstrap to Clap-based argumentsclubby789-11/+28
2023-05-05support enable rpath in each target independentlyWang Qilin-0/+7
2023-05-04Use `free-args` consistently in bootstrapjyn-0/+22
Previously, this was only passed to miri and compiletest. Extended it to all other tests and binaries as well.
2023-04-30bootstrap: Fix compile error: unused-mutWANG Rui-1/+1
2023-04-15Fix `x test rust-installer` when `cargo` is set to a relative pathjyn-1/+3
Previously, this would give an error because the shell script had a different working directory: ``` test: basic_install $ sh /home/jyn/src/rust/src/tools/rust-installer/gen-installer.sh --image-dir=/home/jyn/src/rust/src/tools/rust-installer/test/image1 --work-dir=/home/jyn/src/rust/build/x86_64-unknown-linux-gnu/test/rust-installer/workdir --output-dir=/home/jyn/src/rust/build/x86_64-unknown-linux-gnu/test/rust-installer/outdir /home/jyn/src/rust/src/tools/rust-installer/gen-installer.sh: 15: ../rust3/build/host/stage2-tools-bin/cargo: not found TEST FAILED! ```
2023-04-09feat: implement basic suggest-tests toolEzra Shaw-14/+10
2023-04-09Rollup merge of #110059 - gimbles:git-hash, r=ozkanonurYuki Okushi-6/+6
ignore_git → omit_git_hash Fixes #110020
2023-04-08s/ignore_git/omit_git_hashGimbles-6/+6
2023-04-07Auto merge of #109448 - ozkanonur:download-beta-compiler-toolchain, ↵bors-6/+15
r=Mark-Simulacrum Download beta compiler toolchain in bootstrap if it doesn't yet exist Blocker for #107812 and #99989 See: https://github.com/rust-lang/rust/pull/107812#discussion_r1143492202 r? `@jyn514`
2023-04-08download beta compiler toolchain in bootstrap if it doesn't yet existozkanonur-6/+15
This is needed for when the shell scripts bypass python altogether and run the downloaded bootstrap directly. Changes are mainly provided from @jyn514, I just fixed the review notes. Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-04-01bootstrap replace atty with is-terminal, dedupe few depsklensy-2/+4
2023-03-24Rename 'src/bootstrap/native.rs' to llvm.rsRobin Hafid-3/+3
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-21Auto merge of #108659 - ferrocene:pa-test-metrics, r=Mark-Simulacrumbors-0/+6
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-21Rollup merge of #109124 - ferrocene:pa-compression-mode, r=Mark-Simulacrumnils-0/+4
Add `dist.compression-profile` option to control compression speed PR #108534 reduced the size of compressed archives, but (as expected) it also resulted in way longer compression times and memory usage during compression. It's desirable to keep status quo (smaller archives but more CI usage), but it should also be configurable so that downstream users don't have to waste that much time on CI. As a data point, this resulted in doubling the time of Ferrocene's dist jobs, and required us to increase the RAM allocation for one of such jobs. This PR adds a new `config.toml` setting, `dist.compression-profile`. The values can be: * `fast`: equivalent to the gzip and xz preset of "1" * `balanced`: equivalent to the gzip and xz preset of "6" (the CLI defaults as far as I'm aware) * `best`: equivalent to the gzip present of "9", and our custom xz profile The default has also been moved back to `balanced`, to try and avoid the compression time regression for downstream users. I don't feel too strongly on the default, and I'm open to changing it. Also, for the `best` profile the XZ settings do not match the "9" preset used by the CLI, and it might be confusing. Should we create a `custom-rustc-ci`/`ultra` profile for that? r? ``@Mark-Simulacrum``
2023-03-21change default to fast for everyone but the user profilePietro Albini-1/+1
2023-03-17Initialize rust_info before is_ci_llvm_available()Nikita Popov-4/+5
2023-03-15add `enable-warnings` flag for llvmozkanonur-0/+3
Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-03-14add dist.compression-profile option to control compression speedPietro Albini-0/+4
2023-03-11Rename `config.toml.example` to `config.example.toml`Thom Chiovoloni-2/+2
2023-03-07Rollup merge of #108581 - jfgoog:include-mingw-linker, r=petrochenkovMatthias Krüger-0/+4
Add a new config flag, dist.include-mingw-linker. The flag controls whether to copy the linker, DLLs, and various libraries from MinGW into the rustc toolchain. It applies only when the host or target is pc-windows-gnu. The flag is true by default to preserve existing behavior.
2023-03-07Rollup merge of #108619 - jyn514:llvm-version-check, r=cuviperYuki Okushi-4/+0
Remove the option to disable `llvm-version-check` We don't support old versions of LLVM; there's no reason to have an easy way to force bootstrap to use them anyway. If someone really needs to use an unsupported version, they can modify bootstrap to change the version range. r? ``@cuviper`` on whether we want to do this or not, since you maintain rust on Fedora and touched this config last.
2023-03-05Remove the option to disable `llvm-version-check`Joshua Nelson-4/+0
We don't support old versions of LLVM; there's no reason to have an easy way to force bootstrap to use them anyway. If someone really needs to use an unsupported version, they can modify bootstrap to change the version range.
2023-03-05Rollup merge of #108613 - jyn514:rm-skip-rebuild, r=Mark-SimulacrumMatthias Krüger-9/+0
Remove `llvm.skip-rebuild` option This was added to in 2019 to speed up rebuild times when LLVM was modified. Now that download-ci-llvm exists, I don't think it makes sense to support an unsound option like this that can lead to miscompiles; and the code cleanup is nice too. r? `@Mark-Simulacrum` cc `@varkor` #65612
2023-03-02add a splash of colorPietro Albini-0/+6
2023-03-01Remove `llvm.skip-rebuild` optionJoshua Nelson-9/+0
This was added to in 2019 to speed up rebuild times when LLVM was modified. Now that download-ci-llvm exists, I don't think it makes sense to support an unsound option like this that can lead to miscompiles; and the code cleanup is nice too.
2023-02-28Add a new config flag, dist.include-mingw-linker.James Farrell-0/+4
The flag controls whether to copy the linker, DLLs, and various libraries from MinGW into the rustc toolchain. It applies only when the host or target is pc-windows-gnu. The flag is true by default to preserve existing behavior.
2023-02-27Rollup merge of #108308 - bjorn3:faster_bootstrap_build, r=albertlarsan68Matthias Krüger-0/+1
Allow building serde and serde_derive in parallel This reduces build time of bootstrap by ~6s
2023-02-27Allow building serde and serde_derive in parallelbjorn3-0/+1
This reduces build time of bootstrap by ~6s
2023-02-24Test that the compiler/library builds with -Zmir-opt-level=3 -Zvalidate-miryukang-0/+3
2023-02-19Download rustfmt regardless of rustc being set in config.tomlKittyBorgX-9/+0
2023-02-10Pass arguments to `x` subcommands with `--`clubby789-0/+5
2023-02-03Auto merge of #107241 - clubby789:bootstrap-lto-off, r=simulacrumbors-1/+3
Add `rust.lto=off` to bootstrap and set as compiler/library default Closes #107202 The issue mentions `embed-bitcode=on`, but here https://github.com/rust-lang/rust/blob/c8e6a9e8b6251bbc8276cb78cabe1998deecbed7/src/bootstrap/compile.rs#L379-L381 it appears that this is always set for std stage 1+, so I'm unsure if changes are needed here. `@rustbot` label +A-bootstrap
2023-01-30Rollup merge of #107264 - ferrocene:pa-private-items, r=Mark-SimulacrumDylan DPC-0/+3
Add option to include private items in library docs I need to perform some one-off analysis on libcore, and I wanted to use the unstable JSON rustdoc output to easily do it. Unfortunately, there is currently no way to include unstable items in the library docs. This PR adds support for that, with the off-by-default `build.library-docs-private-items` setting.
2023-01-27Revisit fix_is_ci_llvm_available logic; read build triple from tomlSergey Prytkov-0/+3
2023-01-26Add `rust.lto=off` to bootstrapclubby789-1/+3
2023-01-24add option to include private items in library docsPietro Albini-0/+3
2022-12-24Rollup merge of #105465 - jyn514:docs, r=Mark-SimulacrumMatthias Krüger-4/+1
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-23Remove ancient and outdated references to `config.mk`Joshua Nelson-4/+1
2022-12-23Rollup merge of #106051 - jyn514:cranelift-std, r=bjorn3Matthias Krüger-0/+4
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-22Allow building std with craneliftJoshua Nelson-0/+4
- Don't pass llvm-specific args when using cranelift - Don't use `asm` in compiler_builtins when using cranelift
2022-12-17Make `RUN_CHECK_WITH_PARALLEL_QUERIES` the last thing to runJoshua Nelson-0/+1
This takes a long time and rarely fails. It also interferes with `retry make prepare`, the retry is unhelpful since `make prepare` turns into a no-op
2022-12-10Rollup merge of #104512 - jyn514:download-ci-llvm-default, r=Mark-SimulacrumMatthias Krüger-94/+108
Set `download-ci-llvm = "if-available"` by default when `channel = dev` See https://github.com/rust-lang/compiler-team/issues/566. The motivation for changing the default is to avoid downloading and building LLVM when someone runs `x build` before running `x setup`. The motivation for only doing it on `channel = "dev"` is to avoid breaking distros or users installing from source. It works because `dev` is also the default channel. The diff looks larger than it is; most of it is moving the `llvm` branch below the `rust` so `config.channel` is set. r? `@Mark-Simulacrum` cc `@oli-obk` `@bjorn3` `@cuviper`