about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2022-10-01Auto merge of #101969 - reez12g:issue-101306, r=reez12gbors-0/+2
Make fmt downloaded on every invocation of bootstrap Fixes https://github.com/rust-lang/rust/issues/101306
2022-10-01Add a comment to downloading fmt statementRento Ezoe-0/+1
Co-authored-by: Joshua Nelson <github@jyn.dev>
2022-09-29Auto merge of #101833 - jyn514:cross-compile-compiler-builtins, ↵bors-22/+29
r=Mark-Simulacrum Make the `c` feature for `compiler-builtins` an explicit opt-in Its build script doesn't support cross-compilation. I tried fixing it, but the cc crate itself doesn't appear to support cross-compiling to windows either unless you use the -gnu toolchain: ``` error occurred: Failed to find tool. Is `lib.exe` installed? ``` Fixes https://github.com/rust-lang/rust/issues/101172.
2022-09-28Make the `c` feature for `compiler-builtins` opt-in instead of inferredJoshua Nelson-22/+29
The build script for `compiler_builtins` doesn't support cross-compilation. I tried fixing it, but the cc crate itself doesn't appear to support cross-compiling to windows either unless you use the -gnu toolchain: ``` error occurred: Failed to find tool. Is `lib.exe` installed? ``` Rather than trying to fix it or special-case the platforms without bugs, make it opt-in instead of automatic.
2022-09-26fix check_cfgPietro Albini-0/+1
2022-09-26Make fmt downloaded on every invocation of bootstrapreez12g-0/+1
2022-09-26Rollup merge of #102267 - jyn514:smaller-build-script, r=Mark-Simulacrumfee1-dead-36/+0
Don't set RUSTC in the bootstrap build script We no longer use this for anything since https://github.com/rust-lang/rust/pull/98483/files#diff-7eddc76f1be9eca2599a9ae58c65ffe247fbdff9b02ef687439894cab9afe749L781. Remove it, so that we spuriously rebuild bootstrap fewer times on Windows (where PATH changes often). Helps with https://github.com/rust-lang/rust/issues/92369. cc https://github.com/rust-lang/rust/pull/102266 r? ``@Mark-Simulacrum``
2022-09-26Rollup merge of #102178 - RalfJung:bootstrap-backtrace, r=Mark-Simulacrumfee1-dead-3/+2
bootstrap: the backtrace feature is stable, no need to allow it any more
2022-09-25Don't set RUSTC in the bootstrap build scriptJoshua Nelson-36/+0
We no longer use this for anything since https://github.com/rust-lang/rust/pull/98483/files#diff-7eddc76f1be9eca2599a9ae58c65ffe247fbdff9b02ef687439894cab9afe749L781. Remove it, so that we spuriously rebuild bootstrap fewer times on Windows (where PATH changes often).
2022-09-25Support overriding initial rustc and cargo pathsMark Rousskov-6/+8
This restores functionality broken by #98483. Unfortunately, it doesn't add a test to verify this works, but in this case we notice pretty quickly as perf uses this functionality and so reports breakage immediately after merging.
2022-09-24Auto merge of #98483 - dvtkrlbs:bootstrap-dist, r=jyn514bors-18/+101
Distribute bootstrap in CI This pre-compiles bootstrap from source and adds it to the existing `rust-dev` component. There are two main goals here: 1. Make it faster to build rust from source, both the first time and incrementally 2. Make it easier to add non-python entrypoints, since they can call out to bootstrap directly rather than having to figure out the right flags to pre-compile it. This second part is still in a bit of flux, see the tracking issue below for more information. There are also several changes to make bootstrap able to run on a machine other than the one it was built (particularly around `config.src` and `config.out` detection). I (`@jyn514)` am slightly concerned these will regress unless tested - maybe we should add an automated test that runs bootstrap in a chroot or something? Unclear whether the effort is worth the test coverage. Helps with https://github.com/rust-lang/rust/issues/94829.
2022-09-24Copy `bootstrap.exe` on Windows, not `bootstrap`Joshua Nelson-1/+1
2022-09-24Rollup merge of #102226 - RalfJung:miri-sysroot-build, r=oli-obkMatthias Krüger-1/+1
bootstrap/miri: switch to non-deprecated env var for setting the sysroot folder r? `@oli-obk`
2022-09-24bootstrap/miri: switch to non-deprecated env var for setting the sysroot folderRalf Jung-1/+1
2022-09-24Rollup merge of #102176 - ojeda:add-llvm-dis-to-ci-llvm, r=Mark-SimulacrumMatthias Krüger-1/+2
Add `llvm-dis` to the set of tools in `ci-llvm` The LLVM disassembler is needed for the test introduced in https://github.com/rust-lang/rust/pull/97550. Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2022-09-24Rollup merge of #102175 - oli-obk:miri_subtree_cleanup, r=jyn514Matthias Krüger-22/+22
Also require other subtrees to always build successfully r? ``@jyn514``
2022-09-23bootstrap: the backtrace feature is stable, no need to allow it any moreRalf Jung-3/+2
2022-09-23Add `llvm-dis` to the set of tools in `ci-llvm`Miguel Ojeda-1/+2
The LLVM disassembler is needed for the test introduced in https://github.com/rust-lang/rust/pull/97550. Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2022-09-23Also require other subtrees to always build successfullyOli Scherer-22/+22
2022-09-23Rollup merge of #102042 - LukeMathWalker:add-rust-json-docs-to-rustup, ↵Matthias Krüger-10/+4
r=Mark-Simulacrum Distribute rust-docs-json via rustup. I am not 100% sure on how to treat `rust-json-docs` in `target_host_combination`. I went along with a similar strategy to the one used for `rust-docs`, but looking for guidance there.
2022-09-22Distribute rust-json-docs via rustup.Luca Palmieri-10/+4
2022-09-22Auto merge of #102028 - oli-obk:miri_subtree, r=oli-obkbors-173/+126
Make miri a subtree instead of a submodule r? `@RalfJung` fixes #101867 fixes https://github.com/rust-lang/rust/issues/100134
2022-09-22Allow miri docs to keep failing for nowOli Scherer-1/+1
2022-09-21miri is not in toolstate any moreRalf Jung-1/+0
2022-09-21HACK: Treat miri as if it were a submoduleOli Scherer-1/+3
2022-09-21Remove miri from the submodule list and require it for CI to passOli Scherer-174/+126
2022-09-21Rollup merge of #89891 - ojeda:modular-alloc, r=Mark-SimulacrumDylan DPC-0/+2
`alloc`: add unstable cfg features `no_rc` and `no_sync` In Rust for Linux we are using these to make `alloc` a bit more modular. See https://github.com/rust-lang/rust/pull/86048 and https://github.com/rust-lang/rust/pull/84266 for similar requests. Of course, the particular names are not important.
2022-09-20Update src/bootstrap/config.rsTuna-0/+1
Co-authored-by: Joshua Nelson <github@jyn.dev>
2022-09-20Update src/bootstrap/config.rsTuna-1/+8
Co-authored-by: Bruno Kolenbrander <59372212+mejrs@users.noreply.github.com>
2022-09-19Auto merge of #101799 - LukeMathWalker:distribute-json-doc, r=jyn514bors-62/+219
Distribute json doc # Overview We add a new component, `rust-json-docs`, to distribute the JSON version of rustdoc's output for public compiler crates (i.e. `std`, `alloc`, `proc_macro`, `core` and `test`). As discussed in #101383, we do not bundle this up as part of the existing `rust-docs` component since `rustdoc`'s JSON format is still unstable. # Open questions / Doubts I tried my best, but I never touched this codebase and I couldn't find much documentation on how `dist` works - I pattern-matched existing code, which might have led to some non-sensical choices in the eyes of people more familiar with the codebase. In particular, I am not sure if my choice of adding a new config flag is appropriate or if the decision to build/not build the JSON docs is more appropriately gated by one of the existing flags. Any suggestion is more than welcome. Closes #101383
2022-09-18Rollup merge of #101923 - jsha:aux-pages-no-rustdoc-css, r=Mark-SimulacrumMatthias Krüger-8/+2
Don't add rustdoc's CSS to other doc pages This was originally added so those doc pages could use the same font files, but it turns out to be fragile. And those doc pages are just stubs that link to other pages, so they don't need fancy fonts. Before: ![Screenshot from 2022-09-16 16-45-44](https://user-images.githubusercontent.com/220205/190831650-b626ee66-046a-4b71-8e57-dd06872359db.png) After: ![Screenshot from 2022-09-16 16-52-06](https://user-images.githubusercontent.com/220205/190831657-f7d10a3f-d8c0-48a3-b30d-666db5a50563.png) Demo of all affected pages: https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/complement-design-faq.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/complement-lang-faq.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/complement-project-faq.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/grammar.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/guide-crates.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/guide-error-handling.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/guide-ffi.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/guide-macros.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/guide.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/guide-ownership.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/guide-plugins.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/guide-pointers.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/guide-strings.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/guide-tasks.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/guide-testing.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/guide-unsafe.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/index.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/intro.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/not_found.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/reference.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/rustdoc.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/rust.html https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/tutorial.html Prior art: https://github.com/rust-lang/rust/pull/86663
2022-09-17Auto merge of #101949 - matthiaskrgr:rollup-xu5cqnd, r=matthiaskrgrbors-38/+5
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-17Rollup merge of #101942 - Mark-Simulacrum:fix-perf, r=jyn514Matthias Krüger-37/+0
Revert "Copy stage0 binaries into stage0-sysroot" This reverts PR #101711. The PR broke the rustc/bootstrap benchmark on rustc-perf, I believe due to the assumption that the stage0 directory exists. Fixing that by just skipping this logic might be reasonable, but I think there's a larger discussion to be had around the right behavior when we don't have a single bin/ directory (when rustc= and cargo= are specified in config.toml). I think it's potentially reasonable to put those binaries (cargo, rustc, rustfmt?) into the bin directory, but for now just want to get us back to a healthy state. r? `@jyn514` (but would appreciate review from others as this is just a direct revert).
2022-09-17Rollup merge of #101835 - jyn514:fix-vendoring, r=Mark-SimulacrumMatthias Krüger-1/+5
Allow using vendoring when running bootstrap from outside the source root Fixes https://github.com/rust-lang/rust/issues/100364.
2022-09-17Add a new component, `rust-json-docs`, to distribute the JSON-formatted ↵Luca Palmieri-62/+219
documentation for std crates in nightly toolchains. We also add a new flag to `x doc`, `--json`, to render the JSON-formatted version alongside the HTML-formatted one.
2022-09-17Rollup merge of #101873 - WaffleLapkin:x-build-proc-macro-srv, r=jyn514Matthias Krüger-10/+22
Allow building `rust-analyzer-proc-macro-srv` as a standalone tool This PR allows building `rust-analyzer-proc-macro-srv` as a standalone tool via `x b proc-macro-srv-cli` (I thought that `x b rust-analyzer-proc-macro-srv` should work, but it doesn't for some reason...). Also this PR adds a copy of `rust-analyzer-proc-macro-srv` binary to `build/{triple}/{stage}/libexec/` when building `rust-analyzer-proc-macro-srv`, so that r-a can pick it up. This is useful to make r-a (and I assume Intellij IDEA) to expand macros when using a custom, build from source toolchain. r? ``@jyn514`` [_zulip thread_](https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer/topic/How.20to.20fix.20.60UnsupportedABI.60.20for.20custom.20toolchains.3F/near/299040175)
2022-09-17Rollup merge of #101783 - chriswailes:env-vars, r=jyn514Matthias Krüger-10/+18
Improve handing of env vars during bootstrap process 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-17Rollup merge of #101781 - chriswailes:dynamic-llvm-on-musl, r=jyn514Matthias Krüger-11/+2
Extend list of targets that support dyanmic linking for llvm tools This commit adds `linux-musl` to the list of targets that support dynamic linking for the LLVM tools.
2022-09-17Revert "fix #101691: copy stage0 binaries into stage0-sysroot"Mark Rousskov-37/+0
This reverts commit 32f8eb2fee4d6781a79052b560abd10e12ebb34f.
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-16Don't add rustdoc's CSS to other doc pagesJacob Hoffman-Andrews-8/+2
This was originally added so those doc pages could use the same font files, but it turns out to be fragile. And those doc pages are just stubs that link to other pages, so they don't need fancy fonts.
2022-09-16Improve handing of env vars during bootstrap processChris Wailes-10/+18
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-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-16Remove the allow-list for dynamic linking of LLVM toolsChris Wailes-11/+2
This commit removes an allow-list for the dynamic linking of the LLVM tools and instead relies on the builder's linking preference only.
2022-09-16Use `builder.sysroot(...)` instead of a hackMaybe Waffle-6/+2
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-16Allow building `rust-analyzer-proc-macro-srv` as a standalone toolMaybe Waffle-10/+26
2022-09-14Allow using vendoring when running bootstrap from outside the current ↵Joshua Nelson-1/+5
working directory
2022-09-14Give a better error messages when the rustc shim is missingJoshua Nelson-1/+4
2022-09-14Fix pre-existing bug in exe checkJoshua Nelson-1/+1