about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2023-12-10Destructure TOML configsJakub Beránek-168/+299
This will allow us to check if all values are used
2023-12-10Review fixesJakub Beránek-21/+21
2023-12-10Produce an explicit error when using a self-contained lld, but we don't add ↵Jakub Beránek-0/+10
it to sysroot
2023-12-10Add change tracker entryJakub Beránek-0/+5
2023-12-10Do not invoke external lld to figure out thread flags in self-contained modeJakub Beránek-8/+23
2023-12-10Use MCP510Jakub Beránek-2/+11
2023-12-10Introduce `LldMode` and generalize parsing of `use-lld`Jakub Beránek-12/+99
2023-12-10Refactor rust(do)c linker flagsJakub Beránek-65/+51
2023-12-10Add `is_msvc` functionJakub Beránek-23/+26
2023-12-10Auto merge of #118787 - GuillaumeGomez:rollup-fj5wr3q, r=GuillaumeGomezbors-2/+13
Rollup of 5 pull requests Successful merges: - #117966 (add safe compilation options) - #118747 (Remove extra check cfg handled by libc directly) - #118774 (add test for inductive cycle hangs) - #118775 (chore: add test case for type with generic) - #118782 (use `&` instead of start-process in x.ps1) r? `@ghost` `@rustbot` modify labels: rollup
2023-12-09Auto merge of #118069 - onur-ozkan:bypass_bootstrap_lock, r=Mark-Simulacrumbors-28/+43
allow bypassing the build directory lock As bootstrap locks its entire build directory, parallel bootstrapping for anything becomes impossible. This change enables developers to bypass the locking mechanism (with `--bypass-bootstrap-lock` flag) when it is unnecessary for their specific use case. more context: https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/Build.20.28miri.3F.29.20sysroots.20in.20parallel cc `@saethlin`
2023-12-09fix --dry-run when the change-id warning is printedjyn-2/+2
2023-12-09allow bypassing the build directory lockonur-ozkan-28/+43
As bootstrap locks its entire build directory, parallel bootstrapping for anything becomes impossible. This change enables developers to bypass the locking mechanism when it is unnecessary for their specific use case. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-12-09Auto merge of #117771 - tmandry:fuchsia-gha, r=Mark-Simulacrumbors-1/+1
Build Fuchsia in CI Fittingly, when I first put this up it was failing due to discovering an ICE in clippy (looks like fixed in https://github.com/rust-lang/rust-clippy/pull/11760), probably more fallout from recent type system changes. Other recent regressions this would have caught include - #117455 and #117493 - #117602 Originally we discussed basing this on cargotest, but they ended up not sharing anything. Fuchsia has its own tool to manage checkouts and its own build system. What it requires is a fully "install"ed toolchain with a host and fuchsia target. We share logic from the dist-various-2 builder to build the fuchsia target. Right now this runs clippy and skips linking a bunch of targets, since most issues we catch are in the frontend. In theory we could probably get the build CPU time down quite a bit with this approach, but right now some linked targets are creeping into the dependencies anyway and we don't have a good way of preventing that yet. The approach is basically to get a checkout at a pinned commit and then run a [script](https://fuchsia-review.git.corp.google.com/c/fuchsia/+/943833/6/scripts/rust/build_fuchsia_from_rust_ci.sh) at a predetermined location. I would like to update that pin every few weeks. Partial checkouts are used to minimize clone time, but we don't filter out prebuilt packages. r? `@Mark-Simulacrum` Based on discussion in [this Zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/Putting.20Fuchsia.20in.20crater).
2023-12-09Rollup merge of #118747 - Urgau:check-cfg-freebsd-cleanup, r=onur-ozkanGuillaume Gomez-2/+0
Remove extra check cfg handled by libc directly The `libc` crate has handle for quite some time now [check-cfg in it's own build script](https://github.com/rust-lang/libc/blob/497ac428bc010b5db9682ecf94cd567b31d53e5c/build.rs#L6-L32). We therefor no longer need to manually define them.
2023-12-09Rollup merge of #117966 - lxy19980601:safe_compilation_options, ↵Guillaume Gomez-0/+13
r=Mark-Simulacrum add safe compilation options Add two options when building rustc : strip and stack protector. If set `strip = true`, `rustc` will be stripped of symbols using `-Cstrip=symbols`. Also can set `stack-protector` and then `rustc` will be compiled with stack protectors.
2023-12-08Remove extra check-cfg handled by libc directlyUrgau-2/+0
2023-12-08Auto merge of #118301 - weihanglo:rustfix-doc, r=albertlarsan68bors-5/+4
docs: publish nightly doc for `rustfix` `rustfix `has migrated into rust-lang/cargo in <https://github.com/rust-lang/cargo/issues/13005>. We now can publish nightly doc for it.
2023-12-07Build Fuchsia in CITyler Mandry-1/+1
2023-12-06Rollup merge of #117981 - Urgau:check-cfg-remove-deprecated-syntax, r=b-naberMatthias Krüger-3/+3
Remove deprecated `--check-cfg` syntax This PR removes the deprecated `--check-cfg` `names(...)` and `values(...)` syntax. Follow up to https://github.com/rust-lang/rust/pull/111072 Part of https://github.com/rust-lang/compiler-team/issues/636 r? compiler
2023-12-06Rollup merge of #118650 - RalfJung:flags-sync, r=clubby789Matthias Krüger-0/+2
add comment about keeping flags in sync between bootstrap.py and bootstrap.rs They got out of sync, probably because this comment was missing on the Python side (it only exists on the Rust side). https://github.com/rust-lang/rust/pull/118642 brings the flags back in sync but does not fix the comment, so let's do that here. r? clubby789
2023-12-05Rollup merge of #118642 - Xanewok:patch-1, r=clubby789Michael Goulet-1/+0
bootstrap(builder.rs): Don't explicitly warn against `semicolon_in_expressions_from_macros` This already wasn't passed in bootstrap.py and the lint itself already warns-by-default for 2 years now and has already been added to the future-incompat group in Rust 1.68. See https://github.com/rust-lang/rust/issues/79813 for the tracking issue.
2023-12-05add comment about keeping flags in sync between bootstrap.py and bootstrap.rsRalf Jung-0/+2
2023-12-05Update bootstrap libc to 0.2.150Urgau-3/+3
Version 0.2.150 include support for the new check-cfg syntax
2023-12-05bootstrap(builder.rs): Don't explicitly warn against ↵Igor Matuszewski-1/+0
`semicolon_in_expressions_from_macros` This already wasn't passed in bootstrap.py and the lint itself already warns-by-default for 2 years now and has already been added to the future-incompat group in Rust 1.68. See https://github.com/rust-lang/rust/issues/79813 for the tracking issue.
2023-12-05Fix x not to quit when x prints settings.jsonlong-long-float-6/+7
Use `while` instead of `loop` Co-authored-by: Onur Özkan <onurozkan.dev@outlook.com> Update prompt message
2023-12-05Add safe compilation optionsl00846161-0/+13
Add two options when building rust: strip and stack protector. If set `strip = true`, symbols will be stripped using `-Cstrip=symbols`. Also can set `stack-protector` and stack protectors will be used.
2023-12-02replace `once_cell::sync::OnceCell` with std `OnceLock`onur-ozkan-15/+14
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-29Auto merge of #118132 - onur-ozkan:stdlib-assertion-status-to-compiletest, ↵bors-0/+4
r=wesleywiser utilize stdlib debug assertion status in compiletest Implemented a new flag `--with-debug-assertions` on compiletest to pass the stdlib debug assertion status from bootstrap. Resolves #115171
2023-11-28Rollup merge of #118323 - onur-ozkan:better-error-for-incorrect-profiles, ↵Matthias Krüger-0/+5
r=clubby789 give dev-friendly error message for incorrect config profiles before this change, an incorrect profile would result in the following error: ```sh ... ... File "/home/nimda/devspace/onur-ozkan/rust/src/bootstrap/bootstrap.py", line 1088, in bootstrap with open(include_path) as included_toml: ^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: '/home/nimda/devspace/onur-ozkan/rust/src/bootstrap/defaults/config.aaaa.toml' ``` with this change, the error message is now: ```sh ... ... File "/home/nimda/devspace/onur-ozkan/rust/src/bootstrap/bootstrap.py", line 1088, in bootstrap raise Exception("Unrecognized profile '{}'. Check src/bootstrap/defaults" Exception: Unrecognized profile 'aaaa'. Check src/bootstrap/defaults for available options. ```
2023-11-27Auto merge of #117947 - Dirbaio:drop-llvm-15, r=cuviperbors-2/+2
Update the minimum external LLVM to 16. With this change, we'll have stable support for LLVM 16 and 17. For reference, the previous increase to LLVM 15 was #114148 [Relevant zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/riscv.20forced-atomics)
2023-11-27Auto merge of #118352 - Zalathar:llvm-hash, r=onur-ozkanbors-5/+9
bootstrap: Memoize the LLVM rebuild hash to avoid very slow `x check` Recently I've encountered a massive regression in the performance of re-running `x check` after making no changes. It used to take around 2 seconds, and now it takes 20-30 seconds. That's quite a hassle when r-a runs it every time I save. After some poking around, what I've found is that each individual call to `generate_smart_stamp_hash` doesn't take a particularly long time (around 0.5 sec), but it gets called dozens of times during `x check`, and that seems to be what's adding up to 20-30 seconds. --- https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/Massive.20regression.20in.20no-op.20.60x.20check.60 cc `@onur-ozkan`
2023-11-27bootstrap: Memoize the LLVM rebuild hash to avoid very slow `x check`Zalathar-5/+9
2023-11-27Rollup merge of #118322 - onur-ozkan:if-only-doctests-skip-compiletest, ↵Matthias Krüger-1/+9
r=clubby789 skip {tidy,compiletest,rustdoc-gui} based tests for `DocTests::Only` As use of `--doc` with `x test` is intended for running doc-tests only, executing compiletest, tidy or rustdoc-gui based tests considered as an incorrect behavior from bootstrap. This change fixes that.
2023-11-26give dev-friendly error message for incorrect config profilesonur-ozkan-0/+5
before this change, an incorrect profile would result in the following error: ```sh ... ... File "/home/nimda/devspace/onur-ozkan/rust/src/bootstrap/bootstrap.py", line 1088, in bootstrap with open(include_path) as included_toml: ^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: '/home/nimda/devspace/onur-ozkan/rust/src/bootstrap/defaults/config.aaaa.toml' ``` with this change, the error message is now: ```sh ... ... File "/home/nimda/devspace/onur-ozkan/rust/src/bootstrap/bootstrap.py", line 1088, in bootstrap raise Exception("Unrecognized profile '{}'. Check src/bootstrap/defaults" Exception: Unrecognized profile 'aaaa'. Check src/bootstrap/defaults for available options. ``` Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-26skip {tidy,compiletest,rustdoc-gui} based tests for `DocTests::Only`onur-ozkan-1/+9
As use of `--doc` with `x test` is intended for running doc-tests only, executing compiletest, tidy or rustdoc-gui based tests considered as an incorrect behavior from bootstrap. This change fixes that. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-25bootstrap: remove unused commentWeihang Lo-2/+0
resolver-tests is for test only so no need to document it.
2023-11-25bootstrap: sort items of cargo docsWeihang Lo-4/+4
2023-11-25bootstrap: build `rustfix` doc from `src/tools/cargo`Weihang Lo-0/+1
2023-11-25Rollup merge of #118220 - onur-ozkan:followups, r=Mark-SimulacrumLeón Orell Valerian Liehr-88/+99
general improvements/fixes on bootstrap - adds #117813 into change tracker https://github.com/rust-lang/rust/pull/118220/commits/6d9b92f83fc024d4e86fc90436860903829289bb - fixes a bug in change tracker https://github.com/rust-lang/rust/pull/118220/commits/63a44109525d7ead76390cf50024939b2118b5ba - relocates `CONFIG_CHANGE_HISTORY` https://github.com/rust-lang/rust/pull/118220/commits/a7dcb984f644eaa56d91028abcc6e71c2cc2511b
2023-11-25Auto merge of #118235 - psumbera:bootstrap-main-t, r=Mark-Simulacrumbors-3/+3
Fix build on Solaris after #117815.
2023-11-24move CONFIG_CHANGE_HISTORY to its own moduleonur-ozkan-91/+97
Because bootstrap lib is already large and complicated, this should make the "bumping change-id" process easier. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-24use the change-id from source instead of the one from config.tomonur-ozkan-2/+2
This fixes the problem of not being able to see bootstrap config changes unless the change-id in config.toml changes. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-24add change information for PR#117813onur-ozkan-0/+5
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-24Rollup merge of #118187 - onur-ozkan:recompile-llvm-on-changes, r=clubby789Michael Goulet-2/+50
Recompile LLVM when it changes in the git sources Utilize a smart hash for 'llvm-finished-building' to enable recompilation of LLVM with each change in the git sources. Each change generates a unique hash value in 'llvm-finished-building', which ensures LLVM compilations only triggered with further changes. Resolves #111893 cc `@rust-lang/wg-llvm`
2023-11-24Auto merge of #117782 - majaha:tidy_fix, r=onur-ozkanbors-7/+10
Fix tidy tripping up on untracked files with special characters in their name Previously, the tidy tool would fault if an untracked file had a space or other special characters in its name. If there was an untracked file "foo bar", it would include the quoting in it's path and split on the first space, giving output like this: `skip untracked path "foo during rustfmt invocations`
2023-11-24Fix build on Solaris after #117815.Petr Sumbera-3/+3
2023-11-23Fix tidy on untracked files with special characterMatt Harding-7/+10
Previously, the tidy tool would fault if an untracked file had a space or other special characters in its name. If there was an untracked file "foo bar", it would include the quoting in it's path and split on the first space, giving output like this: `skip untracked path "foo during rustfmt invocations`
2023-11-23Auto merge of #117815 - onur-ozkan:update-change-tracking-impl, r=albertlarsan68bors-29/+90
improve bootstrap change-tracking system This PR aims to improve how change-tracking system works for bootstrap changes by doing the followings: - Enforce embedding directive informations about the changes on `bootstrap/src/lib.rs`. - Give more informative change inputs on the terminal (https://github.com/rust-lang/rust/pull/117815#discussion_r1390239657). - Avoid spamming the change informations(by reading and creating `.last-warned-change-id` under build output dir). see the zulip conversation for more details: https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/config.2Etoml.20change.20tracking cc `@RalfJung`
2023-11-23Auto merge of #116449 - Kobzol:bootstrap-rustdoc-shim, r=petrochenkovbors-33/+79
Pass flags to `rustdoc` shim without env. vars Discussed here: https://github.com/rust-lang/rust/pull/116448#issuecomment-1748785961. Since it was not really documented why these flags were passed through the shim, I guess that the only way to find out if it's really needed... is to remove it :) r? `@petrochenkov`