about summary refs log tree commit diff
path: root/src/bootstrap/bootstrap.py
AgeCommit message (Collapse)AuthorLines
2023-04-16chore: allow `cargo` to have its own workspaceWeihang Lo-1/+2
This also * bumps cargo to the latest in rust-lang/cargo. * adds 0BSD to allowed list of licenses Co-authored-by: Scott Schafer <schaferjscott@gmail.com> Co-authored-by: Eric Huss <eric@huss.org>
2023-04-11Rollup merge of #96971 - zhaixiaojuan:master, r=wesleywiserMichael Goulet-0/+1
Initial support for loongarch64-unknown-linux-gnu Hi, We hope to add a new port in rust for LoongArch. LoongArch intro LoongArch is a RISC style ISA which is independently designed by Loongson Technology in China. It is divided into two versions, the 32-bit version (LA32) and the 64-bit version (LA64). LA64 applications have application-level backward binary compatibility with LA32 applications. LoongArch is composed of a basic part (Loongson Base) and an expanded part. The expansion part includes Loongson Binary Translation (LBT), Loongson VirtualiZation (LVZ), Loongson SIMD EXtension (LSX) and Loongson Advanced SIMD EXtension(LASX). Currently the LA464 processor core supports LoongArch ISA and the Loongson 3A5000 processor integrates 4 64-bit LA464 cores. LA464 is a four-issue 64-bit high-performance processor core. It can be used as a single core for high-end embedded and desktop applications, or as a basic processor core to form an on-chip multi-core system for server and high-performance machine applications. Documentations: ISA: https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html ABI: https://loongson.github.io/LoongArch-Documentation/LoongArch-ELF-ABI-EN.html More docs can be found at: https://loongson.github.io/LoongArch-Documentation/README-EN.html Since last year, we have locally adapted two versions of rust, rust1.41 and rust1.57, and completed the test locally. I'm not sure if I'm submitting all the patches at once, so I split up the patches and here's one of the commits
2023-04-04Add LLVM target and cputype matching for loongarch64zhaixiaojuan-0/+1
2023-03-28Set LIBPATHKai Luo-0/+3
2023-02-11emit JSON output for building of bootstrap itselfZephaniah Ong-0/+4
2023-02-09Rollup merge of #107808 - kadiwa4:built-unsuccessfully, r=albertlarsan68Matthias Krüger-1/+3
bootstrap.py: fix build-failure message A small mistake I did. Corrects #107470, fixes #107804 r? `@albertlarsan68` (since you reviewed the last one)
2023-02-08bootstrap.py: fix build-failure messageKaDiWa-1/+3
2023-02-08 x.py fails all downloads that use a tempdir with snap curl #107722Tharun Suresh-8/+10
2023-01-31assert that `should_fix_bins_and_dylibs` has been runKaDiWa-39/+50
2023-01-30bootstrap: --help handlingKaDiWa-23/+24
2023-01-30bootstrap script: slight cleanupKaDiWa-86/+70
2023-01-27Fix woriding from `rustbuild` to `bootstrap`chansuke-1/+1
2023-01-11Revert "warn newer available version of the x tool"J Haigh-1/+2
2022-12-31remove commented out old codeDebugSteven-1/+0
2022-12-31remove leading comma from macro expansionDebugSteven-2/+2
2022-12-29Respect --set=target.platform during buildMarcus Calhoun-Lopez-0/+3
Avoid quoting targets that do not contain a period. See https://github.com/rust-lang/rust/commit/1532fd8cd0db93f469e414f9da31ef083a44fcba `--set=target.platform.linker` is ignored if RUSTFLAGS is not set. Undo parts of https://github.com/rust-lang/rust/commit/d1291dc8b4ac9a98ff1d286402559e4ba5d68488
2022-11-29Run patchelf also on rust-analyzer-proc-macro-srv.Joe Neeman-0/+1
2022-09-17Auto merge of #101949 - matthiaskrgr:rollup-xu5cqnd, r=matthiaskrgrbors-1/+2
Rollup of 7 pull requests Successful merges: - #101093 (Initial version of 1.64 release notes) - #101713 (change AccessLevels representation) - #101821 (Bump Unicode to version 15.0.0, regenerate tables) - #101826 (Enforce "joined()" and "joined_with_noop()" test) - #101835 (Allow using vendoring when running bootstrap from outside the source root) - #101942 (Revert "Copy stage0 binaries into stage0-sysroot") - #101943 (rustdoc: remove unused CSS `.non-exhaustive { margin-bottom }`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-09-16Improve handing of env vars during bootstrap processChris Wailes-4/+11
This CL modifies the handing of env vars during the bootstrap process in two ways: 1. Replaces '-' characters with '_' characters in target names to increase compatibility with different shells 2. Passes Stage0 snapshot compiler related env vars to early invocations of Cargo
2022-09-14Allow using vendoring when running bootstrap from outside the current ↵Joshua Nelson-1/+2
working directory
2022-09-01Rollup merge of #100852 - Samyak2:samyak/100459, r=Mark-SimulacrumMatthias Krüger-0/+2
Use `getuid` to check instead of `USER` env var in rustbuild This makes it consistent with `x.py` as changed in #95671 Fixes #100459
2022-08-31Fix a bunch of typoDezhi Wu-1/+1
This PR will fix some typos detected by [typos]. I only picked the ones I was sure were spelling errors to fix, mostly in the comments. [typos]: https://github.com/crate-ci/typos
2022-08-26Use getuid to check instead of USER env var in rustbuildSamyak Sarnayak-0/+2
This makes it consistent with `x.py` as changed in #95671 Fixes #100459
2022-07-05Fix typo in src/bootstrap/bootstrap.pyChris Denton-1/+1
Co-authored-by: Marco Colombo <mar.colombo13@gmail.com>
2022-07-04bootstrap.py: Always use `.exe` for WindowsChris Denton-0/+4
This ensure that it will run the Windows executable if other files in the directory (such as Linux executables) have the same file name minus the extension.
2022-07-03Auto merge of #98373 - joshtriplett:bootstrap-locking, r=jyn514bors-41/+0
Move locking from bootstrap.py to rust bootstrap, using fd-lock Helps with https://github.com/rust-lang/rust/issues/94829.
2022-06-30Add a `--build-dir` flag to rustbuildThom Chiovoloni-1/+2
2022-06-27Move locking from bootstrap.py to rust bootstrap, using fd-lockJosh Triplett-41/+0
2022-06-26Respect --color when building rustbuild itselfJoshua Nelson-2/+8
2022-06-21Remove vendoring support when building from git sourcesJoshua Nelson-41/+17
This is difficult to support without submodule handling in bootstrap.py, because cargo will refuse to vendor sources unless it knows the Cargo.toml files of all tools in tree. Moving vendor support to rustbuild means that rustbuild will be built without vendoring. Rather than trying to solve this, just remove support altogether and require people to use `rustc-src` if they want vendoring (or run `cargo vendor` manually).
2022-06-21Fully remove submodule handling from bootstrap.pyJoshua Nelson-105/+1
These submodules were previously updated in python because Cargo gives a hard error if toml files are missing from the workspace: ``` error: failed to load manifest for workspace member `/home/jnelson/rust-lang/rust/src/tools/rls` Caused by: failed to read `/home/jnelson/rust-lang/rust/src/tools/rls/Cargo.toml` Caused by: No such file or directory (os error 2) failed to run: /home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /home/jnelson/rust-lang/rust/src/bootstrap/Cargo.toml ``` However, bootstrap doesn't actually need to be part of the workspace. Remove it so we can move submodule handling fully to Rust, avoiding duplicate code between Rust and Python. Note that this does break `cargo run`; it has to be `cd src/bootstrap && cargo run` now. Given that we're planning to make the main entrypoint a shell script (or rust binary), I think this is a good tradeoff for reduced complexity in bootstrap.py.
2022-06-09keep the same config values in stage0 between invocationsPietro Albini-1/+1
This commit allows users to change the contents of the "config" key in src/stage0.json without having it overridden the next time the bump-stage0 tool is executed.
2022-06-07Move beta rustfmt downloads to rustbuildJoshua Nelson-63/+21
2022-06-05Auto merge of #93717 - pietroalbini:pa-ci-profiler, r=Mark-Simulacrumbors-0/+3
Add build metrics to rustbuild This PR adds a new module of rustbuild, `ci_profiler`, whose job is to gather as much information as possible about the CI build as possible and store it in a JSON file uploaded to `ci-artifacts`. Right now for each step it collects: * Type name and debug representation of the `Step` object. * Duration of the step (excluding child steps). * Systemwide CPU stats for the duration of the step (both single core and all cores). * Which child steps were executed. This is capable of replacing both the scripts to collect CPU stats and the `[TIMING]` lines in build logs (not yet removed, until we port our tooling to use the CI profiler). The format is also extensible to be able in the future to collect more information. r? `@Mark-Simulacrum`
2022-05-29Re-add help_on_error for download-ci-llvmbinggh-10/+8
Remove dead code Missing } ./x.py fmt Remove duplicate check Recursively remove all usage of help_on_error
2022-05-25Remove download-rustc handling from bootstrap.pyJoshua Nelson-53/+2
2022-05-25Move download-rustc from bootstrap.py to rustbuildJoshua Nelson-65/+38
- 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.
2022-05-24Rollup merge of #97290 - jyn514:fast-submodules, r=Mark-SimulacrumYuki Okushi-19/+11
Turn on `fast_submodules` unconditionally I don't know why anyone would turn this off; doing so makes builds much slower (nearly a 60x slowdown according to #49057). Remove the option to do so, which makes bootstrap a little easier to maintain. Bootstrap continues to allow you to manage submodules manually by setting `submodules = false`.
2022-05-23Turn on `fast_submodules` unconditionallyJoshua Nelson-19/+11
I don't know why anyone would turn this off; doing so makes builds much slower (nearly a 60x slowdown according to #49057). Remove the option to do so, which makes bootstrap a little easier to maintain. Bootstrap continues to allow you to manage submodules manually by setting `submodules = false`.
2022-05-22Rollup merge of #97277 - jyn514:no-unstable-for-bootstrap, r=Mark-SimulacrumJack Huey-1/+0
Avoid accidentally enabling unstable features in compilers (take 2) This allows rustbuild to control whether crates can use nightly features or not. It also prevents rustbuild from using nightly features itself. This is #92261, but I fixed the CI error.
2022-05-22Avoid accidentally enabling unstable features in compilers (take 2)Joshua Nelson-1/+0
This allows rustbuild to control whether crates can use nightly features or not. It also prevents rustbuild from using nightly features itself.
2022-05-15Auto merge of #96602 - TApplencourt:patch-1, r=Mark-Simulacrumbors-18/+35
boostrap.py use curl by default Fixes #61611
2022-05-08Auto merge of #96457 - yungkneez:fix-bootstrap, r=Mark-Simulacrumbors-0/+4
Initialize rust-analyzer submodule on bootstrap Fixes #96456
2022-05-02add build metrics, to gather ci stats from x.pyPietro Albini-0/+3
This tool will generate a JSON file with statistics about each individual step to disk. It will be used in rust-lang/rust's CI to replace the mix of scripts and log scraping we currently have to gather this data.
2022-05-01Use curl by defaultThomas Applencourt-18/+35
2022-05-01Initialize rust-analyzer submodule on bootstrapyungkneez-0/+4
2022-04-24Move download-ci-llvm to rustbuildJoshua Nelson-149/+0
This attempts to keep the logic as close to the original python as possible. `probably_large` has been removed, since it was always `True`, and UTF-8 paths are no longer supported when patching files for NixOS. I can readd UTF-8 support if desired. Note that this required making `llvm_link_shared` computed on-demand, since we don't know whether it will be static or dynamic until we download LLVM from CI.
2022-04-19Rollup merge of #95809 - ytmimi:llvm_stamp_typo, r=Mark-SimulacrumDylan DPC-1/+1
Fix typo in bootstrap.py
2022-04-13Rollup merge of #95885 - gimbles:patch-1, r=Mark-SimulacrumDylan DPC-1/+5
Improve error message in case of missing checksum # Fixes #94217
2022-04-13Improve error message when there's no checksumgimbles-1/+5