about summary refs log tree commit diff
path: root/src/build_helper
AgeCommit message (Collapse)AuthorLines
2025-07-15ci cleanup: rustdoc-gui-test now installs browser-ui-testbinarycat-0/+31
this removes the need for --unsafe-perm in the Dockerfile.
2025-07-11build-helper: clippy fixesMarijn Schouten-26/+25
2025-06-20Improve error message for rustdoc_json_types tidy checkGuillaume Gomez-1/+5
Only emit git errors if we are in CI environment
2025-06-20Generate base commit in rustdoc_json tidy checksGuillaume Gomez-1/+1
2025-06-12Move submodule path cache from `parse_gitmodules` to `Builder`Jakub Beránek-16/+10
It would not be correct if multiple values of `target_dir` were ever passed to the function in the same process.
2025-06-10Extract target no-std hack to `build_helpers`Jieyou Xu-0/+12
To centralize this hack in one place with a backlink to the issue tracking this hack, as this logic is also needed by compiletest to implement a `//@ needs-target-std` directive.
2025-05-31Add some new solver to PGOMichael Goulet-0/+1
2025-05-29Bump rustc-perf and update PGO cratesMichael Goulet-10/+10
2025-04-23Remove `git_repository` field from `GitConfig`Jakub Beránek-3/+0
It is no longer needed after a recent refactoring.
2025-04-20Fix compiletest and doc commentJakub Beránek-1/+1
2025-04-20Use `--author-date-order` when looking up upstream commits to support ↵Jakub Beránek-25/+64
subtree synces
2025-04-20Clarify commentJakub Beránek-2/+3
2025-04-20Make `git_dir` required in several git functionsJakub Beránek-14/+8
It was always called with `Some`, so no need to complicate it with `Option`.
2025-04-20Move freshness test to bootstrapJakub Beránek-311/+1
2025-04-20Remove `setup-upstream-remote.sh` and upstream handling.Jakub Beránek-78/+1
It shouldn't be needed anymore.
2025-04-20Cache result of `check_path_modifications`Jakub Beránek-1/+1
2025-04-20Unify usages of path modifications and log them in verbose modeJakub Beránek-15/+15
2025-04-20Explicitly model missing upstreamJakub Beránek-17/+57
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-70/+3
And get rid of `get_closest_merge_commit`.
2025-04-20Use `check_path_modifications` for detecting local LLVM changesJakub Beránek-2/+8
2025-04-20Implement a new unified function for figuring out how if a set of paths have ↵Jakub Beránek-2/+460
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-17Rollup merge of #139870 - ↵Matthias Krüger-11/+47
Shourya742:2025-04-15-add-retries-to-remove_and_create_dir_all, r=jieyouxu add retries to remove and create dir all closes: #139230 r? ```@jieyouxu```
2025-04-16add remove_and_create_dir_all in build_helperbit-aloo-0/+6
2025-04-16add retry support to recursive_removebit-aloo-11/+41
2025-04-15slightly correct comments and diagnostics about checking modificationsWaffle Lapkin-2/+4
I feel like they are still wrong, but maybe less so .-. The `info:` was unhelpful -- we only use upstream in CI nowdays.
2025-03-27Add CI metadata to bootstrap metricsJakub Beránek-0/+13
This will allow us to provide links to CI workflows, jobs and summaries in the post-merge analysis report.
2025-03-25Add diff of bootstrap stepsJakub Beránek-12/+22
2025-03-25Add function for linearizing `BuildStep` substepsJakub Beránek-12/+17
2025-03-24Revert "Rollup merge of #137593 - RalfJung:subtree-sync-download-llvm, ↵Jieyou Xu-9/+1
r=Mark-Simulacrum" Looks like unfortunately the `--diff-merges` flag is a `git show`-only command, not `git rev-list`. This reverts commit 95994f94ff5c9335426af4dec19afb5024f82fab, reversing changes made to 7290b04b0a46de2118968aa556bfc0970aac6661.
2025-03-23Rollup merge of #137593 - RalfJung:subtree-sync-download-llvm, r=Mark-SimulacrumJacob Pratt-1/+9
fix download-llvm logic for subtree sync branches Fixes https://github.com/rust-lang/rust/issues/101907 Cc `@onur-ozkan` r? `@Mark-Simulacrum`
2025-03-21Auto merge of #138791 - matthiaskrgr:rollup-ev46cqr, r=matthiaskrgrbors-3/+6
Rollup of 9 pull requests Successful merges: - #138364 (ports the compiler test cases to new rust_intrinsic format) - #138570 (add `naked_functions_target_feature` unstable feature) - #138623 ([bootstrap] Use llvm_runtimes for compiler-rt) - #138627 (Autodiff cleanups) - #138669 (tests: accept some noise from LLVM 21 in symbols-all-mangled) - #138706 (Improve bootstrap git modified path handling) - #138709 (Update GCC submodule) - #138717 (Add an attribute that makes the spans from a macro edition 2021, and fix pin on edition 2024 with it) - #138721 (Use explicit cpu in some asm and codegen tests.) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-21Unify LLVM invalidation path handlingJakub Beránek-2/+2
Before it was using a different set of paths in different call-sites.
2025-03-19Fix bug in `get_git_modified_files`Jakub Beránek-1/+4
It was ignoring files without extension.
2025-03-19Simplify `get_git_modified_files`Jakub Beránek-2/+2
It only ever returned `Some`, so `Option` was useless in its return type.
2025-03-17fix download-llvm logic for subtree sync branchesRalf Jung-1/+9
2025-03-07Add post-merge analysis CI workflowJakub Beránek-1/+1
2025-03-06Rollup merge of #138046 - onur-ozkan:trim-include-str, r=jieyouxuMichael Goulet-1/+1
trim channel value in `get_closest_merge_commit` This was a silly bug which caused `git_upstream_merge_base` to never work because it was `nightly\n` not `nightly`.
2025-03-05trim channel value in `get_closest_merge_commit`onur-ozkan-1/+1
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-03-04Record bootstrap step durations into GitHub summary in citoolJakub Beránek-2/+8
2025-03-04Move `BuildStep` and metric logging into `build_helper`Jakub Beránek-0/+80
2025-03-04Store bootstrap command-line into metricsJakub Beránek-0/+2
2025-02-26revert accidental change in get_closest_merge_commitRalf Jung-0/+1
2025-02-25disable float non-determinism for now to be able to complete the syncRalf Jung-1/+0
2025-01-28Update username in build helper examplenora-2/+2
2025-01-24fix(bootstrap): deserialize null as `f64::NAN`Weihang Lo-0/+8
When doing optimized build through opt-dist, I've often run into errors like `invalid type: null, expected f64`. This is likely because some f64 fields might actually bet set null. Unfortunately, serde_json doesn't handle null <-> NaN well. This commit addresses it by having a custom deserialize method, so null is always be deserialized to `f64:NAN`. See: * https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/opt-dist.3A.20.60invalid.20type.3A.20null.2C.20expect.20f64.60.20failure * https://github.com/serde-rs/json/issues/202
2025-01-07apply a workaround fix for the release blocker issueonur-ozkan-1/+12
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-12-23build_helper: add `recursive_remove` helperJieyou Xu-0/+284
`recursive_remove` is intended to be a wrapper around `std::fs::remove_dir_all`, but which also allows the removal target to be a non-directory entry, i.e. a file or a symlink. It also tries to remove read-only attributes from filesystem entities on Windows for non-dir entries, as `std::fs::remove_dir_all` handles the dir (and its children) read-only cases. Co-authored-by: Chris Denton <chris@chrisdenton.dev>
2024-11-11move `src/tools/build_helper` into `src/build_helper`onur-ozkan-0/+657
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2022-03-05Remove build_helperbjorn3-196/+0
The majority of the code is only used by either rustbuild or rustc_llvm's build script. Rust_build is compiled once for rustbuild and once for every stage. This means that the majority of the code in this crate is needlessly compiled multiple times. By moving only the code actually used by the respective crates to rustbuild and rustc_llvm's build script, this needless duplicate compilation is avoided.
2022-01-30Hide failed command unless in verbose modeMark Rousskov-4/+4
This is particularly intended for invoking compiletest; the command line there is long (3,350 characters on my system) and takes up a lot of screen real estate for little benefit to the majority of those running bootstrap. This moves printing it to verbose mode (-v must be passed) which means that it's still possible to access when needed for debugging. The main downside is that CI logs will by-default become less usable for debugging (particularly) spurious failures, but it is pretty rare for us to really need the information there -- it's usually fairly obvious what is being run with a little investigation.