about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2025-05-03Rollup merge of #140582 - GuillaumeGomez:update-sysinfo, r=KobzolMatthias Krüger-16/+131
Update sysinfo to `0.35.0` in bootstrap and `tools/opt-dist` This release is mostly bugfixes and code improvements.
2025-05-02Update sysinfo version to `0.35.0`Guillaume Gomez-16/+131
2025-05-01extend the list of registered dylibs on `test::prepare_cargo_test`onur-ozkan-3/+3
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-04-30Rollup merge of #140438 - ferrocene:pa-debug-assertions-tools, r=KobzolMatthias Krüger-5/+22
Add `rust.debug-assertions-tools` option Before this PR, the two only options to configure the presence of debug assertions were the `rust.debug-assertions` and `rust.debug-assertions-std` options. The former applied to everything, and the latter allowed to override the setting just for the standard library. This combination of settings doesn't allow to enable debug assertions for the std and the compiler but not tools. Some tools (like Cargo) are not really meant to be executed with debug assertions enabled, and in Ferrocene we hit some debug assertions in it that are exclusively meant for its test suite. We'd thus like to enable debug assertions everywhere but in tools. This PR adds a `rust.debug-assertions-tools` setting that does exactly this.
2025-04-29Rollup merge of #140392 - Zalathar:goodbye-libtest, r=jieyouxuTrevor Gross-1/+1
compiletest: Remove the libtest-based executor and its dependency Now that #140288 has landed and the new compiletest executor is used by default, we can now move forward with removing the libtest dependency from compiletest. My hope is that after landing this, we can configure bootstrap to build compiletest with the pre-built stage0 library by default, instead of the in-tree stage0 library. That would give the stage0 redesign one less thing to worry about. --- This PR has deliberately been kept small and simple, to make it easier to revert if necessary. Further cleanup can take palce after we're confident that it won't need to be reverted. r? jieyouxu Blocker for https://github.com/rust-lang/rust/pull/119899
2025-04-29add `rust.debug-assertions-tools` optionPietro Albini-5/+22
2025-04-28Make bootstrap git tests more self-containedJakub Beránek-0/+3
2025-04-28compiletest: Remove the libtest-based executor and its dependencyZalathar-1/+1
This patch has deliberately been kept small and simple, to make it easier to revert if necessary. Further cleanup can take palce after we're confident that it won't need to be reverted.
2025-04-28add a FIXMEonur-ozkan-2/+3
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-04-27bypass linker configuration and cross target check on `x check`onur-ozkan-1/+2
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-04-25Rollup merge of #140006 - onur-ozkan:138778, r=onur-ozkanMatthias Krüger-5/+50
ensure compiler existance of tools on the dist step Fixes https://github.com/rust-lang/rust/issues/138778 with a coverage on https://github.com/rust-lang/rust/issues/138123 and https://github.com/rust-lang/rust/issues/138004. try-job: dist-powerpc64le-linux
2025-04-24Rollup merge of #140191 - Kobzol:remove-git-repository-from-git-config, ↵Matthias Krüger-4/+0
r=jieyouxu Remove git repository from git config It is no longer needed after https://github.com/rust-lang/rust/pull/138591. We could even remove the `nightly_branch` field, but it still has one usage. r? ``@jieyouxu``
2025-04-24Rollup merge of #140232 - nnethercote:rm-unnecessary-clones, r=SparrowLiiMatthias Krüger-3/+3
Remove unnecessary clones r? `@SparrowLii`
2025-04-24Remove some unnecessary clones.Nicholas Nethercote-3/+3
I found these by grepping for `&[a-z_\.]*\.clone()`, i.e. expressions like `&a.b.clone()`, which are sometimes unnecessary clones, and also looking at clones nearby to cases like that.
2025-04-23Auto merge of #139983 - flip1995:clippy-subtree-update, r=Manishearthbors-4/+0
Clippy subtree update r? `@Manishearth` Cargo.lock update due to the Clippy version bump and because Clippy moved from rinja (unmaintained) to askama. Last sync was skipped due to the askama issue and me not getting to fixing this in time.
2025-04-23Remove `git_repository` field from `GitConfig`Jakub Beránek-4/+0
It is no longer needed after a recent refactoring.
2025-04-22tidy: Remove rinja deps from proc_macro_depsPhilipp Krones-4/+0
2025-04-20Use `--author-date-order` when looking up upstream commits to support ↵Jakub Beránek-2/+79
subtree synces
2025-04-20Make `git_dir` required in several git functionsJakub Beránek-9/+3
It was always called with `Some`, so no need to complicate it with `Option`.
2025-04-20Return `PathFreshness::MissingUpstream` from `detect_[gcc|llvm]_freshness` ↵Jakub Beránek-12/+10
functions
2025-04-20Extend `ci_rustc_if_unchanged` testsJakub Beránek-32/+77
2025-04-20Move freshness test to bootstrapJakub Beránek-5/+395
2025-04-20Cache result of `check_path_modifications`Jakub Beránek-4/+24
2025-04-20Unify usages of path modifications and log them in verbose modeJakub Beránek-54/+38
2025-04-20Explicitly model missing upstreamJakub Beránek-1/+13
It shouldn't really happen, but if it does, at least we will have an explicit record of it.
2025-04-20Use `check_path_modifications` for detecting local rustc changesJakub Beránek-87/+23
And get rid of `get_closest_merge_commit`.
2025-04-20Use `check_path_modifications` for detecting local LLVM changesJakub Beránek-18/+42
2025-04-20Use `check_path_modifications` for detecting local GCC changesJakub Beránek-26/+46
2025-04-20Implement a new unified function for figuring out how if a set of paths have ↵Jakub Beránek-5/+5
been modified locally Also adds several git tests to make sure that the behavior works in common cases (PR CI, auto CI, local usage).
2025-04-20Auto merge of #140043 - ChrisDenton:rollup-vwf0s9j, r=ChrisDentonbors-20/+329
Rollup of 8 pull requests Successful merges: - #138934 (support config extensions) - #139091 (Rewrite on_unimplemented format string parser.) - #139753 (Make `#[naked]` an unsafe attribute) - #139762 (Don't assemble non-env/bound candidates if projection is rigid) - #139834 (Don't canonicalize crate paths) - #139868 (Move `pal::env` to `std::sys::env_consts`) - #139978 (Add citool command for generating a test dashboard) - #139995 (Clean UI tests 4 of n) r? `@ghost` `@rustbot` modify labels: rollup
2025-04-19Rollup merge of #140000 - EnzymeAD:autodiff-check-builds, r=onur-ozkanChris Denton-2/+1
skip llvm-config in autodiff check builds, when its unavailable As you suggested, this indeed fixes `./x.py check` builds when autodiff is enabled. r? ```@onur-ozkan``` closes #139936 Tracking: - https://github.com/rust-lang/rust/issues/124509
2025-04-19Rollup merge of #139843 - thaliaarchi:editor-file-associations, ↵Chris Denton-0/+3
r=Mark-Simulacrum Setup editor file associations for non-rs extensions .gitattributes lists `*.fixed`, `*.pp`, and `*.mir` as file extensions which should be treated as Rust source code. Do the same for VS Code and Zed. This only does syntax highlighting, which is appropriate, as MIR isn't really Rust code. At the same time, consistently order `rust-analyzer.linkedProjects` between editors. For some reason, Eglot didn't include `library/Cargo.toml`. I have tested this with VS Code and Zed. I have not implemented it for Emacs/Eglot or Helix.
2025-04-19Rollup merge of #138934 - onur-ozkan:extended-config-profiles, r=KobzolChris Denton-20/+329
support config extensions _Copied from the `rustc-dev-guide` addition:_ >When working on different tasks, you might need to switch between different bootstrap >configurations. >Sometimes you may want to keep an old configuration for future use. But saving raw config >values in >random files and manually copying and pasting them can quickly become messy, especially if >you have a >long history of different configurations. > >To simplify managing multiple configurations, you can create config extensions. > >For example, you can create a simple config file named `cross.toml`: > >```toml >[build] >build = "x86_64-unknown-linux-gnu" >host = ["i686-unknown-linux-gnu"] >target = ["i686-unknown-linux-gnu"] > > >[llvm] >download-ci-llvm = false > >[target.x86_64-unknown-linux-gnu] >llvm-config = "/path/to/llvm-19/bin/llvm-config" >``` > >Then, include this in your `bootstrap.toml`: > >```toml >include = ["cross.toml"] >``` > >You can also include extensions within extensions recursively. > >**Note:** In the `include` field, the overriding logic follows a right-to-left order. For example, in `include = ["a.toml", "b.toml"]`, extension `b.toml` overrides `a.toml`. Also, parent extensions always overrides the inner ones. try-job: x86_64-mingw-2
2025-04-18add regression test for dist compilationonur-ozkan-0/+32
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-04-18add coverage on config include logiconur-ozkan-2/+209
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-04-18ensure compiler existance of tools on the dist steponur-ozkan-5/+18
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-04-18skip llvm-config in autodiff check builds, when its unavailableManuel Drehwald-2/+1
2025-04-18Rollup merge of #139853 - Kobzol:lld-llvm-config, r=onur-ozkanMatthias Krüger-56/+65
Disable combining LLD with external llvm-config When an external `llvm-config` is used, we don't really know anything about the external LLD, as we don't build it ourselves. Therefore, we probably shouldn't allow using `rust-lld` nor copy it to the target sysroot. Fixes: https://github.com/rust-lang/rust/issues/139477 CC ``@cuviper`` r? ``@onur-ozkan`` try-job: dist-x86_64-linux try-job: dist-aarch64-linux
2025-04-17Rollup merge of #139931 - ognevny:bootstrap-llvm-zlib, r=KobzolMatthias Krüger-3/+3
bootstrap: enable zlib for LLVM for Windows GNU when compiling target LLVM with `opt-dist local` on Windows/MinGW, profraw files are being compressed with zlib, so compiling without it will make `llvm-profdata` complain about lacking of zlib support. this error is shown: `profile uses zlib compression but the profile reader was built without zlib support` example from llvm test suite: https://github.com/llvm/llvm-project/blob/76b5fcbf975547251faaeed8b567ea09d139a607/llvm/test/tools/llvm-profdata/nocompress.test#L15. implementation of step 3. from https://rust-lang.zulipchat.com/#narrow/channel/122651-general/topic/experiment.20with.20.60opt-dist.20local.60.20in.20MSYS2/near/512393873 r? Kobzol
2025-04-17bootstrap: enable zlib for LLVM when we compile it for profilingMaksim Bondarenkov-3/+3
when compiling target LLVM with `opt-dist local` on Windows/MinGW, profraw files are being compressed with zlib, so compiling without it will make `llvm-profdata` complain about lacking of zlib support. this error is shown: `profile uses zlib compression but the profile reader was built without zlib support` example from llvm test suite: https://github.com/llvm/llvm-project/blob/76b5fcbf975547251faaeed8b567ea09d139a607/llvm/test/tools/llvm-profdata/nocompress.test#L15
2025-04-16Auto merge of #138011 - tnewsome-lynx:lynxos_178-nostd, r=davidtwcobors-0/+1
Add minimal x86_64-lynx-lynxos178 support. Add minimal x86_64-lynx-lynxos178 support. It's possible to build no_std programs with this compiler. ## Tier 3 Target Policy > A tier 3 target must have a designated developer or developers (the "target maintainers") on record to be CCed when issues arise regarding the target. (The mechanism to track and CC such developers may evolve over time.) Tim Newsome (`@tnewsome-lynx)` will be the designated developer for x86_64-lynx-lynxos178 support. > Targets must use naming consistent with any existing targets; for instance, a target for the same CPU or OS as an existing Rust target should use the same name for that CPU or OS. Targets should normally use the same names and naming conventions as used elsewhere in the broader ecosystem beyond Rust (such as in other toolchains), unless they have a very good reason to diverge. Changing the name of a target can be highly disruptive, especially once the target reaches a higher tier, so getting the name right is important even for a tier 3 target. I believe the target is named appropriately. > Target names should not introduce undue confusion or ambiguity unless absolutely necessary to maintain ecosystem compatibility. For example, if the name of the target makes people extremely likely to form incorrect beliefs about what it targets, the name should be changed or augmented to disambiguate it. The target name is not confusing. > If possible, use only letters, numbers, dashes and underscores for the name. Periods (.) are known to cause issues in Cargo. Done. > Tier 3 targets may have unusual requirements to build or use, but must not create legal issues or impose onerous legal terms for the Rust project or for Rust developers or users. > The target must not introduce license incompatibilities. > Anything added to the Rust repository must be under the standard Rust license (MIT OR Apache-2.0). All this new code is licensed under the Apache-2.0 license. > The target must not cause the Rust tools or libraries built for any other host (even when supporting cross-compilation to the target) to depend on any new dependency less permissive than the Rust licensing policy. This applies whether the dependency is a Rust crate that would require adding new license exceptions (as specified by the tidy tool in the rust-lang/rust repository), or whether the dependency is a native library or binary. In other words, the introduction of the target must not cause a user installing or running a version of Rust or the Rust tools to be subject to any new license requirements. Done. > Compiling, linking, and emitting functional binaries, libraries, or other code for the target (whether hosted on the target itself or cross-compiling from another target) must not depend on proprietary (non-FOSS) libraries. Host tools built for the target itself may depend on the ordinary runtime libraries supplied by the platform and commonly used by other applications built for the target, but those libraries must not be required for code generation for the target; cross-compilation to the target must not require such libraries at all. For instance, rustc built for the target may depend on a common proprietary C runtime library or console output library, but must not depend on a proprietary code generation library or code optimization library. Rust's license permits such combinations, but the Rust project has no interest in maintaining such combinations within the scope of Rust itself, even at tier 3. I think we're in the clear here. We do link against some static libraries that are proprietary (like libm and libc), but those are not used to generate code. E.g. the VxWorks target requires `wr-c++` to be installed, which is not publically available. > "onerous" here is an intentionally subjective term. At a minimum, "onerous" legal/licensing terms include but are not limited to: non-disclosure requirements, non-compete requirements, contributor license agreements (CLAs) or equivalent, "non-commercial"/"research-only"/etc terms, requirements conditional on the employer or employment of any particular Rust developers, revocable terms, any requirements that create liability for the Rust project or its developers or users, or any requirements that adversely affect the livelihood or prospects of the Rust project or its developers or users. Our intention is to allow anyone with access to LynxOS CDK to use Rust for it. > Neither this policy nor any decisions made regarding targets shall create any binding agreement or estoppel by any party. If any member of an approving Rust team serves as one of the maintainers of a target, or has any legal or employment requirement (explicit or implicit) that might affect their decisions regarding a target, they must recuse themselves from any approval decisions regarding the target's tier status, though they may otherwise participate in discussions. > This requirement does not prevent part or all of this policy from being cited in an explicit contract or work agreement (e.g. to implement or maintain support for a target). This requirement exists to ensure that a developer or team responsible for reviewing and approving a target does not face any legal threats or obligations that would prevent them from freely exercising their judgment in such approval, even if such judgment involves subjective matters or goes beyond the letter of these requirements. No problem. > Tier 3 targets should attempt to implement as much of the standard libraries as possible and appropriate (core for most targets, alloc for targets that can support dynamic memory allocation, std for targets with an operating system or equivalent layer of system-provided functionality), but may leave some code unimplemented (either unavailable or stubbed out as appropriate), whether because the target makes it impossible to implement or challenging to implement. The authors of pull requests are not obligated to avoid calling any portions of the standard library on the basis of a tier 3 target not implementing those portions. With this first PR, only core is supported. I am working on support for the std library and intend to submit that once all the tests are passing. > The target must provide documentation for the Rust community explaining how to build for the target, using cross-compilation if possible. If the target supports running binaries, or running tests (even if they do not pass), the documentation must explain how to run such binaries or tests for the target, using emulation if possible or dedicated hardware if necessary. This is documented in `src/doc/rustc/src/platform-support/lynxos178.md`. > Tier 3 targets must not impose burden on the authors of pull requests, or other developers in the community, to maintain the target. In particular, do not post comments (automated or manual) on a PR that derail or suggest a block on the PR based on a tier 3 target. Do not send automated messages or notifications (via any medium, including via `@)` to a PR author or others involved with a PR regarding a tier 3 target, unless they have opted into such messages. > Backlinks such as those generated by the issue/PR tracker when linking to an issue or PR are not considered a violation of this policy, within reason. However, such messages (even on a separate repository) must not generate notifications to anyone involved with a PR who has not requested such notifications. Understood. > Patches adding or updating tier 3 targets must not break any existing tier 2 or tier 1 target, and must not knowingly break another tier 3 target without approval of either the compiler team or the maintainers of the other tier 3 target. > In particular, this may come up when working on closely related targets, such as variations of the same architecture with different features. Avoid introducing unconditional uses of features that another variation of the target may not have; use conditional compilation or runtime detection, as appropriate, to let each target run code supported by that target. As far as I know this change does not affect any other targets. > Tier 3 targets must be able to produce assembly using at least one of rustc's supported backends from any host target. (Having support in a fork of the backend is not sufficient, it must be upstream.) Many targets produce assembly for x86_64 so that also works for LynxOS-178.
2025-04-16resolve config include FIXMEonur-ozkan-8/+8
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-04-16Add a warning when combining LLD with external LLVM configJakub Beránek-1/+7
2025-04-16Rollup merge of #139867 - WaffleLapkin:tidypaper, r=jieyouxuMatthias Krüger-13/+24
Fix some tidy paper cuts The main thing this fixes is that currently, if you run `x t tidy` it will format ~6K files, even though it's supposed to format only modified files (whatever this is a useful optimization or not is besides the point). The problem is that `x t tidy` never writes the `rustfmt` stamp, so it always assumes `rustfmt` that was last used is outdated and we need to recheck everything. This PR fixes it by actually writing the stamp. There are also some minor tweaks to comments/diagnostics. cc ```@Kobzol``` this probably conflicts with #138591. I didn't fix anything, just tried to document better the status quo. r? ```@jieyouxu```
2025-04-16Rollup merge of #139823 - WaffleLapkin:bootpaper, r=jieyouxuMatthias Krüger-0/+7
Fix some bootstrap papercuts ... related to jj and my `./build` symlink setup[^1]. I'm not sure if these are good solutions, but they seem to work. See commits for a bit more info. r? ``@jieyouxu`` [^1]: see #139804
2025-04-15commit rustfmt stump in `x t tidy` even on `check`Waffle Lapkin-3/+6
If checking succeeded, it's equivalent to successfully formatting.
2025-04-15add comment in `TomlConfig::merge` about the merge orderonur-ozkan-0/+2
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-04-15add a comment for code that isn'tWaffle Lapkin-1/+7
2025-04-15slightly correct comments and diagnostics about checking modificationsWaffle Lapkin-8/+9
I feel like they are still wrong, but maybe less so .-. The `info:` was unhelpful -- we only use upstream in CI nowdays.
2025-04-15use helper function instead of writing rustfmt stamp by handWaffle Lapkin-1/+2