about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2025-08-07update enzyme submodule to handle llvm 21Manuel Drehwald-0/+1
2025-08-07Add minimal `armv7a-vex-v5` supportLewis McClelland-0/+1
> 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.) Lewis McClelland (lewisfm), Tropix126, Gavin Niederman (Gavin-Niederman), and Max Niederman (max-niederman) will be the designated maintainers for `armv7a-vex-v5` 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. `armv7a-vex-v5` follows the cpu-vendor-model convention used by most tier three targets. For example: `armv76k-nintendo-3ds` or `armv7k-apple-watchos`. > 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. > If possible, use only letters, numbers, dashes and underscores for the name. Periods (.) are known to cause issues in Cargo. This target name is not confusing. > 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. It's using open source tools only. > 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). Understood. > 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. There are no new dependencies/features required in the current state of this target. Porting the standard library will likely require depending on the crate `vex-sdk` which is MIT-licensed and contains bindings to the VEX SDK runtime (which is included in VEXos). > 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. > > "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. Although the VEX V5 Brain and its SDK are proprietary, this target does not link to any proprietary binaries or libraries, and is based solely on publicly available information about the VEX SDK. > 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. I understand. > 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. This initial PR only contains a compiler target definition to teach the `cc` crate about this target. Porting the standard library is the next step for this target. > 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 target is documented in `src/doc/rustc/src/platform-support/armv7a-vex-v5.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. I understand and assent. > 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. I understand and assent. > 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.) `armv7a-vex-v5` has nearly identical codegen to `armv7a-none-eabihf`, so this is not an issue. > If a tier 3 target stops meeting these requirements, or the target maintainers no longer have interest or time, or the target shows no signs of activity and has not built for some time, or removing the target would improve the quality of the Rust codebase, we may post a PR to remove it; any such PR will be CCed to the target maintainers (and potentially other people who have previously worked on the target), to check potential interest in improving the situation. I understand. Co-authored-by: Max Niederman <max@maxniederman.com> Co-authored-by: Tropical <42101043+Tropix126@users.noreply.github.com> Co-authored-by: Gavin Niederman <gavinniederman@gmail.com>
2025-08-07Auto merge of #145043 - Zalathar:rollup-3dbvdrm, r=Zalatharbors-65/+95
Rollup of 19 pull requests Successful merges: - rust-lang/rust#137831 (Tweak auto trait errors) - rust-lang/rust#138689 (add nvptx_target_feature) - rust-lang/rust#140267 (implement continue_ok and break_ok for ControlFlow) - rust-lang/rust#143028 (emit `StorageLive` and schedule `StorageDead` for `let`-`else`'s bindings after matching) - rust-lang/rust#143764 (lower pattern bindings in the order they're written and base drop order on primary bindings' order) - rust-lang/rust#143808 (Port `#[should_panic]` to the new attribute parsing infrastructure ) - rust-lang/rust#143906 (Miri: non-deterministic floating point operations in `foreign_items`) - rust-lang/rust#143929 (Mark all deprecation lints in name resolution as deny-by-default and report-in-deps) - rust-lang/rust#144133 (Stabilize const TypeId::of) - rust-lang/rust#144369 (Upgrade semicolon_in_expressions_from_macros from warn to deny) - rust-lang/rust#144439 (Introduce ModernIdent type to unify macro 2.0 hygiene handling) - rust-lang/rust#144473 (Address libunwind.a inconsistency issues in the bootstrap program) - rust-lang/rust#144601 (Allow `cargo fix` to partially apply `mismatched_lifetime_syntaxes`) - rust-lang/rust#144650 (Additional tce tests) - rust-lang/rust#144659 (bootstrap: refactor mingw dist and fix gnullvm) - rust-lang/rust#144682 (Stabilize `strict_overflow_ops`) - rust-lang/rust#145026 (Update books) - rust-lang/rust#145033 (Reimplement `print_region` in `type_name.rs`.) - rust-lang/rust#145040 (rustc-dev-guide subtree update) Failed merges: - rust-lang/rust#143857 (Port #[macro_export] to the new attribute parsing infrastructure) r? `@ghost` `@rustbot` modify labels: rollup
2025-08-07Auto merge of #144997 - BoxyUwU:bootstrap_bump, r=Mark-Simulacrumbors-46/+14
bump bootstrap compiler to 1.90 beta There were significantly less `cfg(bootstrap)` and `cfg(not(bootstrap))` this release. Presumably due to the fact that we change the bootstrap stage orderings to reduce the need for them and it was successful :pray:
2025-08-07Rollup merge of #144659 - mati865:gnullvm-vendor-libunwind, r=KobzolStuart Cook-60/+82
bootstrap: refactor mingw dist and fix gnullvm Fixes https://github.com/rust-lang/rust/issues/144533 The first two commits are NFC and only clean up the code, paving the way for the third commit. That said, I think they are worthwhile even without that fix - reusing the same function for two different outcomes was confusing. The third commit is the fix for https://github.com/rust-lang/rust/issues/144533, but due to the cross-compilation dance it requires a workaround to find the DLL since that logic really was meant only for Windows builders. That workaround is short-lived and will be removed as soon as gnullvm bootstraps itself.
2025-08-07Rollup merge of #144473 - zeroomega:rustc_inconsistency, r=Mark-SimulacrumStuart Cook-5/+13
Address libunwind.a inconsistency issues in the bootstrap program We noticed when building rustc multiple time in a roll, some files will not be consistent across the build despite the fact that they are built from same source under the same environment. This patch addresses the inconsistency issue we found on libunwind.a, by sorting the order of the files passed to the linker.
2025-08-06tidyBoxy-12/+2
2025-08-06Fix build/doc/test of error index generatorJakub Beránek-87/+124
It is essentially a RustcPrivate tool, so it should be treated as such using the new `RustcPrivateCompilers` infra.
2025-08-06Remove unneeded `stage` parameter when setting up stdlib CargoJakub Beránek-13/+9
2025-08-06handle bootstrap cfgsBoxy-34/+12
2025-08-06remove redundant _toml suffix and other misc changesbit-aloo-389/+371
2025-08-05Auto merge of #144303 - Kobzol:bootstrap-tool-cleanup, r=jieyouxubors-453/+744
Consolidate staging for `rustc_private` tools This PR continues bootstrap refactoring, this time by consolidating staging for `Mode::ToolRustc` tools. This refactoring was in the critical path of refactoring `test`/`dist`/`clippy`/`doc` steps, and getting rid of the rmeta/rlib sysroot copy, because tools are pervasive and they are being used for a lot of things in bootstrap. The main idea is to explicitly model the fact that a stage N `Mode::ToolRustc` tool always works with two different compilers: - Stage N-1 rustc (`build_compiler`) builds stage N rustc (`target_compiler`) - Rlib artifacts from stage N rustc are copied to the sysroot of stage N-1 rustc - Stage N-1 rustc builds the (stage N) tool itself, the tool links to the rlib artifacts of the stage N rustc Before, the code often used `compiler`, which meant sometimes the build compiler, sometimes the target compiler, and sometimes neither (looking at you, `download-rustc`). This is especially annoying when you get to a situation where you have an install step that invokes a dist step that invokes a tool build step, where *some* compiler is being propagated through, without it being clear what does that compiler represent. This refactoring hopefully makes that clearer and more explicit. It also gets rid of a few `builder.ensure(Rustc(...))` calls within bootstrap, which is always nice. `Rustdoc` needs to be handled a bit specially, because it acts as a compiler itself, I documented that in the changes. It wasn't practical to do these refactorings in multiple PRs, so I did it all in one PR. The meat of the change is 9ee6d1c1ed112c3dcfb5684b33772b136df0dca3. I tested manually that `x build rustdoc` and `x build miri` still works even with `download-rustc`, although I cannot promise any extra support for `download-rustc`, IMO we will just have to reimplement it from scratch in a different way. As usually, I did some drive-by refactorings to bootstrap, trying to document and clarify things, add more step metadata and tests. Since these changes broke Cargo, which was incorrectly using `Mode::ToolRustc`, I also changed cargo to `ToolTarget` in this PR. Best reviewed commit-by-commit (note that I renamed `link_compiler` to `target_compiler`, in accordance to the rest of bootstrap, in the last commit). r? `@jieyouxu` try-job: x86_64-gnu-aux try-job: x86_64-msvc-ext1
2025-08-04windows-gnullvm: include `libunwind.dll` in distMateusz Mikuła-7/+24
2025-08-04Fix splitting dylib pathsJakub Beránek-10/+8
2025-08-04Do not render both cached and uncached edge between two stepsJakub Beránek-1/+7
2025-08-04Implement debugging output of the bootstrap Step graph into a DOT fileJakub Beránek-2/+217
2025-08-03For "stage 1" ui-fulldeps, use the stage 1 compiler to query target infoZalathar-0/+8
Testing ui-fulldeps in "stage 1" actually uses the stage 0 compiler, so that test programs can link against stage 1 rustc crates. Unfortunately, using the stage 0 compiler causes problems when compiletest tries to obtain target information from the compiler, but the output format has changed since the last bootstrap beta bump. We can work around this by also providing compiletest with a stage 1 compiler, and having it use that compiler to query for target information.
2025-08-02Rollup merge of #144782 - jieyouxu:compiletest-selftests, r=KobzolSamuel Tardieu-0/+6
Properly pass path to staged `rustc` to `compiletest` self-tests Otherwise, this can do weird things like use a global rustc, or try to use stage 0 rustc. This must be properly configured, because `compiletest` is intended to only support one compiler target spec JSON format (of the in-tree compiler). Historically, this was probably done so before `bootstrap` was really its own thing, and `compiletest` had to be runnable as a much more "self-standing" tool. Follow-up to rust-lang/rust#144675, as I didn't realize this until Zalathar pointed it out in [#t-infra/bootstrap > Building vs testing &#96;compiletest&#96; @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Building.20vs.20testing.20.60compiletest.60/near/532040838). r? ````@Kobzol````
2025-08-01move dist and gcc config to the top of parse methodbit-aloo-12/+12
2025-08-01move llvm config to the top of parse methodbit-aloo-31/+36
2025-08-01move rust config to the top of parse methodbit-aloo-59/+58
2025-08-01move install config to the top of parse methodbit-aloo-12/+15
2025-08-01move build config to the top of parse methodbit-aloo-12/+13
2025-08-01make build toml fields follow a specific naming conventionbit-aloo-125/+120
2025-08-01make install toml fields follow a specific naming conventionbit-aloo-14/+14
2025-08-01make dist toml fields follow a specific naming conventionbit-aloo-14/+14
2025-08-01make gcc toml fields follow a specific naming conventionbit-aloo-2/+2
2025-08-01make llvm toml fields follow a specific naming conventionbit-aloo-59/+59
2025-08-01add rust default implementationbit-aloo-200/+175
2025-08-01add llvm default implementationbit-aloo-111/+97
2025-08-01add gcc and dist default implementationbit-aloo-32/+32
2025-08-01add install default implementationbit-aloo-10/+26
2025-08-01Fix verbosity settingbit-aloo-8/+10
2025-08-01Fix logging of config skip valuesbit-aloo-28/+27
2025-08-01Override some build TOML values by flagsbit-aloo-127/+149
2025-08-01Split TOML postprocessing into a separate functionbit-aloo-99/+114
2025-08-01Extract TOML config loading and src directory computation into separate ↵bit-aloo-89/+117
functions
2025-08-01Force initializing ExecutionContext with verbosity and fail_fast modebit-aloo-8/+6
2025-08-01move rust config to parse_innerbit-aloo-261/+251
2025-08-01move llvm parsing to parse_innerbit-aloo-127/+123
2025-08-01move install to parse_innerbit-aloo-20/+13
2025-08-01move target parsing to parse_innerbit-aloo-71/+64
2025-08-01move dist to parse_innerbit-aloo-31/+25
2025-08-01move gcc config parsing to parse_innerbit-aloo-19/+11
2025-08-01Clarify comments on Cargo (self-)test stepsJakub Beránek-4/+14
2025-08-01Make `x test cargo` stage N test rustc stage NJakub Beránek-13/+47
2025-08-01Fix `x test cargo`Jakub Beránek-36/+31
2025-08-01Make build compiler explicit in `dist::Cargo`Jakub Beránek-16/+25
2025-08-01Add snapshot tests for `test cargo` and update Cargo snapshot testsJakub Beránek-2/+35
2025-08-01Update `CargoTest`Jakub Beránek-9/+39