about summary refs log tree commit diff
path: root/src/bootstrap/doc.rs
AgeCommit message (Collapse)AuthorLines
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
2018-12-10bootstrap: fix editionljedrz-7/+7
2018-12-07use top level `fs` functions where appropriateAndy Russell-8/+6
This commit replaces many usages of `File::open` and reading or writing with `fs::read_to_string`, `fs::read` and `fs::write`. This reduces code complexity, and will improve performance for most reads, since the functions allocate the buffer to be the size of the file. I believe that this commit will not impact behavior in any way, so some matches will check the error kind in case the file was not valid UTF-8. Some of these cases may not actually care about the error.
2018-12-06Rollup merge of #56441 - ollie27:rustbuild_compiler_docs, r=alexcrichtonPietro Albini-6/+11
rustbuild: Fix issues with compiler docs * Create output directories for crates beforehand so rustdoc uses relative links (fixes #56107) * Readd rustc_codegen_ssa (fixes #56196) * Don't build out of tree dependencies for rustdoc like we don't for rustc
2018-12-03Rollup merge of #56419 - mark-i-m:remove-try, r=Centrilkennytm-3/+3
Remove some uses of try!
2018-12-02rustbuild: Fix issues with compiler docsOliver Middleton-6/+11
* Create output directories for crates beforehand so rustdoc uses relative links * Readd rustc_codegen_ssa * Don't build out of tree dependencies for rustdoc like we don't for rustc
2018-12-01remove some uses of try!Mark Mansi-3/+3
2018-11-30Add the edition guide to doc.rust-lang.orgSteve Klabnik-0/+1
2018-11-20fix rustbuild to build all the booksSteve Klabnik-11/+15
2018-11-02Auto merge of #54543 - GuillaumeGomez:top-level-index, r=QuietMisdreavusbors-13/+22
Add index page argument @Mark-Simulacrum: I might need some help from you: in bootstrap, I want to add an argument (a new flag added into `rustdoc`) in order to generate the current index directly when `rustdoc` is documenting the `std` lib. However, my change in `bootstrap` didn't do it and I assume it must be moved inside the `Std` struct. But there, I don't see how to pass it to `rustdoc` through `cargo`. Did I miss anything? r? @QuietMisdreavus
2018-10-20Update Cargo, build curl/OpenSSL statically via featuresAlex Crichton-0/+1
In addition to to updating Cargo's submodule and Cargo's dependencies, this also updates Cargo's build to build OpenSSL statically into Cargo as well as libcurl unconditionally. This removes OpenSSL build logic from the bootstrap code, and otherwise requests that even on OSX we build curl statically.
2018-10-21Use markdown::render instead of using pulldown_cmark directlyGuillaume Gomez-3/+6
2018-10-21new version for bootstrapGuillaume Gomez-12/+17