summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2020-12-08[beta] revert #78790, vendor libtest for rustc-srcEric Huss-45/+2
2020-12-08bootstrap: use the same version number for rustc and cargoPietro Albini-25/+4
Historically the stable tarballs were named after the version number of the specific tool, instead of the version number of Rust. For example, both of the following tarballs were part of the same release: rustc-1.48.0-x86_64-unknown-linux-gnu.tar.xz cargo-0.49.0-x86_64-unknown-linux-gnu.tar.xz PR #77336 changed the dist code to instead use Rust's version number for all the tarballs, regardless of the tool they contain: rustc-1.48.0-x86_64-unknown-linux-gnu.tar.xz cargo-1.48.0-x86_64-unknown-linux-gnu.tar.xz Because of that there is no need anymore to have a separate `cargo` field in src/stage0.txt, as the Cargo version will always be the same as the rustc version. This PR removes the field, simplifying the code and the maintenance work required while producing releases.
2020-11-17Ignore failures of RLS on aarch64 WindowsMark Rousskov-1/+7
2020-11-17Install CI llvm into the library directoryMark Rousskov-1/+4
2020-11-17Avoid installing external LLVM dylibsMark Rousskov-0/+16
If the LLVM was externally provided, then we don't currently copy artifacts into the sysroot. This is not necessarily the right choice (in particular, it will require the LLVM dylib to be in the linker's load path at runtime), but the common use case for external LLVMs is distribution provided LLVMs, and in that case they're usually in the standard search path (e.g., /usr/lib) and copying them here is going to cause problems as we may end up with the wrong files and isn't what distributions want. This behavior may be revisited in the future though.
2020-11-11Rollup merge of #78947 - dalance:llvm_cov, r=Mark-SimulacrumJonas Schievink-10/+11
Ship llvm-cov through llvm-tools `llvm-cov` is used to generate coverage report with LLVM InstrProf-based code coverage #34701. So if `llvm-cov` is shipped through llvm-tools, users can try it easily accorging to the instruction of [The Rust Unstable Book](https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/source-based-code-coverage.html).
2020-11-11Rollup merge of #78354 - 12101111:rustbuild_profiler, r=Mark-SimulacrumJonas Schievink-17/+46
Support enable/disable sanitizers/profiler per target This PR add options under `[target.*]` of `config.toml` which can enable or disable sanitizers/profiler runtime for corresponding target. If these options are empty, the global options under `[build]` will take effect. Fix #78329
2020-11-11Auto merge of #78790 - Gankra:rust-src-vendor, r=Mark-Simulacrumbors-2/+45
Vendor libtest's dependencies in the rust-src component This is the Rust side of https://github.com/rust-lang/wg-cargo-std-aware/issues/23 Note that this won't produce a useful result for `cargo -Zbuild-std` if there are multiple versions of a crate vendored, but will otherwise produce a valid vendor dir. See https://github.com/rust-lang/cargo/pull/8834 for the other half of this change.
2020-11-12Ship llvm-cov through llvm-toolsdalance-10/+11
2020-11-09Rollup merge of #78566 - JRF63:polly, r=Mark-SimulacrumDylan DPC-0/+8
Enable LLVM Polly via llvm-args. I think doing it this way is better than in #51061. Polly has other useful options and we probably don't want to create a `-Z` flag for each one of them. ![results](https://user-images.githubusercontent.com/7283601/97695555-338f7180-1adf-11eb-82bd-5130e0e6fa89.png) [Benchmark](https://gist.github.com/JRF63/9a6268b91720958e90dbe7abffe20298) I noticed that `-lto` seems to interfere with polly in this specific microbenchmark, as enabling it causes the perf to drop to that of non-polly builds. Other related PRs: #75615
2020-11-09Rollup merge of #78513 - jyn514:rustup-toolchain, r=Mark-SimulacrumDylan DPC-3/+20
Infer the default host target from the host toolchain if possible - `beta-x86_64-unknown-linux-gnu` has beta stripped - `rustc2` is ignored This fixes ongoing issues where x.py will detect the wrong host triple between MSVC and GNU. I don't think this will break anyone's workflow - I'd be very surprised if you a) had no `[build]` section in `config.toml`, b) had rustc installed, and c) expected the default target to be something other than the default target used by `rustc`. But I could be wrong - I'm happy to hear user stories :) Fixes https://github.com/rust-lang/rust/issues/78150. r? ``@Mark-Simulacrum`` cc ``@Lokathor``
2020-11-09Vendor libtest's dependencies in the rust-src componentAlexis Beingessner-2/+45
This is the Rust side of https://github.com/rust-lang/wg-cargo-std-aware/issues/23
2020-11-09Auto merge of #78201 - joshtriplett:rustc-tls-model, r=Mark-Simulacrumbors-0/+12
Compile rustc crates with the initial-exec TLS model This should produce more efficient code, with fewer calls to __tls_get_addr. The tradeoff is that libraries using it won't work with dlopen, but that shouldn't be a problem for rustc's internal libraries.
2020-11-08Rollup merge of #78842 - shepmaster:bootstrap-rustfmt, r=Mark-SimulacrumMara Bos-5/+12
Honor the rustfmt setting in config.toml Prior to this, setting the rustfmt configuration was ignored: ``` % mkdir example % cd example % ../configure --set build.rustfmt=/usr/bin/true % ../x.py fmt ./x.py fmt is not supported on this channel failed to run: /Users/shep/Projects/rust/example/build/bootstrap/debug/bootstrap fmt Build completed unsuccessfully in 0:00:01 ``` And after: ``` % ../x.py fmt Build completed successfully in 0:00:11 ``` r? `@Mark-Simulacrum`
2020-11-08Rollup merge of #78706 - bjorn3:fix_run_make_without_llvm, r=Mark-SimulacrumMara Bos-11/+15
Fix run-make tests running when LLVM is disabled The `--cc`, `--cxx`, `--cflags` and `--ar` flags were only passed to compiletest when `builder.config.llvm_enabled()` returned true. This is preventing me from running the tests on cg_clif.
2020-11-07Honor the rustfmt setting in config.tomlJake Goulding-5/+12
Prior to this, setting the rustfmt configuration was ignored: ``` % mkdir example % cd example % ../configure --set build.rustfmt=/usr/bin/true % ../x.py fmt ./x.py fmt is not supported on this channel failed to run: /Users/shep/Projects/rust/example/build/bootstrap/debug/bootstrap fmt Build completed unsuccessfully in 0:00:01 ``` And after: ``` % ../x.py fmt Build completed successfully in 0:00:11 ```
2020-11-06Compile tools and internal libraries with the initial-exec TLS modelJosh Triplett-0/+12
This should produce more efficient code, with fewer calls to __tls_get_addr. The tradeoff is that libraries using it won't work with dlopen, but that shouldn't be a problem for tools or for our own internal libraries. Co-authored-by: Mark Rousskov <mark.simulacrum@gmail.com>
2020-11-07Rollup merge of #78705 - Mark-Simulacrum:nicer-failure-compiletest, r=jyn514Yuki Okushi-0/+1
Print a summary of which test suite failed Especially on CI, where cross-compiling is common and single builder may end up with multiple hosts and multiple targets, it can be annoying to scroll back to the nearest start of test marker. This prints out a summary of the test suite being run directly in compiletest. For example, on a mir-opt failure, this would show something like this: ``` failures: [mir-opt] mir-opt/while-storage.rs test result: FAILED. 140 passed; 1 failed; 2 ignored; 0 measured; 0 filtered out Some tests failed in compiletest suite=mir-opt mode=mir-opt host=x86_64-unknown-linux-gnu target=x86_64-unknown-linux-gnu ``` Fixes #78517
2020-11-07Rollup merge of #78514 - jyn514:setup-number, r=Mark-SimulacrumYuki Okushi-6/+9
Allow using 1/2/3/4 for `x.py setup` options This undocumented feature allows you to typo 'a' as '1'. r? ```@Mark-Simulacrum``` cc ```@Lokathor```
2020-11-06Auto merge of #77351 - jyn514:clippy-sysroot, r=Mark-Simulacrumbors-19/+76
Fix `x.py clippy` I don't think this ever worked. Fixes https://github.com/rust-lang/rust/issues/77309. `--fix` support is a work in progress, but works for a very small subset of `libtest`. This works by using the host `cargo-clippy` driver; it does not use `stage0.txt` at all. To mitigate confusion from this, it gives an error if you don't have `rustc +nightly` as the default rustc in `$PATH`. Additionally, it means that bootstrap can't set `RUSTC`; this makes it no longer possible for clippy to detect the sysroot itself. Instead, bootstrap passes the sysroot to cargo. r? `@ghost`
2020-11-05Get `--fix` working for everything except rustdocJoshua Nelson-7/+17
Here's the error for rustdoc: ``` Checking rustdoc artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu) error: no library targets found in package `rustdoc-tool` ```
2020-11-05Infer the default host target from the host toolchain if possibleJoshua Nelson-3/+20
This fixes ongoing issues where x.py will detect the wrong host triple between MSVC and GNU. - Add line to changelog
2020-11-05Fix even more URLsGuillaume Gomez-2/+2
2020-11-04Auto merge of #78740 - pietroalbini:no-more-legacy, r=Mark-Simulacrumbors-58/+1
Remove legacy promote-release support from build-manifestg Now that we're not running the [legacy `promote-release`](https://github.com/rust-lang/rust-central-station/tree/master/promote-release) anymore, this PR removes support from it from `bootstrap` and `build-manifest`. r? `@Mark-Simulacrum`
2020-11-03Rollup merge of #78709 - ehuss:fix-in_tree_crates-non-member, r=Mark-SimulacrumMara Bos-0/+4
Fix panic in bootstrap for non-workspace path dependencies. If you add a `path` dependency to a `Cargo.toml` that is located outside of the workspace, then the `in_tree_crates` function can panic because it finds a path dependency that is not defined (since it uses `cargo metadata --no-deps`). This fixes it by skipping over those entries, which are usually not things you select on the command-line. Fixes #78617
2020-11-03Rollup merge of #78687 - jyn514:bootstrap-help, r=Mark-SimulacrumMara Bos-1/+2
Suggest library/std when running all stage 0 tests r? ``@Mark-Simulacrum`` cc ``@ijackson`` For context, this came out of a discord conversation where ``@ijackson`` was running `test --stage 1` when they were only adding doc-tests to the standard library.
2020-11-03Fix panic in bootstrap for non-workspace path dependencies.Eric Huss-0/+4
2020-11-03Print a summary of which test suite failedMark Rousskov-0/+1
Especially on CI, where cross-compiling is common and single builder may end up with multiple hosts and multiple targets, it can be annoying to scroll back to the nearest start of test marker. This prints out a summary of the test suite being run directly in compiletest.
2020-11-03Fix run-make tests running when LLVM is disabledbjorn3-11/+15
2020-11-03build-manifest: remove legacy promote-release supportPietro Albini-58/+1
This commit removes support for the legacy promote-release, as that's not executed anymore on the nightly channel.
2020-11-02Suggest library/std when running all stage 0 testsJoshua Nelson-1/+2
2020-10-30Enable LLVM Polly via llvm-args.Joseph Rafael Ferrer-0/+8
2020-10-29Create config.toml in the current directory, not the top-level directoryJoshua Nelson-1/+1
See https://github.com/rust-lang/rust/issues/78509 for discussion.
2020-10-28Allow using 1/2/3/4 for `x.py setup` optionsJoshua Nelson-6/+9
This undocumented feature allows you to typo 'a' as '1'.
2020-10-27Rollup merge of #77703 - Keruspe:system-libunwind, r=Mark-SimulacrumYuki Okushi-7/+38
add system-llvm-libunwind config option allows using the system-wide llvm-libunwind as the unwinder Workaround for #76020
2020-10-26Allow using clippy with either beta or nightlyJoshua Nelson-5/+7
Not 100% sure this will _always_ work, but it works currently.
2020-10-26x.py fmtJoshua Nelson-3/+1
2020-10-26Add --fix support to `x.py clippy`Joshua Nelson-14/+24
2020-10-26Set the proper sysroot for clippyJoshua Nelson-2/+39
Clippy does its own runtime detection of the sysroot, which was incorrect in this case (it used the beta sysroot). This overrides the sysroot to use `stage0-sysroot` instead. - Get `x.py clippy` to work on nightly - Give a nice error message if nightly clippy isn't installed
2020-10-26Auto merge of #77975 - bjorn3:cg_clif_subtree3, r=Mark-Simulacrumbors-8/+288
Add cg_clif as optional codegen backend Rustc_codegen_cranelift is an alternative codegen backend for rustc based on Cranelift. It has the potential to improve compilation times in debug mode. In my experience the compile time improvements over debug mode LLVM for a clean build are about 20-30% in most cases. This PR adds cg_clif as optional codegen backend. By default it is only enabled for `./x.py check`. It can be enabled for `./x.py build` too by adding `cranelift` to the `rust.codegen-backends` array in `config.toml`. MCP: https://github.com/rust-lang/compiler-team/issues/270 r? `@Mark-Simulacrum`
2020-10-26Add support for using cg_clif to bootstrap rustcbjorn3-8/+288
2020-10-26Support enable/disable sanitizers/profiler per target12101111-17/+46
2020-10-25Auto merge of #77901 - jonas-schievink:unignore-test-36710, r=Mark-Simulacrumbors-2/+3
Unignore test for #36710 on MUSL This now works fine thanks to autodetected `-C link-self-contained`. Closes #36710
2020-10-23x.py test --test-args flag description enhancementNelson J Morais-1/+7
2020-10-23Rollup merge of #78153 - est31:downloaded_llvm_maybe_sync, r=Mark-SimulacrumYuki Okushi-1/+6
Sync LLVM submodule if it has been initialized Since having enabled the download-ci-llvm option, and having rebased on top of #76864, I've noticed that I had to update the llvm-project submodule manually if it was checked out. Orignally, the submodule update logic was introduced to reduce the friction for contributors to manage the submodules, or in other words, to prevent getting PRs that have unwanted submodule rollbacks because the contributors didn't run git submodule update. This commit adds logic to ensure there is no inadvertent LLVM submodule rollback in a PR if download-ci-llvm (or llvm-config) is enabled. It will detect whether the llvm-project submodule is initialized, and if so, update it in any case. If it is not initialized, behaviour is kept to not do any update/initialization. An alternative to the chosen implementation would be to not pass the --init command line arg to `git submodule update` for the src/llvm-project submodule. This would show a confusing error message however on all builds with an uninitialized repo. We could pass the --silent param, but we still want it to print something if it is initialized and has to update something. So we just do a manual check for whether the submodule is initialized.
2020-10-22Auto merge of #78131 - SimonSapin:ar, r=Mark-Simulacrumbors-3/+16
Package more llvm-* tools in the rust-dev component, for run-make-fulldeps tests Fixes https://github.com/rust-lang/rust/issues/78110
2020-10-22Rollup merge of #78009 - nielx:fix/CMAKE_SYSTEM_NAME, r=Mark-SimulacrumYuki Okushi-0/+2
Haiku: explicitly set CMAKE_SYSTEM_NAME when cross-compiling This resolves issues where the cross-build of LLVM fails because it tries to link to the host's system libraries instead of the target's system libraries.
2020-10-21allow using the system-wide llvm-libunwind as the unwinderMarc-Antoine Perennou-7/+38
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2020-10-20Sync LLVM submodule if it has been initializedest31-1/+6
Since having enabled the download-ci-llvm option, and having rebased on top of f05b47ccdfa63f8b4b9fb47a9aa92381801d3ff1, I've noticed that I had to update the llvm-project submodule manually if it was checked out. Orignally, the submodule update logic was introduced to reduce the friction for contributors to manage the submodules, or in other words, to prevent getting PRs that have unwanted submodule rollbacks because the contributors didn't run git submodule update. This commit adds logic to ensure there is no inadvertent LLVM submodule rollback in a PR if download-ci-llvm (or llvm-config) is enabled. It will detect whether the llvm-project submodule is initialized, and if so, update it in any case. If it is not initialized, behaviour is kept to not do any update/initialization. An alternative to the chosen implementation would be to not pass the --init command line arg to `git submodule update` for the src/llvm-project submodule. This would show a confusing error message however on all builds with an uninitialized repo. We could pass the --silent param, but we still want it to print something if it is initialized and has to update something. So we just do a manual check for whether the submodule is initialized.
2020-10-20Make users of `download-ci-llvm` download a new versionSimon Sapin-1/+7