about summary refs log tree commit diff
path: root/src/bootstrap/dist.rs
AgeCommit message (Collapse)AuthorLines
2021-08-02Rollup merge of #87282 - pietroalbini:refactor-extended, r=Mark-SimulacrumYuki Okushi-120/+109
Ensure `./x.py dist` adheres to `build.tools` According to `config.toml.example`, the way to produce dist artifacts for both the compiler and a *subset* of tools would be to enable the extended build and manually specify the list of tools to build: ```toml [build] extended = true tools = ["cargo", "rustfmt"] ``` This works as expected for `./x.py build` and `./x.py install`, but *not* for `./x.py dist`. Before this PR `./x.py dist` simply ignored the contents of `build.tools`, building just rustc/rustdoc if `build.extended = false` and all of the tools otherwise. This PR does two things: * Changes `./x.py dist extended` to only build the tools defined in `build.tools`, if `build.tools` is not empty. The rest of the extended step was refactored to simplify the code. * Changes how dist jobs for tools are gated: instead of `assert!(builder.config.extended)` to prevent tools from being built with `build.extended = false`, tools are simply built by default depending on `build.extended` and `build.tools`. This also enables to **explicitly** dist tools even with `build.extended = false`. This PR is best reviewed commit-by-commit. Fixes #86436
2021-07-28set all of the optional tools as DEFAULT = truePietro Albini-0/+9
The default is then overridden by `should_run`.
2021-07-23refactor extended tarball generaton to use the new ensure_if_defaultPietro Albini-30/+17
2021-07-23don't build extra tools if build.tools is explicitly an empty listPietro Albini-6/+1
2021-07-19refactor gating of mingwPietro Albini-6/+4
2021-07-19refactor gating of demanglerPietro Albini-24/+26
2021-07-19refactor gating of toolsPietro Albini-74/+75
2021-07-19change output of dist cargo and clippy to be consistent with other toolsPietro Albini-8/+8
2021-07-19refactor gating of dist docsPietro Albini-12/+9
2021-07-19refactor adding rustc and std into extended buildsPietro Albini-9/+9
2021-07-16Package LLVM libs for the target rather than the build hostAdam Gemmell-1/+9
2021-06-30copy rust-lld as ld in dist1000teslas-3/+3
2021-06-23Comment and include rust-analyzer.Eric Huss-0/+9
2021-06-22Don't dist miri on stable or beta.Eric Huss-0/+3
2021-06-10gcc-lld mvp1000teslas-0/+4
ignore test if rust-lld not found create ld -> rust-lld symlink at build time instead of run time for testing in ci copy instead of symlinking remove linux check test for linker, suggestions from bjorn3 fix overly restrictive lld matcher use -Zgcc-ld flag instead of -Clinker-flavor refactor code adding lld to gcc path revert ci changes suggestions from petrochenkov rename gcc_ld to gcc-ld in dirs
2021-04-17bootstrap: Restore missing --bulk-dirs for rust-docs, rustc-docsAnders Kaseorg-2/+2
The --bulk-dirs argument was removed for rust-docs in commit c768ce138427b1844c1f6594daba9c0e33928032 and rustc-docs in commit 8ca46fc7a83734c9622f11f25d16b82316f44bcc (#79788), presumably by mistake; that slowed down installation of rust-docs from under a second to some twenty *minutes*. Restoring --bulk-dirs reverses this slowdown. Fixes #80684. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2021-04-03Address review comments and Windows failure, and make cleanerRich Kadel-24/+28
2021-04-03Make rust-demangler installableRich Kadel-0/+86
Adds bootstrap rules to support installing rust-demangler. When compiling with `-Z instrument-coverage`, the coverage reports are generated by `llvm-cov`. `llvm-cov` includes a built-in demangler for C++, and an option to supply an alternate demangler. For Rust, we have `rust-demangler`, currently used in `rustc` coverage tests. Fuchsia's toolchain for Rust is built via `./x.py install`. Fuchsia is adding support for Rust coverage, and we need to include the `rust-demangler` in the installed `bin` directory. Configured rust-demangler as an in-tree extended tool. Added tests to support `./x.py test rust-demangler`. Install with extended tools by default only if `profiler = true`.
2021-02-15Rollup merge of #82106 - jyn514:cleanup-bootstrap, r=Mark-SimulacrumJonas Schievink-2/+2
Remove unnecessary `Option` in `default_doc` Previously, there were two different ways to encode the same info: `None` or `Some(&[])`. Now there is only one way, `&[]`.
2021-02-14Remove unnecessary `Option` in `default_doc`Joshua Nelson-2/+2
Previously, there two different ways to encode the same info: `None` or `Some(&[])`. Now there is only one way, `&[]`.
2021-02-11dist: include src/build_helper as part of the crate graph for rustc-dev.Benjamin Bouvier-0/+8
Since it was missing, it wasn't possible to really use rustc-dev to build, see for instance: https://github.com/rust-analyzer/rust-analyzer/issues/7589.
2021-01-15Allow downloading LLVM on WindowsJoshua Nelson-18/+30
- Don't ignore packaging `llvm/lib/` for `rust-dev` when LLVM is linked statically - Add `link-type.txt` so bootstrap knows whether llvm was linked statically or dynamically - Don't assume CI LLVM is linked dynamically in `bootstrap::config` - Fall back to dynamic linking if `link-type.txt` doesn't exist - Fix existing bug that split the output of `llvm-config` on lines, not spaces - Enable building LLVM tests This works around the following llvm bug: ``` llvm-config: error: component libraries and shared library llvm-config: error: missing: /home/joshua/rustc2/build/x86_64-unknown-linux-gnu/llvm/build/lib/libgtest.a llvm-config: error: missing: /home/joshua/rustc2/build/x86_64-unknown-linux-gnu/llvm/build/lib/libgtest_main.a llvm-config: error: missing: /home/joshua/rustc2/build/x86_64-unknown-linux-gnu/llvm/build/lib/libLLVMTestingSupport.a thread 'main' panicked at 'command did not execute successfully: "/home/joshua/rustc2/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-config" "--libfiles" ``` I'm not sure why llvm-config thinks these are required, but to avoid the error, this builds them anyway. - Temporarily set windows as the try builder. This should be reverted before merging. - Bump version of `download-ci-llvm-stamp` `src/llvm-project` hasn't changed, but the generated tarball has. - Only special case MacOS when dynamic linking. Static linking works fine. - Store `link-type.txt` to the top-level of the tarball This allows writing the link type unconditionally. Previously, bootstrap had to keep track of whether the file IO *would* succeed (it would fail if `lib/` didn't exist), which was prone to bugs. - Make `link-type.txt` required Anyone downloading this from CI should be using a version of bootstrap that matches the version of the uploaded artifacts. So a missing link-type indicates a bug in x.py.
2021-01-05Rollup merge of #80533 - matthiaskrgr:bootstrap_clppy, r=Mark-SimulacrumYuki Okushi-4/+4
bootstrap: clippy fixes addresses: clippy::or_fun_call clippy::single_char_add_str clippy::comparison_to_empty clippy::or_fun_call
2020-12-31bootstrap: use the correct paths during ./x.py installPietro Albini-2/+2
2020-12-31bootstrap: change the dist outputs to GeneratedTarballPietro Albini-38/+38
The struct will allow to store more context on the generated tarballs.
2020-12-31bootstrap: never delete the tarball temporary directoryPietro Albini-2/+2
Files in the temporary directory are used by ./x.py install.
2020-12-31bootstrap: clippy fixesMatthias Krüger-4/+4
addresses: clippy::or_fun_call clippy::single_char_add_str clippy::comparison_to_empty clippy::or_fun_call
2020-12-23bootstrap: convert reproducible-artifacts to use TarballPietro Albini-41/+4
2020-12-23bootstrap: use the normal compiler to build stdPietro Albini-2/+1
2020-12-23bootstrap: avoid producing the rust tarball during dry runsPietro Albini-0/+5
2020-12-23bootstrap: convert rustc-src to use TarballPietro Albini-31/+3
2020-12-23bootstrap: convert rust to use TarballPietro Albini-38/+5
2020-12-23bootstrap: convert rust-src to use TarballPietro Albini-27/+3
2020-12-23bootstrap: convert rust-analyzer to use TarballPietro Albini-50/+6
2020-12-23bootstrap: convert rls to use TarballPietro Albini-50/+6
2020-12-23bootstrap: convert rustfmt to use TarballPietro Albini-49/+7
2020-12-23bootstrap: convert miri to use TarballPietro Albini-51/+7
2020-12-23bootstrap: simplify including licenses and readmes to tarballsPietro Albini-8/+2
2020-12-23bootstrap: convert clippy to use TarballPietro Albini-48/+10
2020-12-23bootstrap: convert cargo to use TarballPietro Albini-56/+15
2020-12-23bootstrap: convert rust-analysis to use TarballPietro Albini-36/+12
2020-12-23bootstrap: convert rustc-dev to use TarballPietro Albini-40/+16
2020-12-23bootstrap: convert rust-std to use TarballPietro Albini-30/+8
2020-12-23bootstrap: refactor showing the "dist" infoPietro Albini-21/+0
2020-12-23bootstrap: convert rustc to use TarballPietro Albini-52/+8
2020-12-23bootstrap: convert rust-mingw to use TarballPietro Albini-23/+5
2020-12-23bootstrap: convert rustc-docs to use TarballPietro Albini-34/+8
2020-12-23bootstrap: convert rust-docs to use TarballPietro Albini-34/+11
2020-12-23bootstrap: convert llvm-tools to use TarballPietro Albini-37/+7
2020-12-23bootstrap: convert build-manifest to use the new Tarball structPietro Albini-88/+21