about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2024-04-02skip Codegen{GCC,Cranelift} when using CI rustconur-ozkan-0/+10
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-04-02Updated commentsAdam Gastineau-1/+1
2024-04-02x.py test: remove no-op --skip flagRalf Jung-5/+0
2024-04-01set miri sysroots inside Cargo::newRalf Jung-7/+13
2024-04-01Auto merge of #123192 - RalfJung:bootstrap-test-miri, r=onur-ozkanbors-129/+163
Refactor the way bootstrap invokes `cargo miri` Instead of basically doing `cargo run --manifest-path=<cargo-miri's manifest> -- miri`, let's invoke the `cargo-miri` binary directly. That means less indirections, and also makes it easier to e.g. run the libcore test suite in Miri. (But there are still other issues with that.) Also also adjusted Miri's stage numbering so that it is consistent with rustc/rustdoc. This also makes `./x.py test miri` honor `--no-doc`. And this fixes https://github.com/rust-lang/rust/issues/123177 by moving where we handle parallel_compiler.
2024-03-31fix not finding the right libraries on WindowsRalf Jung-3/+9
2024-03-31add FIXME for making the cargo cmd properly typedRalf Jung-5/+5
2024-03-31move parallel_compiler handling into prepare_tool_cargo so that it is done ↵Ralf Jung-16/+11
everywhere
2024-03-31remove a pointless env varRalf Jung-4/+0
CARGO_EXTRA_FLAGS is respected by the ./miri script which we are not invoking here
2024-03-31shift Miri's stage so that it matches other rustc-based toolsRalf Jung-57/+74
2024-03-31bootstrap/rustc: remove a miri hackRalf Jung-1/+1
2024-03-31Auto merge of #123246 - Kobzol:tarball-reproducible, r=Mark-Simulacrumbors-26/+49
Make source tarball generation more reproducible This PR performs several changes to source tarball generation (`x dist rustc-src`) in order to make it more reproducible (in light of the recent "xz backdoor"...). I want to follow up on it with making a separate CI workflow for generating the tarball. After this PR, running this locally produces identical checksums: ```bash $ ./x dist rustc-src $ sha256sum build/dist/rustc-1.79.0-src.tar.gz $ ./x dist rustc-src $ sha256sum build/dist/rustc-1.79.0-src.tar.gz ``` r? `@Mark-Simulacrum`
2024-03-31Remove potential `__pycache__` directories from src tarballsJakub Beránek-0/+14
2024-03-31Checkout all submodules when building source tarballsJakub Beránek-3/+3
2024-03-31Move submodule lookup to `Builder`Jakub Beránek-23/+32
2024-03-31Rollup merge of #123189 - Kobzol:rustc-shim-log, r=onur-ozkanMatthias Krüger-6/+6
Log BOLT args in bootstrap `rustc` shim Before, the BOLT argument would not be logged, because it was only added after the logging has happened. Found by `@RalfJung` [here](https://github.com/rust-lang/rust/pull/116352#discussion_r1544235771).
2024-03-30prepare_tool_cargo: add support for a miri-test mode, and use it in the ↵Ralf Jung-77/+85
cargo-miri smoke test and Miri sysroot build
2024-03-29Rollup merge of #123186 - onur-ozkan:llvm-library-bug, r=KobzolMatthias Krüger-2/+2
copy any file from stage0/lib to stage0-sysroot/lib With the LLVM 18 upgrade, the name of the LLVM library has been changed to something like `libLLVM.so.18.1-rust-1.78.0-beta`, which `is_dylib` function cannot determine as it only looks whether files are ending with ".so" or not. This change resolves this problem by no longer doing that ".so" check, as we need all files from the stage0/lib as they are all dependency of rustc anyway. Fixes #122913
2024-03-29Log BOLT args in bootstrap `rustc` shimJakub Beránek-6/+6
2024-03-29copy any file from stage0/lib to stage0-sysroot/libonur-ozkan-2/+2
With the LLVM 18 upgrade, the name of the LLVM library has been changed to something like `libLLVM.so.18.1-rust-1.78.0-beta`, which `is_dylib` function cannot determine as it only looks whether files are ending with ".so" or not. This change resolves this problem by no longer doing that ".so" check, as we need all files from the stage0/lib as they are all dependency of rustc anyway. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-03-28x.py test miri: respect --no-doc / --docRalf Jung-2/+14
2024-03-28create `Build::update_existing_submodule` and use for llvmonur-ozkan-0/+17
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-03-27Auto merge of #122205 - onur-ozkan:incorrect-sysroot-for-target, ↵bors-2/+6
r=albertlarsan68 ensure std is prepared for cross-targets Previously, doing `x test compiler/*` would result in build failures due to missing std. This PR fixes that.
2024-03-26Rollup merge of #123055 - onur-ozkan:miri-rustdoc, r=RalfJungMatthias Krüger-1/+5
enable cargo miri test doctests This was the cleanest solution that came to my mind so far. cc `@RalfJung` Resolves #123028
2024-03-26enable cargo miri test doctestsonur-ozkan-1/+5
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-03-25Rollup merge of #122892 - lovesegfault:versioned-vendor, r=onur-ozkanJubilee-0/+1
fix(bootstrap/dist): use versioned dirs when vendoring Currently, if you attempt to run ui tests in a vendored build, you will see this failure ``` ---- [ui] tests/ui/issues/issue-21763.rs stdout ---- diff of stderr: 8 = note: required because it appears within the type `(Rc<()>, Rc<()>)` 9 = note: required for `hashbrown::raw::RawTable<(Rc<()>, Rc<()>)>` to implement `Send` 10 note: required because it appears within the type `hashbrown::map::HashMap<Rc<()>, Rc<()>, RandomState>` - --> $HASHBROWN_SRC_LOCATION + --> /rust/deps/hashbrown/src/map.rs:190:12 12 note: required because it appears within the type `HashMap<Rc<()>, Rc<()>>` 13 --> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL 14 note: required by a bound in `foo` ``` This happens because the code that attempts to remap `HASHBROWN_SRC_LOCATION` expects it to be under `hashbrown-$version`, which is the case in a normal cargo registry, but not when vendoring, where by default crates may not have the version in their directory name. This change passes `--versioned-dirs` to `cargo vendor` to enforce that every crate includes the version in the subdir name, which fixes the ui test and brings `--enable-vendor` builds closer to normal ones.
2024-03-25Add more comments to the bootstrap code that handles `tests/coverage`Zalathar-16/+49
2024-03-23Auto merge of #122911 - Nilstrieb:live-love-patch, r=clubby789bors-8/+19
Fix nix patching for LLVM 18 LLVM 18 now ships `libLLVM*.so.*`, so `.so` is not the sole extension anymore, which breaks the dylib detection. Oops! Adjust it to only search for `.so` somewhere. fixes #122906
2024-03-23Auto merge of #119552 - krtab:dead_code_priv_mod_pub_field, r=cjgillot,saethlinbors-12/+3
Replace visibility test with reachability test in dead code detection Fixes https://github.com/rust-lang/rust/issues/119545 Also included is a fix for an error now flagged by the lint
2024-03-22Delete dead fields of deserialized cargo outputArthur Carcano-12/+3
The dead_code lint was previously eroneously missing this dead code. Since this lint bug has been fixed, the unused field need to be removed or marked as `#[allow(dead_code)]`. Given that this struct is deserialized without #[serde(deny_unknown_fields)] it is ok to simply delete the never read fields.
2024-03-22Fix nix patching for LLVM 18Nilstrieb-8/+19
LLVM 18 now ships `libLLVM*.so.*`, so `.so` is not the sole extension anymore, which breaks the dylib detection. Oops! Adjust it to only search for `.so` somewhere.
2024-03-22fix(bootstrap/dist): use versioned dirs when vendoringBernardo Meurer Costa-0/+1
Currently, if you attempt to run ui tests in a vendored build, you will see this failure ``` ---- [ui] tests/ui/issues/issue-21763.rs stdout ---- diff of stderr: 8 = note: required because it appears within the type `(Rc<()>, Rc<()>)` 9 = note: required for `hashbrown::raw::RawTable<(Rc<()>, Rc<()>)>` to implement `Send` 10 note: required because it appears within the type `hashbrown::map::HashMap<Rc<()>, Rc<()>, RandomState>` - --> $HASHBROWN_SRC_LOCATION + --> /rust/deps/hashbrown/src/map.rs:190:12 12 note: required because it appears within the type `HashMap<Rc<()>, Rc<()>>` 13 --> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL 14 note: required by a bound in `foo` ``` This happend because the code that attempts to remap `HASHBROWN_SRC_LOCATION` expects it to be under `hashbrown-$version`, which is the case in a normal cargo registry, but not when vendor, where by default crates may not have the version in their directory name. This change passes `--versioned-dirs` to `cargo vendor` to enforce that every crate includes the version in the subdir name, which fixes the ui test and brings `--enable-vendor` builds closer to normal ones.
2024-03-22Rollup merge of #122831 - onur-ozkan:less-verbose-fail-logs, r=clubby789Matthias Krüger-7/+15
make failure logs less verbose Resolves #122706 Logs without verbose flag: ![image](https://github.com/rust-lang/rust/assets/39852038/f2fc2d35-0954-44b0-bedc-045afedaabe8) Logs with verbose flag: ![image](https://github.com/rust-lang/rust/assets/39852038/b9308655-ad31-4527-a1be-5a62a78ac469) I decided to exclude command from the log since it's already included in verbose mode. cc ```@Nilstrieb```
2024-03-21make failure logs less verboseonur-ozkan-7/+15
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-03-20Inherit `RUSTC_BOOTSTRAP` when testing wasmAlex Crichton-0/+7
This is implemented with the freshly-released Wasmtime 19 and should prevent beta breakage from wasm tests that was observed and fixed in #122640 again.
2024-03-20Auto merge of #122754 - Mark-Simulacrum:bootstrap-bump, r=albertlarsan68bors-1/+1
Bump to 1.78 bootstrap compiler https://forge.rust-lang.org/release/process.html#master-bootstrap-update-t-2-day-tuesday
2024-03-20Fix bootstrap bump falloutMark Rousskov-1/+1
2024-03-20Rollup merge of #121543 - onur-ozkan:clippy-args, r=oli-obkMatthias Krüger-12/+84
various clippy fixes We need to keep the order of the given clippy lint rules before passing them. Since clap doesn't offer any useful interface for this purpose out of the box, we have to handle it manually. Additionally, this PR makes `-D` rules work as expected. Previously, lint rules were limited to `-W`. By enabling `-D`, clippy began to complain numerous lines in the tree, all of which have been resolved in this PR as well. Fixes #121481 cc `@matthiaskrgr`
2024-03-20resolve clippy errorsonur-ozkan-1/+1
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-03-18Support for visionOSAdam Gastineau-2/+4
2024-03-18Rollup merge of #122649 - cuviper:min-llvm-17, r=nikicMatthias Krüger-2/+2
Update the minimum external LLVM to 17 With this change, we'll have stable support for LLVM 17 and 18. For reference, the previous increase to LLVM 16 was #117947.
2024-03-18Auto merge of #122646 - saethlin:library-frame-pointers, r=onur-ozkanbors-0/+4
Enable frame pointers for the standard library There's been a few past experiments for enabling frame pointers for all our artifacts. I don't think that frame pointers in the distributed compiler are nearly as useful as frame pointers in the standard library. Our users are much more likely to be profiling apps written in Rust than they are profiling the Rust compiler. So yeah it would be cool to have frame pointers in the compiler, but much more of the value is having them on the precompiled standard library. That's what this PR does.
2024-03-17LLVM bitcode linker: use --cfg=parallell_compiler to avoid trashing the ↵Kjetil Kjeka-1/+73
cache of rustdoc
2024-03-18use `--cap-lints` only when deny and forbid rules are not specifiedonur-ozkan-2/+7
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-03-18pass ignored lints after manual onesonur-ozkan-1/+1
Previously, when passing lint rules manually using `x clippy ..`, ignored lints would override manual ones. This change corrects the order by passing ignored lints after the manual ones. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-03-18add unit test: `order_of_clippy_rules`onur-ozkan-5/+49
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-03-18reorder clippy rules to their original order before passing themonur-ozkan-6/+29
We need to keep the order of the given clippy lint rules before passing them. Since clap doesn't offer any useful interface for this purpose out of the box, we have to handle it manually. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-03-17Update the minimum external LLVM to 17Josh Stone-2/+2
2024-03-17Enable frame pointers for the libraryBen Kimock-0/+4
2024-03-17fetch submodule before checking llvm stamponur-ozkan-1/+1
Previously, we were checking the LLVM stamp before fetching the submodule which leads to not being able to compile llvm on submodule updates. Signed-off-by: onur-ozkan <work@onurozkan.dev>