about summary refs log tree commit diff
path: root/src/bootstrap/check.rs
AgeCommit message (Collapse)AuthorLines
2020-05-02Also build clippy with `./x.py check`Oliver Scherer-68/+74
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-01-09Add bootstrap step for building sanitizer runtimesTomasz Miąsko-1/+1
2019-12-22Format the worldMark Rousskov-44/+45
2019-12-11rustc: Link LLVM directly into rustc againAlex Crichton-63/+3
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-10-15Package non-rust objectsJethro Beekman-0/+4
2019-09-23Allow adding `RUSTFLAGS` after `Builder::cargo`Alex Crichton-12/+12
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-08-28Fix build src/libtestYuki Okushi-1/+1
2019-08-23bootstrap: Merge the libtest build step with libstdAlex Crichton-53/+2
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-13Utilize -Zbinary-dep-depinfo for dependency trackingMark Rousskov-1/+0
2019-07-15ci: Remove Travis/AppVeyor configurationAlex Crichton-5/+0
Now that we've fully moved to Azure Pipelines and bors has been updated to only gate on Azure this commit removes the remaining Travis/AppVeyor support contained in this repository. Most of the deletions here are related to producing better output on Travis by folding certain sections. This isn't supported by Azure so there's no need to keep it around, and if Azure ever adds support we can always add it back!
2019-05-25Add clippy and fix commands to x.pyljedrz-7/+30
2019-03-05Bootstrap changesJohn Kåre Alsaker-4/+8
2019-02-25bootstrap: deny(rust_2018_idioms)Taiki Endo-20/+36
2019-02-10rustc: doc commentsAlexander Regueiro-1/+1
2019-01-02bootstrap: Link LLVM as a dylib with ThinLTOAlex Crichton-5/+0
When building a distributed compiler on Linux where we use ThinLTO to create the LLVM shared object this commit switches the compiler to dynamically linking that LLVM artifact instead of statically linking to LLVM. The primary goal here is to reduce CI compile times, avoiding two+ ThinLTO builds of all of LLVM. By linking dynamically to LLVM we'll reuse the one ThinLTO step done by LLVM's build itself. Lots of discussion about this change can be found [here] and down. A perf run will show whether this is worth it or not! [here]: https://github.com/rust-lang/rust/pull/53245#issuecomment-417015334
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-25Revert "Rollup merge of #56944 - alexcrichton:less-thin2, r=michaelwoerister"kennytm-0/+5
This reverts commit f1051b574c26e20608ff26415a3dddd13f140925, reversing changes made to 833e0b3b8a9f1487a61152ca76f7f74a6b32cc0c.
2018-12-17bootstrap: Link LLVM as a dylib with ThinLTOAlex Crichton-5/+0
When building a distributed compiler on Linux where we use ThinLTO to create the LLVM shared object this commit switches the compiler to dynamically linking that LLVM artifact instead of statically linking to LLVM. The primary goal here is to reduce CI compile times, avoiding two+ ThinLTO builds of all of LLVM. By linking dynamically to LLVM we'll reuse the one ThinLTO step done by LLVM's build itself. Lots of discussion about this change can be found [here] and down. A perf run will show whether this is worth it or not! [here]: https://github.com/rust-lang/rust/pull/53245#issuecomment-417015334
2018-12-10bootstrap: fix editionljedrz-5/+6
2018-10-20Update Cargo, build curl/OpenSSL statically via featuresAlex Crichton-1/+2
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-09-12Add check build dependenciesMark Rousskov-6/+6
2018-09-12Do not print checking messages in dry run modeMark Rousskov-3/+3
2018-09-12remove struct CleanToolsCollins Abitekaniza-7/+2
2018-09-12clear_if_dirty in Builder::cargo with passed modeCollins Abitekaniza-10/+0
2018-08-20bootstrap: Allow for building LLVM with ThinLTO.Michael Woerister-0/+5
2018-08-06Building librustc_codegen_llvm in a separate directoryMark Rousskov-2/+4
This allows clearing it out and building it separately from the compiler. Since it's essentially a different and separate crate this makes sense to do, each cargo invocation should generally happen in its own directory.
2018-07-29Clear out rustdoc check builds if dependencies changeMark Rousskov-0/+5
2018-07-26Refactor is_external_tool into source_typeTatsuyuki Ishi-2/+2
2018-07-25Deny bare_trait_objects globallyTatsuyuki Ishi-1/+2
2018-07-03Compile stage0 tools with the raw bootstrap compilerAlex Crichton-1/+2
This commit updates the stage0 build of tools to use the libraries of the stage0 compiler instead of the compiled libraries by the stage0 compiler. This should enable us to avoid any stage0 hacks (like missing SIMD).
2018-06-03impl is_tool on Mode enumCollins Abitekaniza-1/+1
make is_tool inherent prop of mode fix errors from rebase resolve issues from review
2018-06-03thread tool modes throughCollins Abitekaniza-0/+1
2018-06-03refactor, make requested changesCollins Abitekaniza-1/+1
2018-06-03refactor Mode enumCollins Abitekaniza-13/+13
2018-05-17Rename trans to codegen everywhere.Irina Popa-5/+5
2018-04-19Ensure CleanTools is run for check rustdocvarkor-1/+7
2018-04-19Add rustdoc to x.py checkvarkor-1/+52
This can often encounter errors after modifying rustc, so it's useful to include it in the steps that are checked.
2018-04-18Replace Build with Buildervarkor-10/+9
2018-04-18Do not rebuild LLVM for x.py checkvarkor-3/+2
2018-04-18Abstract LLVM building from bootstrapvarkor-46/+4
This deduplicates the LLVM building functionality from compile.rs and check.rs.
2018-04-18Correct the timestamp for CodegenBackend checkvarkor-4/+11
2018-04-18Add rustc_trans to x.py checkvarkor-2/+95
2018-04-17Remove uses of Build across Builder stepsMark Simulacrum-33/+30
2018-04-03Refactor to use a dry-run config instead of cfg(test)Mark Simulacrum-3/+3
This ensures that each build will support the testing design of "dry running" builds. It's also checked that a dry run build is equivalent step-wise to a "wet" run build; the graphs we generate when running are directly compared node/node and edge/edge, both for order and contents.
2018-03-17rustbuild: Tweak where timing information goesAlex Crichton-8/+12
This commit tweaks where timing and step information is printed out as part of the build, ensuring that we do it as close to the location where work happens as possible. In rustbuild various functions may perform long blocking work as dependencies are assembled, so if we print out timing information early on we may accidentally time more than just the step we were intending to time!
2018-03-09rustbuild: Fix MSBuild location of `llvm-config.exe`Alex Crichton-1/+1
For LLD integration the path to `llvm-config` needed to change to inside the build directory itself (for whatever reason) but the build directory is different on MSBuild than it is on `ninja` for MSVC builds, so the path to `llvm-config.exe` was actually wrong and not working! This commit removes the `Build::llvm_config` function in favor of the source of truth, the `Llvm` build step itself. The build step was then updated to find the right build directory for MSBuild as well as `ninja` for where `llvm-config.exe` is located. Closes #48749
2018-02-11Change Step to be invoked with a path when in default mode.Mark Simulacrum-3/+3
Previously, a Step would be able to tell on its own when it was invoked "by-default" (that is, `./x.py test` was called instead of `./x.py test some/path`). This commit replaces that functionality, invoking each Step with each of the paths it has specified as "should be invoked by." For example, if a step calls `path("src/tools/cargo")` and `path("src/doc/cargo")` then it's make_run will be called twice, with "src/tools/cargo" and "src/doc/cargo." This makes it so that default handling logic is in builder, instead of spread across various Steps. However, this meant that some Step specifications needed to be updated, since for example `rustdoc` can be built by `./x.py build src/librustdoc` or `./x.py build src/tools/rustdoc`. A `PathSet` abstraction is added that handles this: now, each Step can not only list `path(...)` but also `paths(&[a, b, ...])` which will make it so that we don't invoke it with each of the individual paths, instead invoking it with the first path in the list (though this shouldn't be depended on). Future work likely consists of implementing a better/easier way for a given Step to work with "any" crate in-tree, especially those that want to run tests, build, or check crates in the std, test, or rustc crate trees. Currently this is rather painful to do as most of the logic is duplicated across should_run and make_run. It seems likely this can be abstracted away into builder somehow.
2018-02-08Add tests for themesGuillaume Gomez-1/+0
2018-01-27rustc: Load the `rustc_trans` crate at runtimeAlex Crichton-1/+1
Building on the work of # 45684 this commit updates the compiler to unconditionally load the `rustc_trans` crate at runtime instead of linking to it at compile time. The end goal of this work is to implement # 46819 where rustc will have multiple backends available to it to load. This commit starts off by removing the `extern crate rustc_trans` from the driver. This involved moving some miscellaneous functionality into the `TransCrate` trait and also required an implementation of how to locate and load the trans backend. This ended up being a little tricky because the sysroot isn't always the right location (for example `--sysroot` arguments) so some extra code was added as well to probe a directory relative to the current dll (the rustc_driver dll). Rustbuild has been updated accordingly as well to have a separate compilation invocation for the `rustc_trans` crate and assembly it accordingly into the sysroot. Finally, the distribution logic for the `rustc` package was also updated to slurp up the trans backends folder. A number of assorted fallout changes were included here as well to ensure tests pass and such, and they should all be commented inline.