about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
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
2020-10-20Package more llvm-* tools in the rust-dev component, for run-make-fulldeps testsSimon Sapin-2/+9
Fixes https://github.com/rust-lang/rust/issues/78110
2020-10-20Rollup merge of #77778 - jyn514:git-hook, r=mark-simulacrumYuki Okushi-3/+11
[x.py setup] Allow setting up git hooks from other worktrees Closes https://github.com/rust-lang/rust/issues/77684 r? @caass
2020-10-19bootstrap: configure native toolchain for run-makeJonas Schievink-1/+1
This allows moving a lot of run-make-fulldeps tests to just run-make tests, and allows running those on target-only platforms
2020-10-19bootstrap: fall back to auto-detected CXXJonas Schievink-1/+2
This allows us to use the C++ compiler configured via `CXX_target_triple` env vars
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-10-18Rollup merge of #76607 - Mark-Simulacrum:tidy-bins, r=pnkfelixYuki Okushi-0/+1
Modify executable checking to be more universal This uses a dummy file to check if the filesystem being used supports the executable bit in general. Supersedes #74753.
2020-10-16Haiku: explicitly set CMAKE_SYSTEM_NAME when cross-compilingNiels Sascha Reedijk-0/+2
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-15Auto merge of #77756 - alarsyo:setup-llvm-detect, r=jyn514bors-4/+32
Detect configuration for LLVM during setup This is a first draft to address #77579, setting `download-ci-llvm` to true on Linux, but I could also implement the `if-available` setting mentioned in the issue. On other platforms I was thinking about using [the which crate](https://crates.io/crates/which), if adding a dependency on it is considered okay of course, to detect the presence of `llvm-config` in the path, and use it if found. Still a work in progress of course.
2020-10-14x.py setup: Avoid infinite loop if stdin is /dev/nullIan Jackson-0/+4
EOF is not an error; it just causes read_line to produce "". Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2020-10-14x.py setup: Fix handling of wrong interactive inputIan Jackson-1/+1
We need a fresh input buffer each time, or we reuse the previous data (since `read_line` appends). Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2020-10-14x.py: setup: Offer keywords in interactive promptIan Jackson-2/+2
We understand these profile names because we use .to_str(). Mention them in the question. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2020-10-14x.py: setup: Provide a description of what it doesIan Jackson-3/+10
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
2020-10-14x.py: setup: Refactor to centralise list of profilesIan Jackson-17/+51
Put all()'s otuput in the order we want to print things in, and add a comment about why they are in this order. Provide purpose() and all_for_help(). Use these things everywhere. Move all the abbrev character ("a", "b", etc.) processing into interactive_path. No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2020-10-14Rollup merge of #77829 - gburgessiv:unused-features-var, r=alexcrichtonDylan DPC-5/+5
bootstrap: only use compiler-builtins-c if they exist The assignment of `features` above was added in rust-lang#60981, but never used. Presumably the intent was to replace the string literal here with it. While I'm in the area, `compiler_builtins_c_feature` doesn't need to be a `String`. I'm not entirely sure of a great way to locally test this -- `./x.py test` passed on my machine, but 🤷‍♂️. r? @alexcrichton
2020-10-14Rollup merge of #77909 - pietroalbini:fix-build-manifest-path, r=Mark-SimulacrumYuki Okushi-1/+1
bootstrap: set correct path for the build-manifest binary This changes the path of the binary inside the tarball to be: ``` build-manifest-{release}-{target}/build-manifest/bin/build-manifest ``` ...instead of: ``` build-manifest-{release}-{target}/build-manifest/bin/build-manifest/build-manifest ``` r? @Mark-Simulacrum
2020-10-14Rollup merge of #77868 - Aaron1011:llvm-tools-opt-llc, r=Mark-SimulacrumYuki Okushi-0/+3
Include `llvm-dis`, `llc` and `opt` in `llvm-tools-preview` component Fixes #55890 It's useful to have `llc` and `opt` available when debugging an LLVM miscompilation,.