summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2022-11-02Fix stable channel downloads of LLVMMark Rousskov-8/+18
2022-10-04Revert "fix #101691: copy stage0 binaries into stage0-sysroot"Mark Rousskov-37/+0
This reverts commit 32f8eb2fee4d6781a79052b560abd10e12ebb34f. (cherry picked from commit f0c78ee3dc7c6b99a939e6afb7348ba8b543d7fd)
2022-09-19Enable RUSTC_BOOTSTRAP for a few stepsMark Rousskov-0/+3
2022-09-16Rollup merge of #101921 - est31:bootstrap_cfg_rustdoc, r=joshtriplettMichael Howell-4/+13
Pass --cfg=bootstrap for rustdoc for proc_macro crates This PR does three things: * First, it passes --cfg=bootstrap on stage 0 for rustdoc invocations on proc_macro crates. This mirrors what we do already for rustc invocations of those, and is needed because cargo doesn't respect RUSTFLAGS or RUSTDOCFLAGS when confronted with a proc macro. * Second, it marks the bootstrap config variable as expected. This is needed both on later stages where it's not set, but also on stage 0, where it is set. * Third, it adjusts the comment in the rustc wrapper to better reflect the reason why we set the bootstrap variable as expected: due to recent changes, setting it as expected is also required even if the cfg variable is passed: ebf4cc361e0d0f11a25b42372bd629953365d17e .
2022-09-16Pass --cfg=bootstrap for rustdoc for proc_macro cratesest31-4/+13
This commit does three things: * First, it passes --cfg=bootstrap on stage 0 for rustdoc invocations on proc_macro crates. This mirrors what we do already for rustc invocations of those, and is needed because cargo doesn't respect RUSTFLAGS or RUSTDOCFLAGS when confronted with a proc macro. * Second, it marks the bootstrap config variable as expected. This is needed both on later stages where it's not set, but also on stage 0, where it is set. * Third, it adjusts the comment in the rustc wrapper to better reflect the reason why we set the bootstrap variable as expected: due to recent changes, setting it as expected is also required even if the cfg variable is passed: ebf4cc361e0d0f11a25b42372bd629953365d17e .
2022-09-16Rollup merge of #101809 - aDotInTheVoid:jsondoclint, r=GuillaumeGomezDylan DPC-0/+3
Replace `check_missing_items.py` with `jsondoclint` [zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/check_missing_items.2Epy.20Replacement.2E) check_missing_items.py was a python script that checked rustdoc json output to make sure all the Id's referenced existed in the JSON index. This PR replaces that with a rust binary (`jsondoclint`) that does the same thing. ### Motivation 1. Easier to change when `rustdoc-json-types` changes, as `jsondoclint` uses the types directly. 2. Better Errors: - Multiple Errors can be emited for a single crate - Errors can say where in JSON they occored ``` 2:2889:408 not in index or paths, but refered to at '.index."2:2888:104".inner.items[0]' 2:2890:410 not in index or paths, but refered to at '.index."2:2888:104".inner.items[1]' ``` 3. Catches more bugs. - Because matches are exaustive, all posible variants considered for enums - All Id's checked - Has already found #101770, #101199 and #100973 - Id type is also checked, so the Id's in a structs fields can only be field items. 4. Allows the possibility of running from `rustdoc::json`, which we should do in a crator run at some point. cc ``@CraftSpider`` r? ``@GuillaumeGomez``
2022-09-14jsondoclint: New ToolNixon Enraght-Moony-0/+3
2022-09-13fix #101691: copy stage0 binaries into stage0-sysrootyukang-0/+37
2022-09-05Avoid UB in the Windows filesystem code in... bootstrap?Thom Chiovoloni-4/+7
2022-09-02Rollup merge of #100200 - petrochenkov:zgccld2, r=lqd,Mark-SimulacrumMatthias Krüger-3/+11
Change implementation of `-Z gcc-ld` and `lld-wrapper` again This PR partially reverts https://github.com/rust-lang/rust/pull/97375 and uses the strategy described in https://github.com/rust-lang/rust/issues/97402#issuecomment-1147404520 instead, thus fixes https://github.com/rust-lang/rust/issues/97755.
2022-09-02Rollup merge of #101166 - GuillaumeGomez:error-index-mdbook, r=notriddleGuillaume Gomez-1/+1
Generate error index with mdbook instead of raw HTML pages This is a follow-up of https://github.com/rust-lang/rust/pull/100922. This comes from a remark from ````@estebank```` who said that the search was a nice thing on the previous version and that it wasn't possible anymore. An easy way to come around this limitation was to use `mdbook`, which is what I did here. Now some explanations on the code. I'll explain how I developed this and why I reached this solution. First I did it very basically by simply setting the source directory and the output directory, generated a `SUMMARY.md` manually which listed all error codes and that was it. Two problems arose from this: 1. A lot of new HTML files were generated at the top level 2. An `index.html` file was generated at the top-level (the summary in short). So for `1.`, it's not great to have too many files at the top-level as it could create file conflicts more easily. And for `2.`, this is actually a huge issue because <doc.rust-lang.org> generates an `index.html` file with a links to a few different resources, so it should never be overwritten. <s>Unfortunately, `mdbook` **always** generates an `index.html` file so the only solution I could see (except for sending them a contribution, I'll maybe do that later) was to temporaly move a potentially existing `index.html` file and then puts it back once done. For this last part, to ensure that we don't return *before* it has been put back, I wrapped the `mdbook` generation code inside `render_html_inner` which is called from `render_html` which in turn handle the "save" of `index.html`.</s> EDIT: `mdbook` completely deletes ALL the content in the target directory so I instead generate into a sub directory and then I move the files to the real target directory. To keep compatibility with the old version, I also put the `<script>` ````@notriddle```` nicely provided in the previous PR only into the `error-index.html` file to prevent unneeded repetition. I didn't use `mdbook` `additional-js` option because the JS is included at the end of all HTML files, which we don't want for two reasons: 1. It's slow. 2. We only want it to be run in `error-index.html` (even if we also ensure in the JS itself too!). <s>Now the last part: why we generate the summary twice. We actually generate it once to tell `mdbook` what the book will look like and a second time because a create a new chapter content which will actually list all the error codes (with the updated paths).</s> EDIT: I removed the need for two summaries. You can test it [here](https://rustdoc.crud.net/imperio/error-index-mdbook/error-index.html). r? ````@notriddle````
2022-09-01Rollup merge of #101072 - tmandry:llvm-is-vanilla, r=Mark-SimulacrumMatthias Krüger-5/+10
bootstrap: Add llvm-has-rust-patches target option This is so you can check out an upstream commit in src/llvm-project and have everything just work. This simplifies the logic in `is_rust_llvm` a bit; it doesn't need to check for download-ci-llvm because we would have already errored if both that and llvm-config were specified on the host platform.
2022-09-01Rollup merge of #100852 - Samyak2:samyak/100459, r=Mark-SimulacrumMatthias Krüger-4/+11
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-09-01Auto merge of #100606 - cuviper:upgrade-linux-ci, r=Mark-Simulacrumbors-1/+4
ci: Upgrade non-dist Linux testers from ubuntu:16.04 to 22.04 The main goal of updating to 22.04 is to get away from `llvm.allow-old-toolchain`. A side benefit is that they can also use the system `cmake` instead of building one.
2022-09-01Auto merge of #100707 - dzvon:fix-typo, r=davidtwcobors-5/+5
Fix a bunch of typo 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-31Generate error index with mdbook instead of raw HTML pagesGuillaume Gomez-1/+1
2022-08-31Fix a bunch of typoDezhi Wu-5/+5
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-31Rollup merge of #101025 - semarie:openbsd-archs, r=petrochenkovMatthias Krüger-2/+3
Add tier-3 support for powerpc64 and riscv64 openbsd # powerpc64 - MCP for [powerpc64-unknown-openbsd tier-3 support](https://github.com/rust-lang/compiler-team/issues/551) - only need to add spec definition in rustc_target # riscv64 - MCP for [riscv64-unknown-openbsd tier-3 support](https://github.com/rust-lang/compiler-team/issues/552) - add spec definition in rustc_target - follow freebsd about avoiding linking with `libatomic`
2022-08-30Avoid bootstrap from updating rls submoduleRaoul Strackx-1/+0
2022-08-29bootstrap: Add llvm-has-rust-patches target optionTyler Mandry-5/+10
This is so you can check out an upstream commit in src/llvm-project and have everything just work.
2022-08-28add riscv64gc-unknown-openbsd support (target riscv64-unknown-openbsd on ↵Sébastien Marie-2/+3
OpenBSD) - add platform-support documentation - add riscv64gc-unknown-openbsd spec - do not try to link with -latomic on openbsd
2022-08-27Remove RLS from macOS pkg and Windows msi installers.Eric Huss-33/+3
These generally aren't used too much, and I feel like aren't really helpful for installing the RLS stub.
2022-08-27Sunset RLSEric Huss-85/+5
2022-08-27Add replace-version-placeholder toolest31-1/+67
This tool is to be ran at specific points in the release process to replace the version place holder made by stabilizations with the version number.
2022-08-27Rollup merge of #100811 - czzrr:master, r=Mark-SimulacrumYuki Okushi-1/+9
Fix wrong compiletest filters on Windows As discussed in [#79334](https://github.com/rust-lang/rust/issues/79334), when calling e.g. ``` python x.py test src/test/ui/expr/compound-assignment/eval-order.rs ``` on Windows, compiletest passes the filter `expr/compound-assignment/eval-order.rs` to libtest, which instead should be `expr\compound-assignment\eval-order.rs`, as that is the file found when collecting tests. This is what I fixed. I'm not sure how to organize a test for this. Any suggestions?
2022-08-26Auto merge of #98051 - davidtwco:split-dwarf-stabilization, r=wesleywiserbors-16/+14
session: stabilize split debuginfo on linux Stabilize the `-Csplit-debuginfo` flag... - ...on Linux for all values of the flag. Split DWARF has been implemented for a few months, hasn't had any bug reports and has had some promising benchmarking for incremental debug build performance. - ..on other platforms for the default value. It doesn't make any sense that `-Csplit-debuginfo=packed` is unstable on Windows MSVC when that's the default behaviour, but keep the other values unstable.
2022-08-26Use getuid to check instead of USER env var in rustbuildSamyak Sarnayak-4/+11
This makes it consistent with `x.py` as changed in #95671 Fixes #100459
2022-08-23rustbuild: fix version parsing for browser-ui-testJosh Stone-1/+4
2022-08-23Rollup merge of #100832 - ehuss:bootstrap-cleanup, r=jyn514Matthias Krüger-20/+10
Some small bootstrap cleanup This is a collection of a few small cleanups. See commits for more details. * Remove some unused fields from the tool_extended macro. * Remove rustfmt from publish_toolstate. * Remove Steve from toolstate failure notices. * Don't allow rustfmt to fail on dist.
2022-08-21Correct test-args to compiletest on Windowsczzrr-1/+9
2022-08-20bootstrap: Don't allow rustfmt to fail on dist.Eric Huss-9/+2
When running `x.py dist`, rustfmt was being allowed to fail when missing-tools is true. This isn't much of an issue in practice since other CI jobs will fail if rustfmt fails. This code was just leftovers from when rustfmt was tracked in toolstate, and this removes it to make it clear that it no longer works that way.
2022-08-20bootstrap: Remove some unused fields from the tool_extended macro.Eric Huss-11/+8
2022-08-21Auto merge of #100536 - Alexendoo:bootstrap-tls-model, r=Mark-Simulacrumbors-4/+13
bootstrap: don't apply `-Ztls-model=initial-exec` to proc macros Potentially fixes #100530 r? `@bjorn3`
2022-08-20Enable downloading prebuilt LLVM in test buildersMark Rousskov-2/+8
See comment added for details on the test builder restriction. This is primarily intended for macOS CI, but is likely to be a slight win on other builders too.
2022-08-19Refactor if-available setting to work in CIMark Rousskov-44/+79
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-08-19Minor refactoringMark Rousskov-2/+1
2022-08-18session: stabilize split debuginfo on linuxDavid Wood-16/+14
Stabilize the `-Csplit-debuginfo` flag... - ...on Linux for all values of the flag. Split DWARF has been implemented for a few months, hasn't had any bug reports and has had some promising benchmarking for incremental debug build performance. - ..on other platforms for the default value. It doesn't make any sense that `-Csplit-debuginfo=packed` is unstable on Windows MSVC when that's the default behaviour, but keep the other values unstable. Signed-off-by: David Wood <david.wood@huawei.com>
2022-08-16bootstrap: don't apply `-Ztls-model=initial-exec` to proc macrosAlex Macleod-4/+13
2022-08-16Rollup merge of #100460 - cuviper:drop-llvm-12, r=nagisaMatthias Krüger-2/+2
Update the minimum external LLVM to 13 With this change, we'll have stable support for LLVM 13 through 15 (pending release). For reference, the previous increase to LLVM 12 was #90175. r? `@nagisa`
2022-08-15Revert "Revert "Remove num_cpus dependency from bootstrap, build-manifest ↵The 8472-5/+5
and rustc_session"" This reverts commit 1ae4b258267462da0b1aae1badcf83578153c799.
2022-08-14Update the minimum external LLVM to 13Josh Stone-2/+2
2022-08-14Impl Debug for some structs of rustbuildohno418-1/+2
2022-08-13Rollup merge of #100468 - cuviper:lazy-x, r=jyn514Michael Goulet-1/+1
Use an extensionless `x` script for non-Windows #99992 added `x.sh` and `x.ps1`, but this broke my lazy `./xTAB` habit that used to get me to `./x.py`. If we rename `x.sh` to `x`, then I can adjust to `./xSPACE` for the same number of characters typed. r? `@jyn514`
2022-08-13Rollup merge of #100464 - khyperia:lld-icf-on-windows, r=jyn514Michael Goulet-1/+6
Make `[rust] use-lld=true` work on windows Before, it would fail with "error: ignoring unknown argument '-Wl,--icf=all'" This option was introduced in https://github.com/rust-lang/rust/pull/99062 (well, technically https://github.com/rust-lang/rust/pull/99680) See zulip thread: https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/rust-lld.3A.20error.3A.20ignoring.20unknown.20argument.20'-Wl.2C--icf.3Dall'
2022-08-13Auto merge of #100341 - andrewpollack:fuchsia-llvm-libunwind, r=tmandrybors-1/+5
Use llvm-libunwind="in-tree" for Fuchsia targets With updates to Fuchsia CI's Zircon libraries #99833, we can introduce `llvm-libunwind="in-tree"` for Fuchsia targets. This PR restores functionality removed from https://github.com/rust-lang/rust/pull/93604#issuecomment-1136515651. cc `@tmandry` `@djkoloski`
2022-08-12Use an extensionless `x` script for non-WindowsJosh Stone-1/+1
2022-08-12Make `[rust] use-lld=true` work on windowskhyperia-1/+6
Before, it would fail with "error: ignoring unknown argument '-Wl,--icf=all'"
2022-08-12Auto merge of #99464 - nikic:llvm-15, r=cuviperbors-0/+3
Update to LLVM 15 For preliminary testing. Some LLVM 15 compatibility fixes were applied separately in #99512. Release timeline: * LLVM 15 branched on Jul 26. * The final LLVM 15.0.0 release is scheduled for Sep 6. * Current nightly (1.65.0) is scheduled for Nov 3. Changes in this PR (apart from the LLVM update): * Pass `--set llvm.allow-old-toolchain` for many Docker images. LLVM 16 will require GCC >= 7.1, while LLVM 15 still allows older compilers with an option. Specify the option for builders still using GCC 5.4. #95026 updated some of the used toolchains, but not all. * Use the `+atomics-32` target feature for thumbv6m. * Explicitly link libatomic when cross-compiling LLVM to 32-bit target. * Explicitly disable zstd support, to avoid libzstd.so dependency. New LLVM patches ([commits](https://github.com/rust-lang/llvm-project/commits/rustc/15.0-2022-08-09)): * [rust-only] Fix ICE with GCC 5.4 (https://github.com/nikic/llvm-project/commit/15be58d7f0342b1da5af219bac8bd71d01da6dff) * [rust-only] Fix build with GCC 5.4 (https://github.com/nikic/llvm-project/commit/774edc10fa45229c2aa678f1bef8b4812dc0f76a) * ~~[rust-only] Fix build with GCC 5.2 (https://github.com/nikic/llvm-project/commit/1a6069a7bb35ace1e40d566035cbf7ed2fa3b1f7)~~ * ~~[rust-only] Fix ICE with GCC 5.2 (https://github.com/nikic/llvm-project/commit/493081f2909206e0ed55af68a4058a76c0ad7a64)~~ * ~~[rust-only] Fix build with GCC 5.2 (https://github.com/nikic/llvm-project/commit/0fc5979d738c3a1f9510fe2d62417f7d2af37817)~~ * [backported] Addition of `+atomics` target feature (https://github.com/llvm/llvm-project/commit/57bdd9892d0eba5bdd25fc44799235be7b9f5153). * [backported] Revert compiler-rt change that broke powerpc (https://github.com/llvm/llvm-project/commit/9c68b43915fc1c9c0a07e935163ae8d638d7241b) * [awaiting backport] Fix RelLookupTableConverter on gnux32 (https://github.com/nikic/llvm-project/commit/639388a05f25772fb23eea5b1045e7df83bcfaa7 / https://github.com/llvm/llvm-project/issues/57021) Tested images: dist-x86_64-linux, armhf-gnu, arm-android, dist-s390x-linux, dist-x86_64-illumos, dist-x86_64-freebsd, wasm32, dist-x86_64-musl, dist-various-1, dist-riscv64-linux, dist-mips-linux, dist-mipsel-linux, dist-powerpc-linux, dist-aarch64-linux, dist-x86_64-apple, x86_64-msvc-1, x86_64-msvc-2, dist-various-2, dist-arm-linux Tested up to the usual ipv6 error: test-various, i686-gnu, x86_64-gnu-nopt r? `@ghost`
2022-08-11Rollup merge of #99992 - jyn514:shell-scripts, r=Mark-SimulacrumMatthias Krüger-3/+8
Add `x.sh` and `x.ps1` shell scripts This is a more ambitious version of https://github.com/rust-lang/rust/pull/98716. It still changes the x.py shebang back to python3, for compatibility with non-Unix systems, but also adds alternative entrypoints for systems without `python3` installed. These scripts will be necessary for the rust entrypoint (#94829), so I see little downside in adding them early. I'll update the dev-guide to suggest using these instead of x.py once this is merged. Fixes https://github.com/rust-lang/rust/issues/98650 r? `@Mark-Simulacrum` cc `@dtolnay` `@CAD97` `@yoshuawuyts`
2022-08-11Rollup merge of #100403 - GuillaumeGomez:improve-messages, r=jshaDylan DPC-0/+5
Improve error messages when running rustdoc GUI tests There was already a message on how to install `browser-ui-test`, so nothing to be done there. However, we didn't show how to update its version, so the first commit adds it. Another pain point was how to fix the unexpected crash in `browser-ui-test` (because of a missing `--no-sandbox`, still no idea why it became mandatory a few months ago on some linux distributions...). It now looks like this: ```console Running 1 rustdoc-gui (8 concurrently) ... ERROR: puppeteer failed when trying to create a new page. Please try again with `--no-sandbox` `browser-ui-test` crashed unexpectedly. Please try again with adding `--test-args --no-sandbox` at the end. For example: `x.py test src/test/rustdoc-gui --test-args --no-sandbox` Build completed unsuccessfully in 0:00:03 ``` Thanks to `@jsha` for suggesting these improvements! r? `@jsha`