about summary refs log tree commit diff
path: root/src/bootstrap/util.rs
AgeCommit message (Collapse)AuthorLines
2023-10-17move bootstrap utils into bootstrap/src/utils moduleonur-ozkan-497/+0
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-07-30bootstrap: inline format!() argsMatthias Krüger-13/+11
2023-07-23Fix test panics for submodule of book is not updatedyukang-0/+4
2023-07-15Rollup merge of #113731 - jyn514:ci-env, r=ozkanonurjyn-10/+0
Remove unused `bootstrap::util::CiEnv` enum the right one is `build_helper::CiEnv`; this one wasn't even used.
2023-07-15Remove unused `bootstrap::util::CiEnv` enumjyn-10/+0
the right one is `build_helper::CiEnv`; this one wasn't even used.
2023-07-13Rename `detail_exit_macro` to `exit`jyn-2/+2
`detail` and `macro` weren't adding any info.
2023-06-23Make `try_run` return a `Result<(), ()>` instead of a booleanGuillaume Gomez-1/+1
2023-06-15cleanup more azure leftoversklensy-2/+0
2023-06-03rename src/dst to original/linkjyn-5/+5
this is consistent with std and makes it much easier to understand what's actually happening
2023-05-30create `build_helper/src/util` modozkanonur-22/+3
Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-05-25Generate docs for bootstrap itselfjyn-1/+1
This verifies the intra-doc links are correct, and hopefully makes things easier for new contributors.
2023-04-05Use the `junction` crate in bootstrap instead of manually creating the junctionThom Chiovoloni-115/+1
2023-04-05Fix same issue in bootstrapThom Chiovoloni-9/+26
2023-03-20migrate compiler, bootstrap, and compiletest to windows-rsAndy Russell-40/+46
2023-01-06Handle non-existant upstream master branches in `x fmt`Nilstrieb-0/+17
2023-01-03Add `build_helper` crate to share code between tidy and bootstrapNilstrieb-29/+0
2022-12-31Revert "Auto merge of #105058 - ↵Joshua Nelson-0/+29
Nilstrieb:no-merge-commits-for-you-only-bors-is-allowed-to-do-that, r=jyn514" This reverts commit 4839886f0abe208ab8f2bb73a3076a59fe2ab60c, reversing changes made to ce85c98575e3016cf2007d90a85be321e592aa96.
2022-12-30Add `build_helper` crate to share code between tidy and bootstrapNilstrieb-29/+0
2022-11-13Rollup merge of #104158 - Ayush1325:executable, r=Mark-SimulacrumManish Goregaokar-1/+7
Return .efi extension for EFI executable Originally part of https://github.com/rust-lang/rust/pull/100316 Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2022-11-12Distinguish `--dry-run` from the automatic dry run checkJoshua Nelson-2/+2
2022-11-08Return .efi extension for EFI executableAyush Singh-1/+7
Originally part of https://github.com/rust-lang/rust/pull/100316 Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2022-10-26check lld version to choose correct flag for testsDaniil Belov-0/+14
2022-09-05Avoid UB in the Windows filesystem code in... bootstrap?Thom Chiovoloni-4/+6
2022-08-19Refactor if-available setting to work in CIMark Rousskov-0/+4
This verifies if the HEAD sha matches with the detected LLVM SHA, and if not, permits usage of the detected LLVM. Otherwise, we fallback on regular non-downloaded LLVM (currently still cached with sccache, though that's still 10+ minutes on macOS).
2022-07-14Don't use host linker for switchleo60228-1/+2
2022-07-11Auto merge of #96978 - lqd:win_pgo2, r=Mark-Simulacrumbors-0/+24
Utilize PGO for windows x64 rustc dist builds This PR adds PGO support for the CI x64 windows dist builds. These are the results from running the rustc-perf benchmarks: ![image](https://user-images.githubusercontent.com/247183/177662869-683a8034-7c95-42bf-9900-9ffd66677fcf.png) Thanks to `@Kobzol,` `@michaelwoerister,` `@wesleywiser,` `@Mark-Simulacrum` for their precious help.
2022-07-11extend bootstrap for PGO on windowsRémy Rakic-0/+24
When building LLVM/LLD as part of a build that asks LLVM to generate profiles, e.g. when doing PGO, cmake or clang-cl don't automatically link clang's profiler runtime in, causing undefined reference errors at link-time. We do that manually, by adding clang's resource library folder to the library search path: - for LLVM itself, by extending the linker args that `rustc_llvm`'s build script uses, to avoid the linker errors when linking `rustc_driver`. - for LLD, by extending cmake's linker flags during the LLD build step.
2022-07-07squash the commitstoshiki goto-3/+3
implement detail_exit but I'm not sure it is right. not create new file and write detail exit in lib.rs replace std::process::exit to detail_exit that is not related to code runnning. remove pub
2022-06-27Export `t!` from the bootstrap lib so bins can use itJosh Triplett-1/+2
2022-05-29Auto merge of #96687 - jyn514:download-rustc, r=Mark-Simulacrumbors-0/+8
Move download-rustc from python to rustbuild - Remove download-rustc handling from bootstrap.py - Allow a custom `pattern` in `builder.unpack()` - Only download rustc once another part of bootstrap depends on it. This is somewhat necessary since the download functions rely on having a full `Builder`, which isn't available until after config parsing finishes. Helps with https://github.com/rust-lang/rust/issues/94829.
2022-05-28Rollup merge of #97411 - raiyansayeed:print-stderr-consistently, ↵Matthias Krüger-1/+1
r=Mark-Simulacrum Print stderr consistently Solves https://github.com/rust-lang/rust/issues/96712 I tried to follow what I perceived as the general consensus for error messages in boostrap i.e messages that were .. * resulting from an Err(...) => * literally called as "Error: ...." * by the end of the block scope forced to run a panic! or process::exit with a guaranteed non-zero error code.
2022-05-25feat: refactored bootstrap files to use stderr consistentlyRaiyan-1/+1
2022-05-25Move `download` functions from `native` to builder.rsJoshua Nelson-0/+8
This has no logic changes, just a move.
2022-05-01Use curl by defaultThomas Applencourt-0/+18
2022-04-08Auto merge of #95440 - jyn514:error-index, r=Mark-Simulacrumbors-1/+1
Fix `x test src/tools/error_index_generator --stage {0,1}` There were two fixes needed: 1. Use `top_stage` instead of `top_stage - 1`. There was a long and torturous comment about trying to match rustdoc's version, but it works better without the hard-coding than with (before it gave errors that `libtest.so` couldn't be found). 2. Make sure that `ci-llvm/lib` is added to LD_LIBRARY_PATH. Previously the error index would be unable to load LLVM for stage0 builds. At some point we should probably have a discussion about how rustdoc stages should be numbered; confusion between 0/1/2 has come up several times in bootstrap now. cc https://github.com/rust-lang/rust/issues/92538 Note that this is still broken when using `download-rustc = true` and `--stage 1`, but that's *really* a corner case and should affect almost no one. `--stage {0,2}` work fine with download-rustc. Fixes https://github.com/rust-lang/rust/issues/80096.
2022-03-29Fix `x test src/tools/error_index_generator --stage {0,1}`Joshua Nelson-1/+1
There were two fixes needed: 1. Use `top_stage` instead of `top_stage - 1`. There was a long and torturous comment about trying to match rustdoc's version, but it works better without the hard-coding than with. 2. Make sure that `ci-llvm/lib` is added to LD_LIBRARY_PATH. Previously the error index would be unable to load LLVM for stage0 builds. At some point we should probably have a discussion about how rustdoc stages should be numbered; confusion between 0/1/2 has come up several times in bootstrap now. Note that this is still broken when using `download-rustc = true` and `--stage 1`, but that's *really* a corner case and should affect almost no one. `--stage {0,2}` work fine with download-rustc.
2022-03-26Give a hard error when filtering tests for a file that does not existJoshua Nelson-4/+4
A common issue people run into when running compiletest is that filtering for files that don't exist is only a warning and not an error; running the whole test suite instead. See for example https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/Question.20about.20compiletest. This is especially bad when using `--bless`, which will modify all `.stderr` files. Change bootstrap to require valid filters instead of discarding invalid filters and continuing. Before: ``` Warning: Skipping "/home/jnelson/rust-lang/rust/src/test/rustdoc-ui/intra-doc/feature-gate-intra-doc-pointers.r": not a regular file or directory Check compiletest suite=rustdoc-ui mode=ui (x86_64-unknown-linux-gnu(x86_64-unknown-linux-gnu) -> x86_64-unknown-linux-gnu(x86_64-unknown-linux-gnu)) running 163 tests iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii.......................... 100/163 ............................................................... test result: ok. 89 passed; 0 failed; 74 ignored; 0 measured; 0 filtered out; finished in 7.20s finished in 7.248 seconds Build completed successfully in 0:00:08 ``` After: ``` thread 'main' panicked at 'Invalid test suite filter "/home/jnelson/rust-lang/rust/src/test/rustdoc-ui/intra-doc/feature-gate-intra-doc-pointers.r": file or directory does not exist', src/bootstrap/util.rs:311: note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace Build completed unsuccessfully in 0:00:08 ```
2022-03-07copy over `std::path::absolute` instead of adding `canonicalize` hacksJoshua Nelson-0/+109
this also fixes a bug where bootstrap would try to use the fake `rustc` binary built by bootstrap - cargo puts it in a different directory when using `cargo run` instead of x.py
2022-03-05Merge build_helper into utilbjorn3-3/+143
2022-03-05Remove build_helperbjorn3-2/+1
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-27rustbuild: Fix compiletest warning when building outside of root.Eric Huss-2/+3
2022-01-01Remove some dead codebjorn3-20/+0
2022-01-01Make the rustc and rustdoc wrapper not depend on libbootstrapbjorn3-23/+1
This slightly improves compilation time by reducing linking time (saving about a 1/10 of the the total compilation time after changing rustbuild) and slightly reduces disk usage (from 16MB for the rustc wrapper to 4MB).
2021-11-09Allow to run a specific rustdoc-js* testGuillaume Gomez-0/+32
2021-06-06Auto merge of #79608 - alessandrod:bpf, r=nagisabors-1/+2
BPF target support This adds `bpfel-unknown-none` and `bpfeb-unknown-none`, two new no_std targets that generate little and big endian BPF. The approach taken is very similar to the cuda target, where `TargetOptions::obj_is_bitcode` is enabled and code generation is done by the linker. I added the targets to `dist-various-2`. There are [some tests](https://github.com/alessandrod/bpf-linker/tree/main/tests/assembly) in bpf-linker and I'm planning to add more. Those are currently not ran as part of rust CI.
2021-06-03fix testing Miri with --stage 0Ralf Jung-0/+1
2021-05-23Add BPF targetAlessandro Decina-1/+2
This change adds the bpfel-unknown-none and bpfeb-unknown-none targets which can be used to generate little endian and big endian BPF
2021-02-17Make sure pdbs are copied along with exe and dlls when bootstrappingRyan Levick-0/+6
2020-10-18bootstrap: Print units for "finished in xxx" messageCamelid-1/+1
It now says "finished in xxx seconds". Also slightly improved some wording in the README.
2020-07-17Teach bootstrap about target files vs target triplesJake Goulding-6/+5
`rustc` allows passing in predefined target triples as well as JSON target specification files. This change allows bootstrap to have the first inkling about those differences. This allows building a cross-compiler for an out-of-tree architecture (even though that compiler won't work for other reasons). Even if no one ever uses this functionality, I think the newtype around the `Interned<String>` improves the readability of the code.