about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2025-04-15Rename `is_builder_target` to `is_host_target`Jakub Beránek-19/+18
2025-04-15Move `is_builder_target`, `is_system_llvm` and `is_rust_llvm` from `Builder` ↵Jakub Beránek-53/+57
to `Config`
2025-04-15add FIXME note in `TomlConfig::merge`onur-ozkan-0/+2
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-04-15fix path and the ordering logiconur-ozkan-26/+28
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-04-15apply nit notesonur-ozkan-26/+69
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-04-15implement cyclic inclusion handlingonur-ozkan-13/+38
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-04-15add new config option: `include`onur-ozkan-1/+29
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-04-15update submodules if the directory doesn't existWaffle Lapkin-0/+7
2025-04-14Setup editor file associations for non-rs extensionsThalia Archibald-0/+3
.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.
2025-04-15compiletest: Add an experimental new executor to replace libtestZalathar-1/+1
The new executor can be enabled by passing `--new-executor` or `-n` to compiletest. For example: `./x test ui -- -n`
2025-04-15Use a constant for unstable features needed by compiletestZalathar-7/+14
2025-04-14Rollup merge of #139804 - WaffleLapkin:real, r=jieyouxuMatthias Krüger-1/+1
use `realpath` in `bootstrap.py` when creating build-dir Fixes #139800 r? `@jieyouxu` My use case for `./build` being a symlink is this: my "default" ~~partition~~ btrfs subvolume is snapshotted/backed up. I don't want to backup target-likes, so I move them to a special subvolume which isn't backed up. `./build` is a symlink into that subvolume. (`build.build-dir` configuration is not fully sufficient, it is still nice to be able to check build files with `ls ./build` or call tools from there)
2025-04-14use `realpath` in `bootstrap.py` when creating build-dirWaffle Lapkin-1/+1
this avoids crashes when `./build` is a symlink to a non-existent directory.
2025-04-13Auto merge of #139734 - ChrisDenton:rollup-28qn740, r=ChrisDentonbors-5/+2
Rollup of 6 pull requests Successful merges: - #139107 (std: make `cmath` functions safe) - #139607 (Add regression test for #127424) - #139691 (Document that `opt-dist` requires metrics to be enabled) - #139707 (Fix comment in bootstrap) - #139708 (Fix name of field in doc comment) - #139709 (bootstrap: fix typo in doc string) r? `@ghost` `@rustbot` modify labels: rollup
2025-04-13Rollup merge of #139709 - tshepang:patch-5, r=KobzolChris Denton-1/+1
bootstrap: fix typo in doc string
2025-04-12Rollup merge of #139315 - clubby789:deranged-bump, r=Mark-SimulacrumChris Denton-2/+0
Switch `time` to `jiff` for time formatting in ICE dumps Due to https://github.com/jhpratt/deranged/issues/21, Clippy, R-A and Miri currently fail to build if we bump to 0.4.1, pulled in via `time`. ~~Add some specific type annotations so we don't have to just pin it.~~ ~~I can open 3 PRs to the tool repos if preferred, but I thought it might be easier to do this than to pin the transitive dep and go back and remove it once the changes are synced back.~~
2025-04-12bootstrap: fix typo in doc stringTshepang Mbambo-1/+1
2025-04-12Fix comment in bootstrapJakub Beránek-4/+1
2025-04-11Auto merge of #139588 - Kobzol:rust-analyzer-opt, r=jieyouxubors-1/+3
Use LTO to optimize Rust tools (cargo, miri, rustfmt, clippy, Rust Analyzer) Trying if LTO/PGO can help RA's performance, and by how much. As `@Noratrieb` suggested, we could actually LTO optimize all the important tools. CC `@Veykril` I realized that we don't even do LTO for Rust Analyzer, that could be a very low hanging fruit to improve its performance :sweat_smile: try-job: dist-x86_64-linux
2025-04-11Rollup merge of #139574 - onur-ozkan:better-channel-handling, r=onur-ozkanStuart Cook-16/+19
bootstrap: improve `channel` handling Fixes https://github.com/rust-lang/rust/issues/139569 See [this comment](https://github.com/rust-lang/rust/pull/139574#discussion_r2034611993) for the explanation of this bug.
2025-04-10Add minimal x86_64-lynx-lynxos178 support.Tim Newsome-0/+1
It's possible to build no_std programs with this compiler. > 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/lynxos_178.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-10handle `config.channel` default for tarballsonur-ozkan-15/+18
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-04-10Apply LTO when building rustc toolsJakub Beránek-1/+3
2025-04-09set `rust.channel` to "auto-detect" for `dist` profileonur-ozkan-1/+1
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-04-09add sitemap to rust docsbinarycat-0/+1
2025-04-09Update boostrapBoxy-31/+11
2025-04-09clippy lintsBoxy-6/+2
2025-04-09update missing targets listBoxy-1/+0
2025-04-09Auto merge of #139552 - matthiaskrgr:rollup-b194mk8, r=matthiaskrgrbors-1/+1
Rollup of 10 pull requests Successful merges: - #139494 (Restrict some queries by def-kind more) - #139496 (Revert r-a changes of rust-lang/rust#139455) - #139506 (add missing word in doc comment (part 2)) - #139515 (Improve presentation of closure signature mismatch from `Fn` trait goal) - #139520 (compiletest maintenance: sort deps and drop dep on `anyhow`) - #139523 (Rustc dev guide subtree update) - #139526 (Fix deprecation note for std::intrinsics) - #139528 (compiletest: Remove the `--logfile` flag) - #139541 (Instantiate higher-ranked transmute goal w/ placeholders before emitting sub-obligations) - #139547 (Update library tracking issue template to set S-tracking-unimplemented) r? `@ghost` `@rustbot` modify labels: rollup
2025-04-08Rollup merge of #139506 - tshepang:patch-6, r=jieyouxuMatthias Krüger-1/+1
add missing word in doc comment (part 2)
2025-04-08Rollup merge of #139504 - tshepang:patch-5, r=jieyouxuMatthias Krüger-6/+6
add missing word in doc comment
2025-04-08Rollup merge of #139386 - onur-ozkan:configurable-compiletest-libtest, ↵Stuart Cook-6/+83
r=jieyouxu,kobzol make it possible to use stage0 libtest on compiletest With https://github.com/rust-lang/rust/pull/119899, building the library tree will require a stage 1 compiler. This is because `compiletest` is defined as a `ToolStd` (since https://github.com/rust-lang/rust/pull/68019) in order to use the in-tree library. As a result, https://github.com/rust-lang/rust/pull/119899 makes certain development workflows more difficult as changes on the compiler tree will now require recompiling `compiletest` each time. This PR allows switching `ToolStd` to `ToolBootstrap` with a simple boolean option in `bootstrap.toml` to allow `compiletest` to use the stage 0 `libtest` instead. The changes under `src/ci` are clearly intended to make sure that `compiletest` doesn't break during future bootstrap beta bumps.
2025-04-08Rollup merge of #139321 - GuillaumeGomez:update-rinja, ↵Stuart Cook-0/+2
r=notriddle,lolbinarycat,yotamofek Update to new rinja version (askama) Askama maintenance was handed over to rinja maintainers so new `rinja` release is actually `askama`. More information [here](https://blog.guillaume-gomez.fr/articles/2025-03-19+Askama+and+Rinja+merge). r? ``@notriddle``
2025-04-08add missing word in doc comment (part 2)Tshepang Mbambo-1/+1
2025-04-08remove unusual indentationTshepang Mbambo-5/+5
This also fixes markdown rendering
2025-04-08add missing word in doc commentTshepang Mbambo-1/+1
2025-04-07implement `check` step for `compiletest` separatelyonur-ozkan-5/+66
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-04-07enable in-tree std on some runnersonur-ozkan-0/+2
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-04-06Rollup merge of #139367 - GuillaumeGomez:proc-macro-values, r=UrgauGuillaume Gomez-1/+1
Add `*_value` methods to proc_macro lib This is the (re-)implementation of https://github.com/rust-lang/libs-team/issues/459. It allows to get the actual value (unescaped) of the different string literals. It was originally done in https://github.com/rust-lang/rust/pull/136355 but it broke the artifacts build so we decided to move the crate to crates.io to go around this limitation. Part of https://github.com/rust-lang/rust/issues/136652. Considering this is a copy-paste of the originally approved PR, no need to go through the whole process again. \o/ r? `@Urgau`
2025-04-06Rollup merge of #139347 - jieyouxu:rust_test_helpers, r=onur-ozkanStuart Cook-10/+9
Only build `rust_test_helpers` for `{incremental,ui}` test suites Only build `rust_test_helpers` for `{incremental,ui}` test suites. Context: Trying to see what test suites actually need `rust_test_helpers`, because this was causing unnecessary local failures when trying to run `./x test tests/run-make --target=wasm32-unknown-unknown` when `run-make` tests don't need `rust_test_helpers` at all. r? `@ghost` try-job: armhf-gnu try-job: test-various try-job: x86_64-apple-1 try-job: aarch64-apple try-job: x86_64-msvc-1 try-job: i686-msvc-1 try-job: x86_64-mingw-1 try-job: i686-mingw-1
2025-04-06Update proc-macro deps listGuillaume Gomez-0/+2
2025-04-05Update the minimum external LLVM to 19Josh Stone-4/+2
2025-04-05add change-entryonur-ozkan-0/+5
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-04-05utilize `compiletest_use_stage0_libtest` optiononur-ozkan-1/+4
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-04-05create new option `build.compiletest-use-stage0-libtest`onur-ozkan-0/+6
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-04-05Switch `time` to `jiff` for time formatting in ICE dumpsclubby789-2/+0
2025-04-05Rollup merge of #139092 - thaliaarchi:move-fd-pal, r=joboetMatthias Krüger-2/+2
Move `fd` into `std::sys` Move platform definitions of `fd` into `std::sys`, as part of https://github.com/rust-lang/rust/issues/117276. Unlike other modules directly under `std::sys`, this is only available on some platforms and I have not provided a fallback abstraction for unsupported platforms. That is similar to how `std::os::fd` is gated to only supported platforms. Also, fix the `unsafe_op_in_unsafe_fn` lint, which was allowed for the Unix fd impl. Since macro expansions from `std::sys::pal::unix::weak` trigger this lint, fix it there too. cc `@joboet,` `@ChrisDenton` try-job: x86_64-gnu-aux
2025-04-04Move fd into sysThalia Archibald-2/+2
2025-04-04bootstrap: Only add `rustc_randomized_layouts` if the crate has itGuillaume Gomez-1/+1
2025-04-04Rollup merge of #139378 - Kobzol:bootstrap-use-lld-fix, r=petrochenkovMatthias Krüger-2/+2
Use target-agnostic LLD flags in bootstrap for `use-lld` [Before](https://github.com/rust-lang/rust/pull/135001), I hardcoded LLD flags that pretty much only worked on GNU. The right way is to use `-Zlinker-features` instead though. I *think* that this should also make this work on Windows mingw, and thus `@petrochenkov's` workaround is no longer necessary. Fixes: https://github.com/rust-lang/rust/issues/139372 Closes: https://github.com/rust-lang/rust/pull/139375 r? `@lqd`