about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2020-12-23bootstrap: convert rust-std to use TarballPietro Albini-30/+18
2020-12-23bootstrap: refactor showing the "dist" infoPietro Albini-23/+5
2020-12-23bootstrap: convert rustc to use TarballPietro Albini-52/+11
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-41/+23
2020-12-23bootstrap: convert llvm-tools to use TarballPietro Albini-42/+21
2020-12-23bootstrap: convert build-manifest to use the new Tarball structPietro Albini-88/+146
2020-12-23Auto merge of #80262 - Mark-Simulacrum:pgo-rustc, r=pietroalbinibors-1/+122
Utilize PGO for rustc linux dist builds This implements support for applying PGO to the rustc compilation step (not standard library or any tooling, including rustdoc). Expanding PGO to more tools is not terribly difficult but will involve more work and greater CI time commitment. For the same reason of avoiding greater implementation time commitment, implementing for platforms outside of x86_64-unknown-linux-gnu is skipped. In practice it should be quite simple to extend over time to more platforms. The initial implementation is intentionally minimal here to avoid too much work investment before we start seeing wins for a subset of Rust users. The choice of workloads to profile here is somewhat arbitrary, but the general rationale was to aim for a small set that largely avoided time regressions on perf.rust-lang.org's full suite of crates. The set chosen is libcore, cargo (and its dependencies), and a few ad-hoc stress tests from perf.rlo. The stress tests are arguably the most controversial, but they benefit those cases (avoiding regressions) and do not really remove wins from other benchmarks. The primary next step after this PR lands is to implement support for PGO in LLVM. It is unclear whether we can afford a full LLVM rebuild in CI, though, so the approach taken there may need to be more staggered. rustc-only PGO seems well affordable on linux at least, giving us up to 20% wall time wins on some crates for 15 minutes of extra CI time (1 hour with this PR, up from 45 minutes). The PGO data is uploaded to allow others to reuse it if attempting to reproduce the CI build or potentially, in the future, on other platforms where an off-by-one strategy is used for dist builds at minimal performance cost. r? `@michaelwoerister` (but tell me if you don't want to / don't feel comfortable approving and we can find others)
2020-12-22Include rustdoc in the compiler docs index.Eric Huss-0/+2
2020-12-23Ignore proc-macros when assembling rustc libdirTomasz Miąsko-1/+15
2020-12-22Utilize PGO for rustc linux dist buildsMark Rousskov-1/+122
This implements support for applying PGO to the rustc compilation step (not standard library or any tooling, including rustdoc). Expanding PGO to more tools is not terribly difficult but will involve more work and greater CI time commitment. For the same reason of avoiding greater time commitment, this currently avoids implementing for platforms outside of x86_64-unknown-linux-gnu, though in practice it should be quite simple to extend over time to more platforms. The initial implementation is intentionally minimal here to avoid too much work investment before we start seeing wins for a subset of Rust users. The choice of workloads to profile here is somewhat arbitrary, but the general rationale was to aim for a small set that largely avoided time regressions on perf.rust-lang.org's full suite of crates. The set chosen is libcore, cargo (and its dependencies), and a few ad-hoc stress tests from perf.rlo. The stress tests are arguably the most controversial, but they benefit those cases (avoiding regressions) and do not really remove wins from other benchmarks. The primary next step after this PR lands is to implement support for PGO in LLVM. It is unclear whether we can afford a full LLVM rebuild in CI, though, so the approach taken there may need to be more staggered. rustc-only PGO seems well affordable on linux at least, giving us up to 20% wall time wins on some crates for 15 minutes of extra CI time (1 hour up from 45 minutes). The PGO data is uploaded to allow others to reuse it if attempting to reproduce the CI build or potentially, in the future, on other platforms where an off-by-one strategy is used for dist builds at minimal performance cost.
2020-12-20make sure installer only creates directories in DESTDIRYuxuan Shui-6/+8
Fixes #80238 Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-12-20Skip `dsymutil` by default for compiler bootstrapJ. Ryan Stinnett-0/+16
`dsymutil` adds time to builds on Apple platforms for no clear benefit, and also makes it more difficult for debuggers to find debug info. The compiler currently defaults to running `dsymutil` to preserve its historical default, but when compiling the compiler itself, we skip it by default since we know it's safe to do so in that case.
2020-12-18Auto merge of #80081 - ehuss:update-cargo, r=Mark-Simulacrumbors-2/+41
Update cargo 4 commits in d274fcf862b89264fa2c6b917b15230705257317..a3c2627fbc2f5391c65ba45ab53b81bf71fa323c 2020-12-07 23:08:44 +0000 to 2020-12-14 17:21:26 +0000 - Check if rerun-if-changed points to a directory. (rust-lang/cargo#8973) - Implement external credential process. (RFC 2730) (rust-lang/cargo#8934) - Revert recent build-std vendoring changes (rust-lang/cargo#8968) - Fix the unit dependency graph with dev-dependency `links` (rust-lang/cargo#8969)
2020-12-18Update cargoEric Huss-2/+41
2020-12-17bootstrap: update ci-llvm stamp after #80087David Wood-1/+1
Unfortunately, #80087 forgot to update the ci-llvm stamp, so the updated ci-llvm tarball with `llvm-dwp` wasn't downloaded by users. This commit updates the ci-llvm stamp to resolve that problem. Signed-off-by: David Wood <david@davidtw.co>
2020-12-17Rollup merge of #80082 - ehuss:revert-rust-src-vendor, r=Mark-SimulacrumYuki Okushi-45/+2
Revert #78790 - rust-src vendoring This reverts the rust-src vendor changes from #78790. There were a few issues (see #79218, https://github.com/rust-lang/cargo/issues/8962, https://github.com/rust-lang/cargo/issues/8963), that I don't think will get fixed in the next few days before the beta branch. Fixes #79218
2020-12-16bootstrap: include llvm-dwp in CI LLVMDavid Wood-0/+1
This commit includes the `llvm-dwp` tool in the CI LLVM (which rustc developers can download instead of building LLVM locally) - `llvm-dwp` is required by Split DWARF which landed in PR #77117. Signed-off-by: David Wood <david@davidtw.co>
2020-12-16Revert "Auto merge of #78790 - Gankra:rust-src-vendor, r=Mark-Simulacrum"Eric Huss-45/+2
This reverts commit 7afc5172305cdae588a0318ce545749cf4ed947d, reversing changes made to d4ea0b3e46a0303d5802b632e88ba1ba84d9d16f.
2020-12-16compiletest: add split dwarf compare modeDavid Wood-1/+6
This commit adds a Split DWARF compare mode to compiletest so that debuginfo tests are also tested using Split DWARF in split mode (and manually in single mode). Signed-off-by: David Wood <david@davidtw.co>
2020-12-16bootstrap: copy `llvm-dwp` to sysrootDavid Wood-11/+24
`llvm-dwp` is required for linking the DWARF objects into DWARF packages when using Split DWARF, especially given that rustc produces multiple DWARF objects (one for each codegen unit). Signed-off-by: David Wood <david@davidtw.co>
2020-12-13Rollup merge of #79970 - bjorn3:no_unnecessary_llvm_checkout, r=Mark-SimulacrumYuki Okushi-21/+29
Misc rustbuild improvements when the LLVM backend isn't used * Don't checkout llvm-project * Don't require cmake and ninja Fixes #78564
2020-12-13Rollup merge of #79954 - jyn514:normalize-oops, r=Mark-SimulacrumYuki Okushi-2/+8
Fix building compiler docs with stage 0 This regressed in https://github.com/rust-lang/rust/pull/79525 (see https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/Can't.20document.20single.20crate). r? `@Mark-Simulacrum`
2020-12-13Rollup merge of #79940 - matthiaskrgr:cl15ppy, r=Dylan-DPCYuki Okushi-7/+3
fix more clippy::complexity findings fix clippy::unnecessary_filter_map use if let Some(x) = .. instead of ...map(|x|) to conditionally run fns that return () (clippy::option_map_unit_fn) fix clippy::{needless_bool, manual_unwrap_or} don't clone types that are copy (clippy::clone_on_copy) don't convert types into identical types with .into() (clippy::useless_conversion) use strip_prefix over slicing (clippy::manual_strip) r? ``@Dylan-DPC``
2020-12-13Rollup merge of #79845 - jyn514:python3, r=Mark-SimulacrumYuki Okushi-3/+8
Fix rustup support in default_build_triple for python3 bootstrap completely ignores all errors when detecting a rustup version, so this wasn't noticed before. Fixes the following error: ``` rustup not detected: a bytes-like object is required, not 'str' falling back to auto-detect ``` This also takes the opportunity to only call rustup and other external commands only once during startup. Follow-up to https://github.com/rust-lang/rust/pull/78513.
2020-12-12Fix building compiler docs with stage 0Joshua Nelson-2/+8
2020-12-12Don't require cmake and ninja when the LLVM backend is not usedbjorn3-16/+20
2020-12-12Don't checkout llvm-project when the LLVM backend isn't builtbjorn3-5/+9
2020-12-11fix clippy::{needless_bool, manual_unwrap_or}Matthias Krüger-5/+1
2020-12-11don't clone types that are copy (clippy::clone_on_copy)Matthias Krüger-2/+2
2020-12-11use strip_prefix over slicing (clippy::manual_strip)Matthias Krüger-1/+1
2020-12-10Manually code-sign after running install_name_toolCorey Farwell-8/+26
2020-12-10If "aarch64-apple-darwin", copy sanitizers.Corey Farwell-1/+1
2020-12-09Enable ASan, TSan, UBSan for aarch64-apple-darwin.Corey Farwell-0/+1
2020-12-08Fix rustup support in default_build_triple for python3Joshua Nelson-3/+8
bootstrap completely ignores all errors when detecting a rustup version, so this wasn't noticed before. Fixes the following error: ``` rustup not detected: a bytes-like object is required, not 'str' falling back to auto-detect ``` This also takes the opportunity to only call rustup and other external commands only once during startup.
2020-12-08don't wrap code block in Ok() (clipppy::unit_arg)Matthias Krüger-2/+3
2020-12-01Add tests for rustdoc jsonNixon Enraght-Moony-0/+8
Move rustdoc/rustdoc-json to rustdoc-json Scaffold rustdoc-json test mode Implement run_rustdoc_json_test Fix up python Make tidy happy
2020-12-01Rollup merge of #79527 - jyn514:intra-doc-tests, r=ManishearthMara Bos-32/+1
Move intra-doc link tests into a subdirectory They were starting to get unwieldy. r? ``@Manishearth``
2020-12-01Rollup merge of #79525 - jyn514:feature-gate-normalize, r=GuillaumeGomezMara Bos-0/+2
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-12-01Rollup merge of #79522 - ehuss:lint-check-validate, r=Mark-SimulacrumMara Bos-0/+39
Validate lint docs separately. This addresses some concerns raised in https://github.com/rust-lang/rust/pull/76549#issuecomment-727638552 about errors with the lint docs being confusing and cumbersome. Errors from validating the lint documentation were being generated during `x.py doc` (and `x.py dist`), since extraction and validation are being done in a single step. This changes it so that extraction and validation are separated, so that `x.py doc` will not error if there is a validation problem, and tests are moved to `x.py test src/tools/lint-docs`. This includes the following changes: * Separate validation to `x.py test`. * Added some more documentation on how to more easily modify and test the docs. * Added more help to the error messages to hopefully provide more information on how to fix things. The first commit just moves the code around, so you may consider looking at the other commits for a smaller diff.
2020-11-29Add -Z normalize-docs and enable it for compiler docsJoshua Nelson-0/+2
2020-11-28Move `src/test/rustdoc-ui` intra-doc tests into a subdirectoryJoshua Nelson-32/+1
This also changes the builder to allow using `x.py test src/test/rustdoc-ui/intra-doc`; before, it would panic that no paths were found.
2020-11-29Fix a bootstrap commentnooberfsh-1/+1
2020-11-28lint-docs: Add --validate flag to validate lint docs separately.Eric Huss-0/+39
2020-11-23Convert UNC path to local path to satisfy install script on WindowsJoseph Rafael Ferrer-1/+5
2020-11-21Auto merge of #79115 - cuviper:rust-description, r=Mark-Simulacrumbors-1/+11
x.py: allow a custom string appended to the version This adds `rust.description` to the config as a descriptive string to be appended to `rustc --version` output, which is also used in places like debuginfo `DW_AT_producer`. This may be useful for supplementary build information, like distro-specific package versions. For example, in Fedora 33, `gcc --version` outputs: gcc (GCC) 10.2.1 20201016 (Red Hat 10.2.1-6) With this change, we can add similar vendor info to `rustc --version`.
2020-11-19Rollup merge of #79183 - cuviper:compiletest-test-sysroot, r=Mark-SimulacrumDylan DPC-1/+4
Make compiletest testing use the local sysroot We already set `compiletest` to use the local sysroot in #68019, but that missed the configuration for testing `compiletest` itself.
2020-11-19Rollup merge of #79156 - jyn514:relative-llvm, r=Mark-SimulacrumDylan DPC-2/+5
Allow using `download-ci-llvm` from directories other than the root Previously, bootstrap.py would attempt to find the LLVM commit from `src/llvm-project`. However, it assumed it was always being run from the top-level directory, which isn't always the case. Before: ``` downloading https://ci-artifacts.rust-lang.org/rustc-builds//rust-dev-nightly-x86_64-unknown-linux-gnu.tar.gz curl: (22) The requested URL returned error: 404 failed to run: curl -# -y 30 -Y 10 --connect-timeout 30 --retry 3 -Sf -o /tmp/tmppyh4w8 https://ci-artifacts.rust-lang.org/rustc-builds//rust-dev-nightly-x86_64-unknown-linux-gnu.tar.gz Build completed unsuccessfully in 0:00:02 ``` After: ``` downloading https://ci-artifacts.rust-lang.org/rustc-builds/430feb24a46993e5073c1bb1b39da190d83fa2bf/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.gz ###################################################################################################################################################################### 100.0% extracting /home/joshua/rustc/src/bootstrap/build/cache/llvm-430feb24a46993e5073c1bb1b39da190d83fa2bf-False/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.gz ``` r? ```@Mark-Simulacrum``` cc ```@pnkfelix```
2020-11-19Rollup merge of #79155 - 12101111:fix-profiler-config, r=Mark-SimulacrumDylan DPC-8/+8
fix handling the default config for profiler and sanitizers #78354 don't handle the case that user don't add any target-specific config in `[target.*]` of `config.toml`: ```toml changelog-seen = 2 [llvm] link-shared = true [build] sanitizers = true profiler = true [install] [rust] [dist] ``` The previes code handle the default config in `Config::prase()`: ```rust target.sanitizers = cfg.sanitizers.unwrap_or(build.sanitizers.unwrap_or_default()); target.profiler = cfg.profiler.unwrap_or(build.profiler.unwrap_or_default()); config.target_config.insert(TargetSelection::from_user(&triple), target); ``` In this case, `toml.target` don't contain any target, so the above code won't execute. Instead, a default `Target` is insert in https://github.com/rust-lang/rust/blob/c919f490bbcd2b29b74016101f7ec71aaa24bdbb/src/bootstrap/sanity.rs#L162-L166 The default value for `bool` is false, hence the issue in #79124 This fix change the type of `sanitizers` and `profiler` to `Option<bool>`, so the default value is `None`, and fallback config is handled in `Config::sanitizers_enabled` and `Config::profiler_enabled` fix #79124 cc `@Mark-Simulacrum` `@richkadel`