summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2021-11-26Fix bug where submodules wouldn't be updated when running x.py from a ↵Joshua Nelson-1/+1
subdirectory Previously, it would concatenate the relative path to the current subdirectory, which looked at the wrong folder. I tested this by checking out `1.56.1`, changing the current directory to `src/`, and running `../x.py build`.
2021-11-19Rollup merge of #90800 - aplanas:fix_cargo_config, r=Mark-SimulacrumYuki Okushi-9/+14
bootstap: create .cargo/config only if not present In some situations we should want on influence into the .cargo/config when we use vendored source. One example is #90764, when we want to workaround some references to crates forked and living in git, that are missing in the vendor/ directory. This commit will create the .cargo/config file only when the .cargo/ directory needs to be created.
2021-11-18Auto merge of #90382 - alexcrichton:wasm64-libstd, r=joshtriplettbors-1/+1
std: Get the standard library compiling for wasm64 This commit goes through and updates various `#[cfg]` as appropriate to get the wasm64-unknown-unknown target behaving similarly to the wasm32-unknown-unknown target. Most of this is just updating various conditions for `target_arch = "wasm32"` to also account for `target_arch = "wasm64"` where appropriate. This commit also lists `wasm64` as an allow-listed architecture to not have the `restricted_std` feature enabled, enabling experimentation with `-Z build-std` externally. The main goal of this commit is to enable playing around with `wasm64-unknown-unknown` externally via `-Z build-std` in a way that's similar to the `wasm32-unknown-unknown` target. These targets are effectively the same and only differ in their pointer size, but wasm64 is much newer and has much less ecosystem/library support so it'll still take time to get wasm64 fully-fledged.
2021-11-14bootstap: create .cargo/config only if not presentAlberto Planas-9/+14
In some situations we should want on influence into the .cargo/config when we use vendored source. One example is #90764, when we want to workaround some references to crates forked and living in git, that are missing in the vendor/ directory. This commit will create the .cargo/config file only when the .cargo/ directory needs to be created.
2021-11-13Change paths for `dist` command to match the components they generateJoshua Nelson-9/+10
Before, you could have the confusing situation where the command to generate a component had no relation to the name of that component (e.g. the `rustc` component was generated with `src/librustc`). This changes the name to make them match up.
2021-11-10Update more rustc/libtest things for wasm64Alex Crichton-1/+1
* Add wasm64 variants for inline assembly along the same lines as wasm32 * Update a few directives in libtest to check for `target_family` instead of `target_arch` * Update some rustc codegen and typechecks specialized for wasm32 to also work for wasm64.
2021-11-09Rollup merge of #90685 - jyn514:remove-dead-code, r=Mark-SimulacrumMatthias Krüger-7/+1
x.py: remove fixme by deleting code As far as I can tell, this parameter was never used, so just delete it as unnecessary.
2021-11-09Rollup merge of #90683 - jyn514:compiler-docs, r=Mark-SimulacrumMatthias Krüger-16/+5
Make `compiler-docs` only control the default instead of being a hard off-switch This also fixes `x doc src/tools/clippy` when compiler-docs is disabled. See https://github.com/rust-lang/rust/pull/90354#issuecomment-955854508. r? ``@Mark-Simulacrum``
2021-11-09Allow to run a specific rustdoc-js* testGuillaume Gomez-33/+52
2021-11-08x.py: remove fixme by deleting codeJoshua Nelson-7/+1
As far as I can tell, this parameter was never used, so just delete it as unnecessary.
2021-11-08Make `compiler-docs` only control the default instead of being a hard off-switchJoshua Nelson-16/+5
This also fixes `x doc src/tools/clippy` when compiler-docs is disabled.
2021-11-03Provide standalone libc.a in self-contained for musl and wasi12101111-3/+3
2021-11-02Rollup merge of #90354 - xFrednet:00000-lets-deploy-clippy-docs, ↵Matthias Krüger-0/+2
r=Mark-Simulacrum Document clippy on nightly-rustc Adding Clippy's docs to nightly-rustc, based on commit 01cf0bde. This PR only adds `clippy_utils` to the documentation. I've decided to only document one crate for now, as `clippy_lints` etc. contain very specific and undocumented functions which aren't really reusable. I'm guessing that they would mostly clutter up the search results with little benefit. `./x.py --stage 1 doc src/tools/clippy` if working fine now after the help that ```````@jyn514``````` and ```````@ehuss``````` have provided. A big THANK YOU to them!
2021-11-01Rollup merge of #89929 - ↵Matthias Krüger-1/+9
yuvaldolev:handle-submodule-checkout-more-gracefully, r=Mark-Simulacrum Handling submodule update failures more gracefully from x.py Addresses #80498 Handling the case where x.py can't check out the right commit of a submodule, because the submodule has local edits that would be overwritten by the checkout, more gracefully. The error is printed in detail, with some hints on how to revert the local changes to the submodule.
2021-10-28Document clippy on nightly-rustcxFrednet-0/+2
2021-10-23remove "field is never read" warningPietro Albini-3/+1
2021-10-23Auto merge of #90175 - cuviper:min-llvm-12, r=nagisabors-2/+2
Update the minimum external LLVM to 12 With this change, we'll have stable support for LLVM 12 and 13. For reference, the previous increase to LLVM 10 was #83387, and this replaces the pending increase to LLVM 11 in #90062. r? `@nagisa` `@nikic`
2021-10-23Auto merge of #90054 - michaelwoerister:v0-mangling-in-compiler, ↵bors-3/+21
r=Mark-Simulacrum Make new symbol mangling scheme default for compiler itself. As suggest in https://github.com/rust-lang/rust/pull/89917#issuecomment-945888574, this PR enables the new symbol mangling scheme for the compiler itself. The standard library is still compiled using the legacy mangling scheme so that the new symbol format does not show up in user code (yet). r? `@Mark-Simulacrum`
2021-10-22Update the minimum external LLVM to 12Josh Stone-2/+2
2021-10-22Update the minimum external LLVM to 11Josh Stone-2/+2
2021-10-19Make new symbol mangling scheme default for compiler itself.Michael Woerister-3/+21
2021-10-18config: add the option to enable LLVM testsAugie Fackler-1/+7
I'm working on some LLVM patches in concert with a Rust patch, and it's helping me quite a bit to have this as an option. It doesn't seem that hard, so I figured I'd formalize it in x.py and send it upstream.
2021-10-18Rollup merge of #89950 - infinity0:master, r=Mark-SimulacrumMatthias Krüger-3/+3
bootstrap: tweak verbosity settings Currently the verbosity settings are: - 2: RUSTC-SHIM envvars get spammed on every invocation, O(30) lines cargo is passed -v which outputs CLI invocations, O(5) lines - 3: cargo is passed -vv which outputs build script output, O(0-10) lines This commit changes it to: - 1: cargo is passed -v, O(5) lines - 2: cargo is passed -vv, O(10) lines - 3: RUSTC-SHIM envvars get spammed, O(30) lines
2021-10-17Rollup merge of #89888 - rusticstuff:download-ci-llvm-apple-arm64, ↵Matthias Krüger-3/+46
r=Mark-Simulacrum Make `llvm.download-ci-llvm="if-available"` work for tier 2 targets with host tools `llvm.download-ci-llvm="if-available"` is used for most profiles configured via `x.py setup`. It allows downloading prebuilt LLVM tarballs from the CI artifacts for a configured list of platforms. Currently this list is restricted to tier 1 targets but it makes sense for all tier 2 targets with host tools.
2021-10-16bootstrap: tweak verbosity settingsXimin Luo-3/+3
Currently the verbosity settings are: - 2: RUSTC-SHIM envvars get spammed on every invocation, O(30) lines cargo is passed -v which outputs CLI invocations, O(5) lines - 3: cargo is passed -vv which outputs build script output, O(0-10) lines This commit changes it to: - 1: cargo is passed -v, O(5) lines - 2: cargo is passed -vv, O(10) lines - 3: RUSTC-SHIM envvars get spammed, O(30) lines
2021-10-16Handling submodule update failures more gracefully from x.pyYuval Dolev-1/+9
2021-10-15Make `rust.download-ci-llvm="if-available"` work for tier 2 platforms.Hans Kratz-3/+46
2021-10-14Rollup merge of #89865 - tmandry:llvm-static, r=Mark-SimulacrumMatthias Krüger-9/+4
Allow static linking LLVM with ThinLTO There's no reason not to allow this if the user wants it. It works, at least in a local build on linux host. For our use case, we're happy to spend more time building the compiler if it creates a speedup every time we run it, and we've observed speedups like this with clang.
2021-10-13Allow static linking LLVM with ThinLTOTyler Mandry-9/+4
2021-10-13Rollup merge of #89759 - jyn514:x-build-assemble, r=Mark-SimulacrumMatthias Krüger-3/+10
Assemble the compiler when running `x.py build` Previously, there was no way to actually get binaries in `build/$TARGET/stage1/bin` without building the standard library. This makes it possible to build just the compiler. This can be useful when the standard library isn't actually necessary for trying out your tests (e.g. a bug that can be reproduced with only a `no_core` crate). Closes https://github.com/rust-lang/rust/issues/73519.
2021-10-13Rollup merge of #89757 - jyn514:submodule, r=Mark-SimulacrumMatthias Krüger-1/+1
Use shallow clones for submodules This reduces the amount of git history downloaded for submodules from ~67M to ~11M. For comparison, a shallow clone of rust-lang/rust is 103M and a deep clone is 740M, so this almost halves the amount of history necessary if you made a shallow clone to start, and it's a significant reduction even if not. Closes https://github.com/rust-lang/rust/issues/63978. r? `@Mark-Simulacrum`
2021-10-13Assemble the compiler when running `x.py build`Joshua Nelson-3/+10
Previously, there was no way to actually get binaries in `build/$TARGET/stage1/bin` without building the standard library. This makes it possible to build just the compiler. This can be useful when the standard library isn't actually necessary for trying out your tests (e.g. a bug that can be reproduced with only a `no_core` crate).
2021-10-12Make `rust.overflow-checks-std`option default to `rust.overflow-checks`.Hans Kratz-1/+2
2021-10-12Add --enable-debug-assertions-std option to configure script.Hans Kratz-0/+1
2021-10-12Add --enable-overflow-checks-std option to configure script.Hans Kratz-0/+1
2021-10-11Rollup merge of #89760 - jyn514:remove-incremental-hack, r=Mark-SimulacrumMatthias Krüger-6/+0
Remove hack ignoring unused attributes for stage 0 std This seems to no longer be giving spurious errors when incremental is enabled. Closes https://github.com/rust-lang/rust/issues/58633.
2021-10-11Rollup merge of #89756 - jyn514:bootstrap-times, r=Mark-SimulacrumMatthias Krüger-2/+1
Greatly reduce amount of debuginfo compiled for bootstrap itself Rather than compiling rustbuild and all its dependencies with `debuginfo=2`, this compiles dependencies without debuginfo and rustbuild with `debuginfo=1`. On my laptop, this brings compile times down from ~1:20 to ~1:05. See also https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/async.20in.20bootstrap.3F/near/254847594. r? ``@Mark-Simulacrum``
2021-10-11Rollup merge of #89655 - tlyu:find-non-merge-commits, r=jyn514Guillaume Gomez-3/+15
bootstrap: don't use `--merges` to look for commit hashes for downloading artifacts Shallow clones (and possibly worktrees, though I can't seem to reproduce the problem there) can cause `git rev-list --merges` to falsely return no results, even if a merge commit is present. Stop using the `--merges` option when looking for commit hashes that have build artifacts. `--first-parent` and `--author=bors@rust-lang.org` should be sufficient. Also exit with an error if the configuration asks for artifacts to be downloaded and we can't determine an appropriate commit hash to use to download artifacts. Fixes #87890. r? ``@jyn514`` ``@rustbot`` label +A-rustbuild +A-contributor-roadblock
2021-10-11Remove hack ignoring unused attributes for stage 0 stdJoshua Nelson-6/+0
This seems to no longer be giving spurious errors when incremental is enabled.
2021-10-10Use shallow clones for submodulesJoshua Nelson-1/+1
This reduces the amount of git history downloaded from ~67M to ~11M.
2021-10-10Greatly reduce amount of debuginfo compiled for bootstrap itselfJoshua Nelson-2/+1
Rather than compiling rustbuild and all its dependencies with `debuginfo=2`, this compiles dependencies without debuginfo and rustbuild with `debuginfo=1`. On my laptop, this brings compile times down from ~1:20 to ~1:05.
2021-10-10Rollup merge of #89520 - GuillaumeGomez:cache-rustdoc-gui-test, ↵Matthias Krüger-1/+1
r=Mark-Simulacrum Don't rebuild GUI test crates every time you run test src/test/rustdoc-gui This method has multiple advantages: * It'll completely remove the rustdoc-GUI test doc folder if rustdoc was updated * It'll rebuild GUI test crates only they have been updated All in all, it's quite convenient! (even more with https://github.com/rust-lang/rust/pull/88816) r? ```@Mark-Simulacrum```
2021-10-09Auto merge of #89631 - camsteffen:clippy-boot-env, r=Mark-Simulacrumbors-8/+1
Remove unused clippy bootstrap env vars Continues rust-lang/rust-clippy#7646
2021-10-07bootstrap: add error messages re shallow historyTaylor Yu-0/+12
Exit with an error if we can't find a commit hash for downloading LLVM or rustc snapshots.
2021-10-07bootstrap: don't use `--merges` to find commitsTaylor Yu-3/+3
Shallow clones can cause `git rev-list --merges` to miss merge commits. Omit it, because the most recent bors commit is almost always a merge commit.
2021-10-07Remove unused clippy bootstrap env varsCameron Steffen-8/+1
2021-10-07Add wrapper for -Z gcc-ld=lld to invoke rust-lld with the correct flavorHans Kratz-13/+48
The wrapper is installed as `ld` and `ld64` in the `lib\rustlib\<host_target>\bin\gcc-ld` directory and its sole purpose is to invoke `rust-lld` in the parent directory with the correct flavor.
2021-10-04Don't rebuild GUI test crates every time you run test src/test/rustdoc-guiGuillaume Gomez-1/+1
2021-10-02bootstrap: add config option for nix patchingDavid Wood-12/+17
On NixOS systems, bootstrap will patch rustc used in bootstrapping after checking `/etc/os-release` (to confirm the current distribution is NixOS). However, when using Nix on a non-NixOS system, it can be desirable for bootstrap to patch rustc. In this commit, a `patch-binaries-for-nix` option is added to `config.toml`, which allows for user opt-in to bootstrap's Nix patching. Signed-off-by: David Wood <david.wood@huawei.com>
2021-09-30bootstrap: Update comment (again) in config.library.tomlBen Reeves-1/+0