about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2024-05-03Rollup merge of #124613 - GuillaumeGomez:fmt-run-make, r=onur-ozkanMatthias Krüger-1/+5
Allow fmt to run on rmake.rs test files As discussed with `@jieyouxu,` `rmake.rs` from the `run-make` testsuite would benefit from being formatted as well. Only thing needed to be done for it to work: allow support for `!` in our `rustfmt.toml` file parsing. r? `@onur-ozkan`
2024-05-03Rollup merge of #124461 - onur-ozkan:followup-123546, r=pietroalbiniMatthias Krüger-19/+38
handle the targets that are missing in stage0 During sanity checks, we search for target names to determine if they exist in the compiler's built-in target list (`rustc --print target-list`). While a target name may be present in the stage2 compiler, it might not yet be included in stage0. This PR handles that difference. Follow-up of https://github.com/rust-lang/rust/pull/123546
2024-05-03Allow to negate ignored filesGuillaume Gomez-1/+5
2024-05-02Change `SIGPIPE` ui from `#[unix_sigpipe = "..."]` to `-Zon-broken-pipe=...`Martin Nordholts-1/+16
In the stabilization attempt of `#[unix_sigpipe = "sig_dfl"]`, a concern was raised related to using a language attribute for the feature: Long term, we want `fn lang_start()` to be definable by any crate, not just libstd. Having a special language attribute in that case becomes awkward. So as a first step towards towards the next stabilization attempt, this PR changes the `#[unix_sigpipe = "..."]` attribute to a compiler flag `-Zon-broken-pipe=...` to remove that concern, since now the language is not "contaminated" by this feature. Another point was also raised, namely that the ui should not leak **how** it does things, but rather what the **end effect** is. The new flag uses the proposed naming. This is of course something that can be iterated on further before stabilization.
2024-05-01Step bootstrap cfgsMark Rousskov-7/+4
2024-05-01Auto merge of #122427 - psumbera:bootstrap_out_path, r=clubby789bors-1/+6
Normalize bootstrap_out path Fixes #112785
2024-05-01add a reference link to the comment of the "cc" and "cmake".onur-ozkan-3/+3
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-04-30Rollup merge of #124553 - ferrocene:pa-cargo-git-info, r=onur-ozkan许杰友 Jieyou Xu (Joe)-5/+12
Write `git-commit-{sha,info}` for Cargo in source tarballs Right now Cargo doesn't populate the commit hash or date in its version output when it's built from the plain source tarball. That's because we don't include the git information for it, and Cargo's build script doesn't pick it up. This PR *partially* solves the problem by storing the git information for Cargo in `src/tools/cargo` in the plain source tarball. We store separate information because even when built in CI Cargo uses its own git information rather than Rust's. This PR will also require a change in the Cargo repository to consume this information (https://github.com/rust-lang/cargo/pull/13832), but it doesn't have to be blocked on the Cargo PR being merged.
2024-04-30write git-commit-{sha,info} for Cargo in source tarballsPietro Albini-5/+12
This will allow Cargo's build script to pick it up, and populate the correct git information in its version output.
2024-04-29Remove the `expand-yaml-anchors` toolJakub Beránek-65/+1
2024-04-29Normalize bootstrap_out path, r=clubby789Petr Sumbera-1/+6
2024-04-28add support to override lldb binary path for ./x testVladimir Makayev-3/+13
2024-04-28Auto merge of #124261 - onur-ozkan:drop-llvm-if-available, r=Mark-Simulacrumbors-5/+0
drop deprecated value `if-available` for `download-ci-llvm` option It's been 5 months since we deprecated this. It should be fine to drop its support now.
2024-04-28handle the targets that are missing in stage0onur-ozkan-19/+38
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-04-28Auto merge of #123546 - Rajveer100:branch-for-issue-122128, r=onur-ozkanbors-0/+29
Bootstrap: Check validity of `--target` and `--host` triples before starting a build Resolves #122128 As described in the issue, validating the `target` and `host` triples would save a lot of time before actually starting a build. This would also check for custom targets by looking for a valid JSON spec if the specified target does not exist in the [supported](https://github.com/rust-lang/rust/blob/42825768b103c28b10ce0407749acb21d32abeec/compiler/rustc_target/src/spec/mod.rs#L1401-L1689) list of targets.
2024-04-28Rollup merge of #124429 - Enselic:document-builder, r=Mark-SimulacrumMatthias Krüger-0/+23
bootstrap: Document `struct Builder` and its fields I'm exploring the code of bootstrap and had a bit of a hard time understanding exactly what `Builder` is for at first. I decided to help document it and its field to help future explorers.
2024-04-28Rollup merge of #124242 - workingjubilee:describe-bootstrap-files-better, ↵Matthias Krüger-6/+28
r=Mark-Simulacrum bootstrap: Describe build_steps modules One of my preferred ways to understand source code is to start with its API. This implies the code is documented reasonably accurately, even if it is a private API. The description of one of these modules had not been updated since 2015 and so was both terse and confusing, so I rewrote it. Then I noticed many others went unremarked, so I offered some remarks.
2024-04-28Rollup merge of #123942 - onur-ozkan:x-vendor, r=Mark-SimulacrumMatthias Krüger-11/+98
`x vendor` This PR implements `x vendor` on bootstrap; enabling dependency vendoring without the need for developers to have `cargo` installed on their system (previously, we suggested running `cargo vendor ...` but now we can accomplish the same task with `x vendor`). In addition, fixes #112391 problem.
2024-04-27Auto merge of #124448 - matthiaskrgr:rollup-iloy9vz, r=matthiaskrgrbors-40/+40
Rollup of 7 pull requests Successful merges: - #124370 (Fix substitution parts having a shifted underline in some cases) - #124394 (Fix ICE on invalid const param types) - #124425 (Do not ICE on invalid consts when walking mono-reachable blocks) - #124434 (Remove lazycell and once_cell from compiletest dependencies) - #124437 (doc: Make the `mod.rs` in the comment point to the correct location) - #124443 (Elaborate in comment about `statx` probe) - #124445 (bootstrap: Change `global(true)` to `global = true` for flags for consistency) r? `@ghost` `@rustbot` modify labels: rollup
2024-04-27Rollup merge of #124445 - Enselic:global-true, r=onur-ozkanMatthias Krüger-40/+40
bootstrap: Change `global(true)` to `global = true` for flags for consistency All other arg properties use the `prop = value` style, which makes it slightly annoying to use the `prop(value)` only style for `global`. Change to `prop = value` also for `global` for consistency.
2024-04-27Auto merge of #124405 - RalfJung:miri-core-alloc-tests, r=clubby789bors-3/+0
miri core/alloc tests: do not test a 2nd target check-aux seems to be one of the slowest runners since we started running standard library tests in Miri on it. So maybe it'd be better to reduce test coverage a bit by not doing cross-target testing of core and alloc? I don't recall finding target-specific issues in these libraries ever (and we still have the extra test coverage via our [out-of-tree nightly tests](https://github.com/rust-lang/miri-test-libstd)). This gives us more buffer to deal with the fact that the number of tests we run will only grow over time. Cc `@rust-lang/miri` `@rust-lang/infra`
2024-04-27Bootstrap: Check validity of `--target` and `--host` triples before starting ↵Rajveer-0/+29
a build Resolves #122128
2024-04-27bootstrap: Change `global(true)` to `global = true` for flags for consistencyMartin Nordholts-40/+40
All other arg properties use the `prop = value` style, which makes it slightly annoying to use the `prop(value)` style for `global`. Change to `prop = value` also for `global` for consistency.
2024-04-27bootstrap: Document `struct Builder` and its fieldsMartin Nordholts-0/+23
2024-04-26Auto merge of #124296 - cuviper:dist-cargo-tests, r=onur-ozkanbors-0/+6
bootstrap: keep all cargo test files in dist rustc-src Cargo tests use some files that we would otherwise exclude, especially the `cargo init` tests that are meant to deal with pre-existing `.git` and `.hg` repos and their ignore files. Keeping these in our dist tarball doesn't take much space, and allows distro builds to run these tests successfully.
2024-04-26miri core/alloc tests: do not test a 2nd targetRalf Jung-3/+0
2024-04-26Add support for run-make-support unit tests to be run with bootstrap commandJover Zhang-0/+49
Co-authored-by: Onur Özkan <onurozkan.dev@outlook.com>
2024-04-25Auto merge of #124058 - TechVest:master, r=fmeasebors-1/+1
Fix some typos in comments
2024-04-25Fix some typos in commentsTechVest-1/+1
Signed-off-by: TechVest <techdashen@qq.com>
2024-04-24bootstrap: reinterpret the main advantage of x.py setupJubilee Young-2/+3
2024-04-24bootstrap: link to the forge about toolstateJubilee Young-1/+3
2024-04-23bootstrap: keep all cargo test files in dist rustc-srcJosh Stone-0/+6
Cargo tests use some files that we would otherwise exclude, especially the `cargo init` tests that are meant to deal with pre-existing `.git` and `.hg` repos and their ignore files. Keeping these in our dist tarball doesn't take much space, and allows distro builds to run these tests successfully.
2024-04-22miri libstd tests: test windows-msvc instead of windows-gnuRalf Jung-2/+3
2024-04-22suggest `x.py vendor` instead of `cargo vendor`onur-ozkan-7/+1
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-04-22introduce `x vendor`onur-ozkan-4/+97
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-04-22drop deprecated value `if-available` for `download-ci-llvm` optiononur-ozkan-5/+0
It's been 5 months since we deprecated this. It should be fine to drop its support now. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-04-21bootstrap: Promote some build_steps comments to docsJubilee Young-28/+28
2024-04-21bootstrap: Describe build_steps::clean how 2024 knows itJubilee Young-1/+1
2024-04-21bootstrap: Demagic a repeating pathJubilee Young-2/+4
2024-04-21bootstrap: Describe build_steps::setupJubilee Young-0/+6
2024-04-21bootstrap: Describe build_steps::suggestJubilee Young-0/+2
2024-04-21bootstrap: Describe build_steps::toolstateJubilee Young-0/+4
2024-04-21bootstrap: Describe build_steps::runJubilee Young-0/+5
2024-04-21bootstrap: Describe build_steps::test for 2024Jubilee Young-3/+3
The description was most accurate when it was still called rustbuild, and I presume indeed did mostly run in CI. It has become something more so try to describe it better for current-day usage.
2024-04-21Rollup merge of #124069 - onur-ozkan:run-clippy-on-bootstrap, r=albertlarsan68Guillaume Gomez-169/+165
enable clippy for bootstrap on CI PRs (in `mingw-check` image) Let's keep the bootstrap codebase cleaner.
2024-04-19Rollup merge of #124155 - klensy:wrong-rayon-here, r=albertlarsan68Matthias Krüger-28/+1
bootstrap: don't use rayon for sysinfo It's looks overkill to use rayon to collect cpu usage
2024-04-19fix clippy warnings on bootstraponur-ozkan-169/+165
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-04-19Auto merge of #123364 - klensy:bs-mixed-types, r=albertlarsan68bors-7/+15
bootstrap: actually allow set debuginfo-level to "line-tables-only" I've tried to set in config.toml `rust.debuginfo-level = "line-tables-only"`, but ended with: ``` failed to parse TOML configuration 'config.toml': data did not match any variant of untagged enum StringOrInt for key `rust.debuginfo-level` ``` Also this PR allows to set `line-directives-only` for debuginfo in config.toml too. 1. Fixes this. Alternative is remove that Deserialize and use default one: https://github.com/rust-lang/rust/blob/0e682e9875458ebf811206a48b688e07d762d9bb/src/bootstrap/src/core/config/config.rs#L725-L728 2. Should `line-directives-only` be added too? 3. I've tried to add test to rust/src/bootstrap/src/core/config/tests.rs: ```rust #[test] fn rust_debuginfo() { assert!(matches!( parse("rust.debuginfo-level-rustc = 1").rust_debuginfo_level_rustc, DebuginfoLevel::Limited )); assert!(matches!( parse("rust.debuginfo-level-rustc = \"line-tables-only\"").rust_debuginfo_level_rustc, DebuginfoLevel::LineTablesOnly )); } ``` But test passes before that PR too; looks like config parse tests checks something wrong? I mean, that tests check something which isn't actual bootstrap behavior.
2024-04-19bootstrap: don't use rayon for sysinfoklensy-28/+1
It's looks overkill to use rayon to collect cpu usage
2024-04-18Update src/bootstrap/src/core/builder.rsscottmcm-1/+1
Co-authored-by: Onur Özkan <onurozkan.dev@outlook.com>