about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
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-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-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-21bootstrap: Promote some build_steps comments to docsJubilee Young-28/+28
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>
2024-04-18Ensure `[rust] debuginfo-level-std` doesn't change core's MIRScott McMurray-0/+8
2024-04-17Auto merge of #123978 - alexcrichton:update-wasi-toolchain, r=Mark-Simulacrumbors-20/+38
Update how WASI toolchains are used in CI and bootstrap This commit updates how the WASI targets are configured with their toolchain. Long ago a `config.toml` option of `wasi-root` was added to enable building with the WASI files produced by wasi-libc. Additionally for CI testing and release building the Rust toolchain has been using a hard-coded commit of wasi-libc which is bundled with the release of the `wasm32-wasip1` target, for example. Nowadays though the wasi-sdk project, the C/C++ toolchain for WASI, is the go-to solution for compiling/linking WASI code and contains the more-or-less official releases of wasi-libc. This commit migrates CI to using wasi-sdk releases and additionally updates `bootstrap` to recognize when this is configured. This means that with `$WASI_SDK_PATH` configured there's no further configuration necessary to get a working build. Notably this also works better for the new targets of WASI as well, such as `wasm32-wasip2` and `wasm32-wasip1-threads` where the wasi-sdk release now has libraries for all targets bundled within it.
2024-04-17allow to set line-directives-only tooklensy-0/+5
2024-04-17bootstrap: actually allow set debuginfo-level to "lines-tables-only"klensy-7/+10
2024-04-17Rollup merge of #122883 - onur-ozkan:clippy-build-step, r=albertlarsan68Matthias Krüger-102/+394
refactor clippy in bootstrap Previously, using clippy in bootstrap was not very useful as explained in #122825. In short, regardless of the given path clippy would always check the entire compiler and std tree. This makes it impossible to run clippy on different paths with different set of rules. This PR fixes that by allowing developers to run clippy with specific rules on specific paths (e.g., we can run `x clippy compiler -Aclippy::all -Dclippy::correctness` and `x clippy library/std -Dclippy::all` and none of them will affect each other). Resolves #122825
2024-04-16allow running clippy on most of the in-tree toolsonur-ozkan-14/+63
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-04-16fix sysroot bug and update step message formatonur-ozkan-19/+6
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-04-16add simple top-level doc-comment for build_steps/clippyonur-ozkan-0/+2
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-04-16for clippy, skip output handling in `run_cargo`onur-ozkan-1/+1
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-04-16support different `Kind`s in `Builder::msg_tool`onur-ozkan-3/+16
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-04-16create `Builder::msg_clippy`onur-ozkan-9/+15
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-04-16create new build step `clippy`onur-ozkan-100/+335
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-04-16Rollup merge of #123711 - onur-ozkan:drop-changelog-seen, r=albertlarsan68Matthias Krüger-19/+6
drop `changelog-seen` It's been 7 months since we deprecated this. It should be fine to remove it now.
2024-04-16Rollup merge of #122632 - onur-ozkan:fix-llvm-caching-bug, r=albertlarsan68Matthias Krüger-1/+18
fetch submodule before checking llvm stamp Previously, we were checking the LLVM stamp before fetching the submodule which leads to not being able to compile llvm on submodule updates. Fixes #122612 Fixes #122787
2024-04-16Rollup merge of #122521 - bnleft:master, r=albertlarsan68Guillaume Gomez-0/+7
doc(bootstrap): add top-level doc-comment to utils/tarball.rs
2024-04-15Update how WASI toolchains are used in CI and bootstrapAlex Crichton-20/+38
This commit updates how the WASI targets are configured with their toolchain. Long ago a `config.toml` option of `wasi-root` was added to enable building with the WASI files produced by wasi-libc. Additionally for CI testing and release building the Rust toolchain has been using a hard-coded commit of wasi-libc which is bundled with the release of the `wasm32-wasip1` target, for example. Nowadays though the wasi-sdk project, the C/C++ toolchain for WASI, is the go-to solution for compiling/linking WASI code and contains the more-or-less official releases of wasi-libc. This commit migrates CI to using wasi-sdk releases and additionally updates `bootstrap` to recognize when this is configured. This means that with `$WASI_SDK_PATH` configured there's no further configuration necessary to get a working build. Notably this also works better for the new targets of WASI as well, such as `wasm32-wasip2` and `wasm32-wasip1-threads` where the wasi-sdk release now has libraries for all targets bundled within it.
2024-04-15Rollup merge of #123548 - RalfJung:what-is-time, r=joboet许杰友 Jieyou Xu (Joe)-1/+1
libtest: also measure time in Miri A long time ago we disabled timekeeping of the default test harness in Miri, as otherwise it would fail to run without `-Zmiri-disable-isolation`. However, since then Miri gained a "fake clock" that lets it present some deterministic notion of time when isolation is enabled. So we could now let libtest do timekeeping again when running in Miri. That's nice as it can help detect tests that run too long. However it can also be confusing as the results with isolation can be quite different than the real time. ``@rust-lang/miri`` what do you think?
2024-04-15Distribute LLVM bitcode linker as a preview componentKjetil Kjeka-3/+71
2024-04-15libtest: also measure time in MiriRalf Jung-1/+1
2024-04-15Auto merge of #122997 - matthiaskrgr:compiletest_ices, r=oli-obkbors-0/+3
compiletest ice tracking see https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/where.20to.20mass-add.20known.20ices.20.2F.20merging.20glacier.20into.20rust/near/429082963 This will allow us to sunset most of https://github.com/rust-lang/glacier The rustc ices will be tracked directly inside the rust testsuite There are a couple of .sh tests remaining that I have not ported over yet. This adds `tests/crashes`, a file inside this directory MUST ice, otherwise it is considered test-fail. This will be used to track ICEs from glacier and the bugtracker. When someones pr accidentally fixes one of these ICEs, they can move the test from `crashes` into `ui` for example. I also added a new tidy lint that warns when a test inside `tests/crashes` does not have a `//@ known-bug: ` line the env var `COMPILETEST_VERBOSE_CRASHES` can be set to get exit code, stderr and stdout of a crash-test to aid debugging/adding tests.
2024-04-14Rollup merge of #123373 - onur-ozkan:skip-codegen, r=Mark-SimulacrumGuillaume Gomez-0/+10
skip Codegen{GCC,Cranelift} when using CI rustc CI rustc uses the default codegen backend, therefore we can't run `CodegenGCC` and `CodegenCranelift` tests when using it. cc `@bjorn3` (to make sure I am not doing anything wrong) Fixes #123331
2024-04-14bootstrap/compiletest: implement "crashes" tests that fail if no ice is ↵Matthias Krüger-0/+3
reproduced
2024-04-13Auto merge of #123520 - cuviper:bootstrap-compiler-rustflags, r=Mark-Simulacrumbors-54/+59
bootstrap: move all of rustc's flags to `rustc_cargo` This ensures that `RUSTFLAGS` will be consistent between all modes of building the compiler, so they won't trigger a rebuild by cargo. This kind of fix was started in #119414 just for LTO flags, but it's applicable to all kinds of flags that might be configured.
2024-04-13Rollup merge of #123642 - onur-ozkan:restrict-llvm-option, r=Mark-SimulacrumMatthias Krüger-2/+13
do not allow using local llvm while using rustc from ci From: https://github.com/rust-lang/rust/issues/123586#issuecomment-2043296578 > Even if `llvm.download-ci-llvm` is set to true, `stage > 0` rustc will always use the prebuilt LLVM library which comes with ci-rustc. So I tried to use locally-built LLVM libraries in the ci-rustc by replacing the existing LLVM libraries with the locally built ones, and it appears that this is indeed a limitation of using `rust.download-rustc=true` as it fails with the following error: > > ``` > $ ./build/host/ci-rustc/bin/rustc --version > ./build/host/ci-rustc/bin/rustc: symbol lookup error: /home/nimda/devspace/.other/rustc-builds/build/x86_64-unknown-linux-gnu/ci-rustc/bin/../lib/librustc_driver-a03ea465d8e03db1.so: undefined symbol: LLVMInitializeARMTargetInfo, version LLVM_18.1 > ``` > > So, if `rust.download-rustc` is set to true and `llvm.download-ci-llvm` is false, I believe bootstrap should terminate the process (as it always uses prebuilt LLVM libraries from ci-rustc, there is no point to build LLVM locally) while parsing the configuration. Resolves #123586 r? Mark-Simulacrum
2024-04-11correct the handling of `bootstrap-cache-path` optiononur-ozkan-1/+3
This change makes `build.bootstrap-cache-path` option to be configurable with `./configure` script, so it can be used like `./configure --bootstrap-cache-path=demo`. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-04-10add change entry for the removal of `changelog-seen`onur-ozkan-0/+5
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-04-10drop `changelog-seen`onur-ozkan-19/+1
It's been 7 months since we deprecated this. It should be fine to remove it now. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-04-09do not allow using local llvm while using rustc from cionur-ozkan-2/+13
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-04-08Rollup merge of #123547 - klensy:bs-pubs, r=onur-ozkanMatthias Krüger-30/+0
bootstrap: remove unused pub fns Looks dead, remove.
2024-04-07also test core+alloc on a 32bit big-endian targetRalf Jung-1/+5
2024-04-07run some std tests on more targetsRalf Jung-11/+28
2024-04-07also test parts of stdRalf Jung-0/+10
requires disabling some tests that do not work
2024-04-07check-aux: test core and alloc in MiriRalf Jung-0/+10
2024-04-06Rollup merge of #123504 - RalfJung:test-cargo-miri, r=Mark-SimulacrumMatthias Krüger-4/+36
bootstrap: split cargo-miri test into separate Step This makes it easier to test just the driver or the cargo-miri integration. ````@rust-lang/miri```` this means to test both you now need to do `./x.py test miri cargo-miri`.
2024-04-06bootstrap: remove unused pub fnsklensy-30/+0