about summary refs log tree commit diff
path: root/src/build_helper
AgeCommit message (Collapse)AuthorLines
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.
2022-01-22Remove dead code from build_helperMateusz Mikuła-16/+0
2021-09-20Migrate to 2021Mark Rousskov-1/+1
2021-07-29rfc3052: Remove authors field from Cargo manifestsJade-1/+0
Since RFC 3052 soft deprecated the authors field anyway, hiding it from crates.io, docs.rs, and making Cargo not add it by default, and it is not generally up to date/useful information, we should remove it from crates in this repo.
2021-06-04Revert "Revert "Move llvm submodule updates to rustbuild""Joshua Nelson-0/+1
This reverts commit ad308264a38531bc8d2179324bac3652a1cda640.
2021-05-24Revert "Move llvm submodule updates to rustbuild"Mark Rousskov-1/+0
2021-05-19Add track_caller to `builder_helper::output`Joshua Nelson-0/+1
If something goes wrong here, showing `fn output` is unhelpful. Show where the command is being run instead.
2020-11-05Fix even more URLsGuillaume Gomez-1/+1
2020-08-30cleanup: Remove duplicate library names from `Cargo.toml`sVadim Petrochenkov-1/+0
2020-07-22build: Harden env var tracking in build scriptsVadim Petrochenkov-4/+12
2020-01-09Remove sanitizer runtime cratesTomasz Miąsko-104/+0
2019-12-22Format the worldMark Rousskov-49/+26
2019-10-17show up some extra info when t!() failsGuanqun Lu-0/+7
2019-08-27rustbuild: allow disabling deny(warnings) for bootstrapMarc-Antoine Perennou-3/+0
When deny-warnings is not specified or set to true, the behaviour is the same as before. When deny-warnings is set to false, warnings are now allowed Fixes #63911 Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2019-08-22Apply clippy::redundant_field_names suggestionMateusz Mikuła-1/+1
2019-08-01build_helper: rename (try_)run_silent -> (try_)runRalf Jung-4/+4
2019-08-01build_helper: rename run -> run_verbose (seems unused)Ralf Jung-1/+2
2019-07-28Deny `unused_lifetimes` through rustbuildVadim Petrochenkov-1/+1
2019-07-28Remove lint annotations in specific crates that are already enforced by ↵Vadim Petrochenkov-1/+2
rustbuild Remove some random unnecessary lint `allow`s
2019-05-22Bump compiler-builtins to 0.1.15Alex Crichton-3/+3
This commit bumps the `compiler-builtins` dependency to 0.1.15 which expects to have the source for `compiler-rt` provided externally if the `c` feature is enabled. This then plumbs through the necessary support in the build system to ensure that if the `llvm-project` directory is checked out and present that we enable the `c` feature of `compiler-builtins` and compile in all the C intrinsics.
2019-05-13Remove bitrig support from rustMarcel Hellwig-1/+1
2019-02-10rustc: doc commentsAlexander Regueiro-3/+3
2019-02-04Transition build_helper to 2018 editionHirokazu Hata-0/+3
2019-01-26Workaround presence of LLVM library in stage0/libMark Rousskov-0/+19
This commit works around the newly-introduced LLVM shared library. This is needed such that llvm-config run from librustc_llvm's build script can correctly locate it's own LLVM, not the one in stage0/lib. The LLVM build system uses the DT_RUNPATH/RUNPATH header within the llvm-config binary, which we want to use, but because Cargo always adds the host compiler's "libdir" (stage0/lib in our case) to the dynamic linker's search path, we weren't properly finding the freshly-built LLVM in llvm/lib. By restoring the environment variable setting the search path to what bootstrap sees, the problem is resolved and librustc_llvm correctly links and finds the appropriate LLVM. Several run-make-fulldeps tests are also updated with similar handling.
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-11std: Depend directly on crates.io cratesAlex Crichton-7/+8
Ever since we added a Cargo-based build system for the compiler the standard library has always been a little special, it's never been able to depend on crates.io crates for runtime dependencies. This has been a result of various limitations, namely that Cargo doesn't understand that crates from crates.io depend on libcore, so Cargo tries to build crates before libcore is finished. I had an idea this afternoon, however, which lifts the strategy from #52919 to directly depend on crates.io crates from the standard library. After all is said and done this removes a whopping three submodules that we need to manage! The basic idea here is that for any crate `std` depends on it adds an *optional* dependency on an empty crate on crates.io, in this case named `rustc-std-workspace-core`. This crate is overridden via `[patch]` in this repository to point to a local crate we write, and *that* has a `path` dependency on libcore. Note that all `no_std` crates also depend on `compiler_builtins`, but if we're not using submodules we can publish `compiler_builtins` to crates.io and all crates can depend on it anyway! The basic strategy then looks like: * The standard library (or some transitive dep) decides to depend on a crate `foo`. * The standard library adds ```toml [dependencies] foo = { version = "0.1", features = ['rustc-dep-of-std'] } ``` * The crate `foo` has an optional dependency on `rustc-std-workspace-core` * The crate `foo` has an optional dependency on `compiler_builtins` * The crate `foo` has a feature `rustc-dep-of-std` which activates these crates and any other necessary infrastructure in the crate. A sample commit for `dlmalloc` [turns out to be quite simple][commit]. After that all `no_std` crates should largely build "as is" and still be publishable on crates.io! Notably they should be able to continue to use stable Rust if necessary, since the `rename-dependency` feature of Cargo is soon stabilizing. As a proof of concept, this commit removes the `dlmalloc`, `libcompiler_builtins`, and `libc` submodules from this repository. Long thorns in our side these are now gone for good and we can directly depend on crates.io! It's hoped that in the long term we can bring in other crates as necessary, but for now this is largely intended to simply make it easier to manage these crates and remove submodules. This should be a transparent non-breaking change for all users, but one possible stickler is that this almost for sure breaks out-of-tree `std`-building tools like `xargo` and `cargo-xbuild`. I think it should be relatively easy to get them working, however, as all that's needed is an entry in the `[patch]` section used to build the standard library. Hopefully we can work with these tools to solve this problem! [commit]: https://github.com/alexcrichton/dlmalloc-rs/commit/28ee12db813a3b650a7c25d1c36d2c17dcb88ae3