about summary refs log tree commit diff
path: root/src/bootstrap/doc.rs
AgeCommit message (Collapse)AuthorLines
2021-05-11Enable `--show-type-layout` for the rustc API docsCamelid-0/+1
2021-04-21Rollup merge of #84393 - GuillaumeGomez:better-open-handling, r=jyn514Mara Bos-6/+10
Support `x.py doc std --open` I usually run this command: ``` ./x.py doc std --stage 1 --jobs 8 ``` Then I gave a try to `--open` and realized it wasn't working. I finally realized it was simply because it was only handling paths starting with `library`. This PR allows to handle both kinds of paths. cc ``@jyn514`` r? ``@Mark-Simulacrum``
2021-04-21Correctly handle --open argument on doc commandGuillaume Gomez-6/+10
2021-04-19Remove comment about doc hack.Eric Huss-9/+0
2021-04-06Bump bootstrap compilerEric Huss-1/+1
2021-04-05Document compiler/ with -Aprivate-intra-doc-linksJoshua Nelson-0/+2
Since compiler/ always passes --document-private-items, it's ok to link to items that are private.
2021-04-04Workaround increased cache clearing in CargoMark Rousskov-1/+10
1.52 Cargo adds rust-lang/cargo#8640 which means that cargo will try to purge the doc directory caches for us. In theory this may mean that we can jettison the clear_if_dirty for rustdoc versioning entirely, but for now just workaround the effects of this change in a less principled but more local way.
2021-03-12Add a `disable-minification` option for rustdocMichael Howell-0/+12
This way, you can debug rustdoc's JavaScript and CSS file with normal F12 Dev Tools and you'll have useful line numbers to work with.
2021-02-06output rdj docsNixon Enraght-Moony-0/+1
2021-01-31rustbuild: Don't build compiler twice for error-index-generator.Eric Huss-8/+2
2020-12-30Bump bootstrap compiler to 1.50 betaMark Rousskov-4/+1
2020-12-28Rollup merge of #80362 - jyn514:rustc-macros, r=ehussDylan DPC-6/+9
Document rustc_macros on nightly-rustc Fixes https://github.com/rust-lang/rust/issues/80345. ![image](https://user-images.githubusercontent.com/23638587/103113442-b7ba2d00-4628-11eb-8a4d-c542f2d170e1.png) ![image](https://user-images.githubusercontent.com/23638587/103113448-bc7ee100-4628-11eb-8657-2d72e88de656.png) r? ``@ehuss``
2020-12-24Document rustc_macros on nightly-rustcJoshua Nelson-6/+9
2020-12-22Include rustdoc in the compiler docs index.Eric Huss-0/+2
2020-12-12Fix building compiler docs with stage 0Joshua Nelson-1/+4
2020-12-01Rollup merge of #79525 - jyn514:feature-gate-normalize, r=GuillaumeGomezMara Bos-0/+1
Add -Z normalize-docs and enable it for compiler docs Works around https://github.com/rust-lang/rust/issues/79459 by only enabling normalization for the compiler itself (and anyone who opts-in on nightly). Eventually I want to remove this and enable normalization by default, but that's turned out to be [really hard](https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/How.20do.20I.20normalize.20projection.20types.20to.20a.20single.20type.3F/near/218125195). This uses a command line option instead of a feature gate so it's easier to pass it to all crates at once. Theoretically it's better to use a feature gate instead so that it's easier for people to use on docs.rs, but I'm also not terribly concerned with how easy it to use a temporary hack. Addresses https://github.com/rust-lang/rust/issues/77459.
2020-11-29Add -Z normalize-docs and enable it for compiler docsJoshua Nelson-0/+1
2020-11-28lint-docs: Add --validate flag to validate lint docs separately.Eric Huss-0/+5
2020-10-26Support enable/disable sanitizers/profiler per target12101111-2/+6
2020-09-22Auto merge of #76799 - Mark-Simulacrum:fix-cross-compile-dist, r=alexcrichtonbors-1/+3
Fix cross compiling dist/build invocations I am uncertain why the first commit is not affecting CI. I suspect it's because we pass --disable-docs on most of our cross-compilation builders. The second commit doesn't affect CI because CI runs x.py dist, not x.py build. Both commits are standalone; together they should resolve #76733. The first commit doesn't really fix that issue but rather just fixes cross-compiled x.py dist, resolving a bug introduced in #76549.
2020-09-18bootstrap: move the version number to a plaintext filePietro Albini-2/+2
The Rust version number is currently embedded in bootstrap's source code, which makes it hard to update it automatically or access it outside of ./x.py (as you'd have to parse the source code). This commit moves the version number to a standalone plaintext file, which makes accessing or updating it trivial.
2020-09-16Pass --target to lint docsMark Rousskov-1/+3
Otherwise, we may not have a standard library built for the native "host" target of the rustc being run.
2020-09-14Fix generating rustc docs with non-default lib directory.Eric Huss-0/+4
2020-09-13Link rustdoc lint docs to the rustdoc book.Eric Huss-3/+0
2020-09-13Auto-generate lint documentation.Eric Huss-1/+66
2020-08-30mv compiler to compiler/mark-0/+1
2020-08-22bootstrap: fix a couple of clippy lint warningsMatthias Krüger-1/+1
clippy::print_literal clippy::clone_on_copy clippy::single_char_pattern clippy::into_iter_on_ref clippy::match_like_matches_macro
2020-07-29Fix opening docs for std crates with ./x.py doc --open library/*Tomasz Miąsko-1/+1
The directories for core, alloc, std, proc_macro, and test crates now correspond directly to the crate name and stripping the "lib" prefix is no longer necessary.
2020-07-28Collect library features from library/Mark Rousskov-0/+1
2020-07-27mv std libs to library/mark-6/+4
2020-07-19Do not clobber RUSTDOCFLAGSMark Rousskov-6/+4
We were setting these in both Builder::cargo and here, which ended up only setting the first of the two.
2020-07-17Teach bootstrap about target files vs target triplesJake Goulding-15/+15
`rustc` allows passing in predefined target triples as well as JSON target specification files. This change allows bootstrap to have the first inkling about those differences. This allows building a cross-compiler for an out-of-tree architecture (even though that compiler won't work for other reasons). Even if no one ever uses this functionality, I think the newtype around the `Interned<String>` improves the readability of the code.
2020-07-14Use local links in the alloc docs.Eric Huss-24/+15
2020-07-10Avoid "whitelist"Tamir Duberstein-2/+4
Other terms are more inclusive and precise.
2020-07-07Fix occasional bootstrap panic in docs.Eric Huss-1/+1
2020-07-06Rollup merge of #70563 - GuillaumeGomez:page-hash-handling, r=ollie27,kinnisonManish Goregaokar-1/+0
[rustdoc] Page hash handling Fixes https://github.com/rust-lang/rust/issues/70476 A good example to see the change is to use this URL: https://doc.rust-lang.org/nightly/std/string/struct.String.html#from_iter.v-3 After the change, it actually goes to the target element (and change the page hash to something more clear for the users). r? @kinnison cc @ollie27
2020-07-02Remove render-redirect-pages option in rustdocGuillaume Gomez-1/+0
2020-07-01Tests for number of times rustdoc is built with x.py test and doc.Eric Huss-12/+13
2020-06-29Compile rustdoc less often.Eric Huss-8/+6
2020-06-25Support configurable deny-warnings for all in-tree crates.Eric Huss-2/+3
2020-06-14Switch bootstrap metadata to --no-deps.Eric Huss-18/+2
This should run much faster. There are also some drive-by cleanups here to try to simplify things. Also, the paths for in-tree crates are now displayed as relative in `x.py test -h -v`.
2020-05-22Report error from opener in bootstrapDavid Tolnay-4/+4
On my machine, an error looks like: Finished release [optimized] target(s) in 0.29s Opening doc /git/rust/build/x86_64-unknown-linux-gnu/doc/std/index.html command 'xdg-open (internal)' did not execute successfully; exit code: 4 command stderr: gio: file:///git/rust/build/x86_64-unknown-linux-gnu/doc/std/index.html: Error when getting information for file “/git/rust/build/x86_64-unknown-linux-gnu/doc/std/index.html”: No such file or directory Build completed successfully in 0:00:08
2020-05-21Add flag to open docs: x.py doc --openDavid Tolnay-1/+58
Tested with: # opens doc/index.html x.py doc --stage 0 --open x.py doc --stage 0 --open src/doc # opens doc/book/index.html x.py doc --stage 0 --open src/doc/book # opens doc/std/index.html x.py doc --stage 0 --open src/libstd # opens doc/proc_macro/index.html x.py doc --stage 0 --open src/libproc_macro # opens both x.py doc --stage 0 --open src/libstd src/libproc_macro
2020-04-29Add an index page for nightly rustc docs.Eric Huss-1/+5
2020-04-22Build libstd with `-Cbitcode-in-rlib=yes`.Nicholas Nethercote-1/+1
So that the rlibs will work with both LTO and non-LTO builds.
2020-03-21Add missing -Z unstable-options flagAlex Tokarev-1/+6
2020-02-03bootstrap: fix clippy warningsMatthias Krüger-1/+1
2020-01-10Auto merge of #65241 - tmiasko:no-std-san, r=alexcrichtonbors-1/+1
build-std compatible sanitizer support ### Motivation When using `-Z sanitizer=*` feature it is essential that both user code and standard library is instrumented. Otherwise the utility of sanitizer will be limited, or its use will be impractical like in the case of memory sanitizer. The recently introduced cargo feature build-std makes it possible to rebuild standard library with arbitrary rustc flags. Unfortunately, those changes alone do not make it easy to rebuild standard library with sanitizers, since runtimes are dependencies of std that have to be build in specific environment, generally not available outside rustbuild process. Additionally rebuilding them requires presence of llvm-config and compiler-rt sources. The goal of changes proposed here is to make it possible to avoid rebuilding sanitizer runtimes when rebuilding the std, thus making it possible to instrument standard library for use with sanitizer with simple, although verbose command: ``` env CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS=-Zsanitizer=thread cargo test -Zbuild-std --target x86_64-unknown-linux-gnu ``` ### Implementation * Sanitizer runtimes are no long packed into crates. Instead, libraries build from compiler-rt are used as is, after renaming them into `librusc_rt.*`. * rustc obtains runtimes from target libdir for default sysroot, so that they are not required in custom build sysroots created with build-std. * The runtimes are only linked-in into executables to address issue #64629. (in previous design it was hard to avoid linking runtimes into static libraries produced by rustc as demonstrated by sanitizer-staticlib-link test, which still passes despite changes made in #64780). cc @kennytm, @japaric, @firstyear, @choller
2020-01-11Rollup merge of #68075 - ollie27:rustbuild_books, r=Mark-SimulacrumYuki Okushi-72/+14
rustbuild: Cleanup book generation The Cargo book can be generated the same way as the other books.
2020-01-09rustbuild: Cleanup book generationOliver Middleton-72/+14
The Cargo book can be generated the same way as the other books.