about summary refs log tree commit diff
path: root/src/bootstrap/bin/rustdoc.rs
AgeCommit message (Collapse)AuthorLines
2023-10-17reorganize bootstrap bins and helper module utilizationsonur-ozkan-86/+0
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-09-16create helper module to be embedded for the bootstrap binariesonur-ozkan-13/+6
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-07-30bootstrap: inline format!() argsMatthias Krüger-4/+4
2023-05-07Give a more helpful error when running the rustc shim directlyjyn-2/+7
cc https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/Building.20.60coretests.60.20by.20hand
2022-10-26check lld version to choose correct flag for testsDaniil Belov-6/+2
2022-09-16Pass --cfg=bootstrap for rustdoc for proc_macro cratesest31-0/+11
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-06-30Revert #95993 fixInfRandomness-3/+1
This reverts the temporary fix implemented by https://github.com/rust-lang/rust/pull/95993 since a permanent fix has been implemented by https://github.com/rust-lang/cargo/pull/10594
2022-04-24Remove dead code in rustdoc shimJoshua Nelson-9/+2
The `RUSTDOC_RESOURCE_SUFFIX` variable was never actually set.
2022-04-12Fix `x test --doc --stage 0 library/std`Joshua Nelson-1/+3
I managed to break this in https://github.com/rust-lang/rust/pull/95449. I am not quite sure why this is the correct fix, but it doesn't break `doc --stage 0` and is strictly closer to the previous behavior. Previously, rustdoc would error with strange issues because of the mismatched sysroot: ``` error[E0460]: found possibly newer version of crate `std` which `rustc_span` depends on --> /home/jnelson/rust-lang/rust/compiler/rustc_lint_defs/src/lib.rs:14:5 | 14 | use rustc_span::{sym, symbol::Ident, Span, Symbol}; | ^^^^^^^^^^ | = note: perhaps that crate needs to be recompiled? = note: the following crate versions were found: crate `std`: /home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-ff9290e971253a38.rlib crate `std`: /home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-ff9290e971253a38.so crate `rustc_span`: /home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_span-ed11dce30c1766f9.rlib ```
2022-03-29Fix `x doc --stage 0 compiler`Joshua Nelson-4/+16
Eric figured out the fix to this almost 2 years ago, I just didn't read his comment carefully enough at the timme. The issue was that fake rustc and fake rustdoc were inconsistent about when they passed `--sysroot` to the real compiler. Change them to consistently only pass it when `--target` is present.
2022-01-01Make the rustc and rustdoc wrapper not depend on libbootstrapbjorn3-3/+5
This slightly improves compilation time by reducing linking time (saving about a 1/10 of the the total compilation time after changing rustbuild) and slightly reduces disk usage (from 16MB for the rustc wrapper to 4MB).
2021-06-07build doctests with lld if use-lld = trueThe8472-1/+6
2020-09-29Remove unused --cfg stageNJoshua Nelson-3/+0
2020-09-29Remove --cfg dox from rustdoc.rsJoshua Nelson-4/+0
This was added in https://github.com/rust-lang/rust/pull/53076 because several dependencies were using `cfg(dox)` instead of `cfg(rustdoc)`. I ran `rg 'cfg\(dox\)'` on the source tree with no matches, so I think this is now safe to remove.
2020-09-07rustbuild: Propagate LLD to more places when `use-lld` is enabledVadim Petrochenkov-1/+4
2020-08-14Fix crate-version with rustdoc in bootstrap.Eric Huss-6/+0
2020-07-02Remove render-redirect-pages option in rustdocGuillaume Gomez-14/+1
2020-02-26Stabilize --crate-version option in rustdocGuillaume Gomez-5/+0
2020-02-03bootstrap: fix clippy warningsMatthias Krüger-1/+1
2019-12-22Format the worldMark Rousskov-10/+6
2019-11-06rename cfg(rustdoc) into cfg(doc)Guillaume Gomez-1/+1
2019-09-01remove the unstable rustdoc parameter --linkerAndreas Jonson-1/+4
use the code generation parameter -Clinker (same parameter as rustc) to control what linker to use for building the rustdoc test executables. closes: #63816
2019-08-27rustbuild: allow disabling deny(warnings) for bootstrapMarc-Antoine Perennou-3/+0
When deny-warnings is not specified or set to true, the behaviour is the same as before. When deny-warnings is set to false, warnings are now allowed Fixes #63911 Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2019-07-28Deny `unused_lifetimes` through rustbuildVadim Petrochenkov-1/+1
2019-07-28Remove lint annotations in specific crates that are already enforced by ↵Vadim Petrochenkov-1/+2
rustbuild Remove some random unnecessary lint `allow`s
2019-03-26Handle RUSTDOC_RESOURCE_SUFFIX env variable for rustdoc buildGuillaume Gomez-0/+11
2019-03-15Output diagnostic information for rustdoc.O01eg-2/+8
Use the information same as rustc.
2019-02-25Remove some unnecessary 'extern crate'Taiki Endo-2/+0
2019-01-31Add missing generation for test and proc_macro, remove old macro redirectionGuillaume Gomez-3/+17
2018-12-25Remove licensesMark Rousskov-10/+0
2018-08-31use cfg(rustdoc) instead of cfg(dox) in std and friendsQuietMisdreavus-0/+2
2018-07-16Revert some changes from #51917 to fix #52317.O01eg-1/+2
2018-02-16Remove hoedown from rustdocGuillaume Gomez-5/+2
Is it really time? Have our months, no, *years* of suffering come to an end? Are we finally able to cast off the pall of Hoedown? The weight which has dragged us down for so long? ----- So, timeline for those who need to catch up: * Way back in December 2016, [we decided we wanted to switch out the markdown renderer](https://github.com/rust-lang/rust/issues/38400). However, this was put on hold because the build system at the time made it difficult to pull in dependencies from crates.io. * A few months later, in March 2017, [the first PR was done, to switch out the renderers entirely](https://github.com/rust-lang/rust/pull/40338). The PR itself was fraught with CI and build system issues, but eventually landed. * However, not all was well in the Rustdoc world. During the PR and shortly after, we noticed [some differences in the way the two parsers handled some things](https://github.com/rust-lang/rust/issues/40912), and some of these differences were major enough to break the docs for some crates. * A couple weeks afterward, [Hoedown was put back in](https://github.com/rust-lang/rust/pull/41290), at this point just to catch tests that Pulldown was "spuriously" running. This would at least provide some warning about spurious tests, rather than just breaking spontaneously. * However, the problems had created enough noise by this point that just a few days after that, [Hoedown was switched back to the default](https://github.com/rust-lang/rust/pull/41431) while we came up with a solution for properly warning about the differences. * That solution came a few weeks later, [as a series of warnings when the HTML emitted by the two parsers was semantically different](https://github.com/rust-lang/rust/pull/41991). But that came at a cost, as now rustdoc needed proc-macro support (the new crate needed some custom derives farther down its dependency tree), and the build system was not equipped to handle it at the time. It was worked on for three months as the issue stumped more and more people. * In that time, [bootstrap was completely reworked](https://github.com/rust-lang/rust/pull/43059) to change how it ordered compilation, and [the method by which it built rustdoc would change](https://github.com/rust-lang/rust/pull/43482), as well. This allowed it to only be built after stage1, when proc-macros would be available, allowing the "rendering differences" PR to finally land. * The warnings were not perfect, and revealed a few [spurious](https://github.com/rust-lang/rust/pull/44368) [differences](https://github.com/rust-lang/rust/pull/45421) between how we handled the renderers. * Once these were handled, [we flipped the switch to turn on the "rendering difference" warnings all the time](https://github.com/rust-lang/rust/pull/45324), in October 2017. This began the "warning cycle" for this change, and landed in stable in 1.23, on 2018-01-04. * Once those warnings hit stable, and after a couple weeks of seeing whether we would get any more reports than what we got from sitting on nightly/beta, [we switched the renderers](https://github.com/rust-lang/rust/pull/47398), making Pulldown the default but still offering the option to use Hoedown. And that brings us to the present. We haven't received more new issues from this in the meantime, and the "switch by default" is now on beta. Our reasoning is that, at this point, anyone who would have been affected by this has run into it already.
2018-01-12Add library path for real rustdoc with `RUSTDOC_LIBDIR` environment variable.O01eg-1/+1
2018-01-12Accept verbosity in rustdoc.O01eg-0/+11
2017-12-27bootstrap: pass --deny-render-differences to rustdocQuietMisdreavus-0/+4
2017-10-15Don't use target's linker when linking build scriptsVadim Petrochenkov-1/+1
2017-10-15rustbuild: Support specifying archiver and linker explicitlyVadim Petrochenkov-0/+3
2017-10-10render the rust version into std/compiler/test docsQuietMisdreavus-0/+8
2017-06-21rustbuild: Fix compiler docs yet againOliver Middleton-5/+5
Add support for `-Z force-unstable-if-unmarked` to rustdoc.
2017-03-27rustbuild: Fix compiler docs againOliver Middleton-0/+8
The docs need to be built with the rustbuild feature so the correct stability attributes (rustc_private) get applied.
2016-12-24Teach `rustdoc --test` about `--sysroot`, pass it when testing rustAidan Hobson Sayers-0/+3
This permits rustdoc tests to work in stage0
2016-12-20rustbuild: Deny and fix warningsAlex Crichton-0/+2
Turned out this lint uncovered an actual bug! Closes #38484
2016-10-16run rustfmt on bootstrap/bin folderSrinivas Reddy Thatiparthy-4/+6
2016-09-25Report which required build-time environment variable is not setJake Goulding-4/+4
2016-07-05rustbuild: Remove the `build` directoryAlex Crichton-0/+40
The organization in rustbuild was a little odd at the moment where the `lib.rs` was quite small but the binary `main.rs` was much larger. Unfortunately as well there was a `build/` directory with the implementation of the build system, but this directory was ignored by GitHub on the file-search prompt which was a little annoying. This commit reorganizes rustbuild slightly where all the library files (the build system) is located directly inside of `src/bootstrap` and all the binaries now live in `src/bootstrap/bin` (they're small). Hopefully this should allow GitHub to index and allow navigating all the files while maintaining a relatively similar layout to the other libraries in `src/`.