about summary refs log tree commit diff
path: root/src/bootstrap/doc.rs
AgeCommit message (Collapse)AuthorLines
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.
2020-01-09Add bootstrap step for building sanitizer runtimesTomasz Miąsko-1/+1
2020-01-08remove strip-hidden pass from compiler doc generationAndy Russell-1/+1
2019-12-22Format the worldMark Rousskov-93/+70
2019-12-11Fix some linking of LLVM's dynamic libraryAlex Crichton-1/+1
Ensure it shows up in the same places it did before so tools can find it at runtime.
2019-12-11rustc: Link LLVM directly into rustc againAlex Crichton-1/+1
This commit builds on #65501 continue to simplify the build system and compiler now that we no longer have multiple LLVM backends to ship by default. Here this switches the compiler back to what it once was long long ago, which is linking LLVM directly to the compiler rather than dynamically loading it at runtime. The `codegen-backends` directory of the sysroot no longer exists and all relevant support in the build system is removed. Note that `rustc` still supports a dynamically loaded codegen backend as it did previously, it just no longer supports dynamically loaded codegen backends in its own sysroot. Additionally as part of this the `librustc_codegen_llvm` crate now once again explicitly depends on all of its crates instead of implicitly loading them through the sysroot. This involved filling out its `Cargo.toml` and deleting all the now-unnecessary `extern crate` annotations in the header of the crate. (this in turn required adding a number of imports for names of macros too). The end results of this change are: * Rustbuild's build process for the compiler as all the "oh don't forget the codegen backend" checks can be easily removed. * Building `rustc_codegen_llvm` is much simpler since it's simply another compiler crate. * Managing the dependencies of `rustc_codegen_llvm` is much simpler since it's "just another `Cargo.toml` to edit" * The build process should be a smidge faster because there's more parallelism in the main rustc build step rather than splitting `librustc_codegen_llvm` out to its own step. * The compiler is expected to be slightly faster by default because the codegen backend does not need to be dynamically loaded. * Disabling LLVM as part of rustbuild is still supported, supporting multiple codegen backends is still supported, and dynamic loading of a codegen backend is still supported.
2019-09-23Allow adding `RUSTFLAGS` after `Builder::cargo`Alex Crichton-3/+3
This commit changes the return type of `Builder::cargo` to return a builder that allows dynamically adding more `RUSTFLAGS` values after-the-fact. While not used yet, this will later be used to delete more of `rustc.rs`
2019-09-19rustbuild: Copy crate doc files fewer timesAlex Crichton-1/+1
Previously when building documentation for the standard library we'd copy all the files 5 times, and these files include libcore/libstd docs which are huge! This commit instead only copies the files after rustdoc has been run for each crate, reducing the number of redundant copies we're making.
2019-09-03Auto merge of #63869 - GuillaumeGomez:fix-build-failure, r=Mark-Simulacrumbors-1/+1
Fix build failure in case file doesn't exist It fixes the following issue: ```bash $ ./x.py test src/tools/linkchecker ./build/x86_64-apple-darwin/doc/ --stage 1 Updating only changed submodules Submodules updated in 0.05 seconds Finished dev [unoptimized] target(s) in 0.15s thread 'main' panicked at 'source "/Users/imperio/rust/rust/build/x86_64-apple-darwin/doc/version_info.html" failed to get metadata: No such file or directory (os error 2)', src/build_helper/lib.rs:179:19 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace. failed to run: /Users/imperio/rust/rust/build/bootstrap/debug/bootstrap test src/tools/linkchecker ./build/x86_64-apple-darwin/doc/ --stage 1 Build completed unsuccessfully in 0:00:01 ``` If the file doesn't exist, it makes sense anyway to just run the command in order to generate it. r? @Mark-Simulacrum
2019-09-02Generate version file if it doesn't existGuillaume Gomez-1/+1
2019-08-28Fix build src/libtestYuki Okushi-1/+1
2019-08-23bootstrap: Merge the libtest build step with libstdAlex Crichton-127/+1
Since its inception rustbuild has always worked in three stages: one for libstd, one for libtest, and one for rustc. These three stages were architected around crates.io dependencies, where rustc wants to depend on crates.io crates but said crates don't explicitly depend on libstd, requiring a sysroot assembly step in the middle. This same logic was applied for libtest where libtest wants to depend on crates.io crates (`getopts`) but `getopts` didn't say that it depended on std, so it needed `std` built ahead of time. Lots of time has passed since the inception of rustbuild, however, and we've since gotten to the point where even `std` itself is depending on crates.io crates (albeit with some wonky configuration). This commit applies the same logic to the two dependencies that the `test` crate pulls in from crates.io, `getopts` and `unicode-width`. Over the many years since rustbuild's inception `unicode-width` was the only dependency picked up by the `test` crate, so the extra configuration necessary to get crates building in this crate graph is unlikely to be too much of a burden on developers. After this patch it means that there are now only two build phasese of rustbuild, one for libstd and one for rustc. The libtest/libproc_macro build phase is all lumped into one now with `std`. This was originally motivated by rust-lang/cargo#7216 where Cargo was having to deal with synthesizing dependency edges but this commit makes them explicit in this repository.
2019-08-20Remove serialization of diagnostics to filesMark Rousskov-2/+1
This is no longer used by the index generator and was always an unstable compiler detail, so strip it out. This also leaves in RUSTC_ERROR_METADATA_DST since the stage0 compiler still needs it to be set.
2019-07-17Update mdbook, cargo, booksEric Huss-29/+9
This updates the last of the books using mdbook 0.1, finally removing it from the build.
2019-06-20Update mdbookEric Huss-12/+12
2019-06-13Remove unnecessary Std dependencyMark Rousskov-5/+0
2019-06-13Delete Rustbook stepMark Rousskov-34/+12
There's no need to have it given it merely forwarded to RustbookSrc.
2019-06-11Migrate rust-by-example to MdBook2Mateusz Mikuła-1/+1
2019-05-30Migrate nomicon book to MdBook2Mateusz Mikuła-1/+1
2019-05-30Migrate rustdoc book to MdBook2Mateusz Mikuła-1/+1
2019-05-30Migrate unstable-book to MdBook2Mateusz Mikuła-1/+1
2019-05-30Auto merge of #61212 - alexcrichton:skip-rustc, r=pietroalbinibors-30/+5
ci: Attempt to skip a full rustc compile on dist* Currently when we're preparing cross-compiled compilers it can take quite some time because we have to build the compiler itself three different times. The first is the normal bootstrap, the second is a second build for the build platform, and the third is the actual target architecture compiler. The second compiler was historically built exclusively for procedural macros, and long ago we didn't actually need it. This commit tries out avoiding that second compiled compiler, meaning we only compile rustc for the build platform only once. Some local testing shows that this is promising, but bors is of course the ultimate test!
2019-05-28rustbuild: Tweak how stage1 compilers are selectedAlex Crichton-30/+5
This commit furthers the previous one to ensure that we don't build an extra stage of the compiler in CI. A test has been added to rustbuild to ensure that this doesn't regress, and then in debugging this test it was hunted down that the `dist::Std` target was the one erroneously pulling in the wrong compiler. The `dist::Std` step was updated to instead account for the "full bootstrap" or not flag, ensuring that the correct compiler for compiling the final standard library was used. This was another use of the `force_use_stage1` function which was in theory supposed to be pretty central, so existing users were all evaluated and a new function, `Builder::compiler_for`, was introduced. All existing users of `force_use_stage1` have been updated to use `compiler_for`, where the semantics of `compiler_for` are similar to that of `compiler` except that it doesn't guarantee the presence of a sysroot for the arguments passed (as they may be modified). Perhaps one day we can unify `compiler` and `compiler_for`, but the usage of `Builder::compiler` is so ubiquitous it would take quite some time to evaluate whether each one needs the sysroot or not, so it's hoped that can be done in parallel.
2019-05-16strip synstructure consts from compiler docsAndy Russell-1/+1
2019-05-09remove unneeded `extern crate`s from build toolsAndy Russell-1/+1
2019-04-11Update TRPL to use mdbook 0.2Carol (Nichols || Goulding)-4/+4
2019-03-28Rollup merge of #58848 - GuillaumeGomez:fix-cache-issues, ↵Mazdak Farrokhzad-8/+8
r=Mark-Simulacrum,ollie27 Prevent cache issues on version updates Fixes #58827. cc @rust-lang/infra
2019-03-26Fix error index CSS file nameGuillaume Gomez-0/+1
2019-03-26Add resource suffix for libtest and proc_macro as wellGuillaume Gomez-2/+2
2019-03-26Prevent cache issues on version updatesGuillaume Gomez-8/+7
2019-03-26Rollup merge of #59197 - kornelski:redir, r=steveklabnikGuillaume Gomez-2/+2
Exclude old book redirect stubs from search engines Adds `<meta name="robots" content="noindex,follow">` to the `<head>` of old stub pages pointing to the second edition of the book. This is continuation of https://github.com/rust-lang/book/pull/1788
2019-03-14Exclude old book redirect stubs from search enginesKornel-2/+2
2019-03-03Permit getting stage 0 rustdocMark Rousskov-4/+4
This allows us to e.g. test compiletest, including doctests, in stage 0 without building a fresh compiler and rustdoc.
2019-03-03Tools built by the bootstrap compiler must be built by itMark Rousskov-1/+5
This avoids building compilers that we don't need -- most tools will work just fine with the downloaded compiler.
2019-02-27Update edition-guideEric Huss-1/+1
2019-02-25bootstrap: deny(rust_2018_idioms)Taiki Endo-42/+47
2019-02-17Rollup merge of #57929 - GuillaumeGomez:rustodc-remove-old-style-files, ↵kennytm-3/+6
r=ollie27 Rustdoc remove old style files Reopening of #56577 (which I can't seem to reopen...). I made the flag unstable so with this change, what was blocking the PR is now gone I assume.
2019-02-10rustc: doc commentsAlexander Regueiro-4/+4
2019-02-04Add embedded bookJames Munns-4/+1
2019-01-31Add missing generation for test and proc_macro, remove old macro redirectionGuillaume Gomez-5/+6
2019-01-30No consumers of MdBook2 yetJames Munns-0/+4
2019-01-30Only the compatibility items from the embedded book PRJames Munns-8/+33
PR: https://github.com/rust-lang/rust/pull/56291
2019-01-27Add generate-old-style-files option to rustdocGuillaume Gomez-1/+3
2018-12-25Remove licensesMark Rousskov-10/+0