summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2020-08-07rustbuild: drop tool::should_installMarc-Antoine Perennou-24/+5
Always install when the build succeeds Fixes #74431 Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2020-07-13Rollup merge of #74046 - ehuss:deny-warnings-caching, r=Mark-SimulacrumManish Goregaokar-4/+18
Fix caching issue when building tools. This fixes a problem with tool builds not being cached properly. #73297 changed it so that Clippy will participate in the "deny warnings" setting. Unfortunately this causes a problem because Clippy shares the build directory with other tools which do not participate in "deny warnings". Because Cargo does not independently cache artifacts based on different RUSTFLAGS settings, it causes all the shared dependencies to get rebuilt if Clippy ever gets built. The solution here is to stop using RUSTFLAGS, and just sneak the settings in through the rustc wrapper. Cargo won't know about the different settings, so it will not bust the cache. This should be safe since lint settings on dependencies are ignored. This is how things used to work in the past before #64316. Alternate solutions: * Treat Clippy as a "submodule" and don't enforce warnings on it. This was the behavior before #73297. The consequence is that if a warning sneaks into clippy, that the clippy maintainers will need to fix it when they sync clippy back to the clippy repo. * Just deny warnings on all tools (removing the in-tree/submodule distinction). This is tempting, but with some issues (cc #52336): * Adding or changing warnings in rustc can be difficult to land because tools have to be updated if they trip the warning. In practice, this isn't too bad. Cargo (and rustfmt) already runs with `deny(warnings)`, so this has been the de-facto standard already (although they do not use the extra lints like `unused_lifetimes`). * Teach Cargo to add flags to the workspace members, but not dependencies. * Teach Cargo to add flags without fingerprinting them? * Teach Cargo to independently cache different RUSTFLAGS artifacts (this was [reverted](https://github.com/rust-lang/cargo/pull/7417) due to complications). This would also unnecessarily rebuild dependencies, but would avoid cache thrashing. * Teach Cargo about lint settings. Closes #74016
2020-07-11Rollup merge of #74116 - arlosi:aarch64build, r=pietroalbiniManish Goregaokar-8/+23
Fix cross compilation of LLVM to aarch64 Windows targets When cross-compiling, the LLVM build system recurses to build tools that need to run on the host system. However, since we pass cmake defines to set the compiler and target, LLVM still compiles these tools for the target system, rather than the host. The tools then fail to execute during the LLVM build. This change sets defines for the tools that need to run on the host (llvm-nm, llvm-tablegen, and llvm-config), so that the LLVM build does not attempt to build them, and instead relies on the tools already built. If compiling with clang-cl, adds the `--target` option to specify the target triple. MSVC compilers do not require this, since there is a separate compiler binary for each cross-compilation target. Related issue: #72881 Requires LLVM change: rust-lang/llvm-project#67
2020-07-10Rollup merge of #74127 - tamird:allowlist, r=oli-obkManish Goregaokar-2/+4
Avoid "whitelist" Other terms are more inclusive and precise.
2020-07-10Avoid "whitelist"Tamir Duberstein-2/+4
Other terms are more inclusive and precise.
2020-07-10Use str::strip* in bootstrapLzu Tao-10/+10
This commit replaces the use of `trim_start_matches` because in `rustc -Vv` output there are no lines starting with multiple "release:".
2020-07-08Fix x.py test for librustc crates.Eric Huss-2/+2
2020-07-08Fix cross-compilation of LLVM to aarch64 Windows targetsArlo Siemsen-8/+23
When cross-compiling, the LLVM build system recurses to build tools that need to run on the host system. However, since we pass cmake defines to set the compiler and target, LLVM still compiles these tools for the target system, rather than the host. The tools then fail to execute during the LLVM build. This change sets defines for the tools that need to run on the host (llvm-nm, llvm-tablegen, and llvm-config), so that the LLVM build does not attempt to build them, and instead relies on the tools already built. If compiling with clang-cl, this change also adds the `--target` option to specify the target triple. MSVC compilers do not require this, since there is a separate compiler binary for cross-compilation.
2020-07-07Fix occasional bootstrap panic in docs.Eric Huss-1/+1
2020-07-06Rollup merge of #74090 - tmiasko:rustc-debug-assertions, r=RalfJungManish Goregaokar-2/+0
Remove unused RUSTC_DEBUG_ASSERTIONS Since #73374 the rustc wrapper no longer configures debug assertions based on RUSTC_DEBUG_ASSERTIONS environment variable. r? @RalfJung
2020-07-06Rollup merge of #70563 - GuillaumeGomez:page-hash-handling, r=ollie27,kinnisonManish Goregaokar-15/+1
[rustdoc] Page hash handling Fixes https://github.com/rust-lang/rust/issues/70476 A good example to see the change is to use this URL: https://doc.rust-lang.org/nightly/std/string/struct.String.html#from_iter.v-3 After the change, it actually goes to the target element (and change the page hash to something more clear for the users). r? @kinnison cc @ollie27
2020-07-06Remove unused RUSTC_DEBUG_ASSERTIONSTomasz Miąsko-2/+0
Since #73374 the rustc wrapper no longer configures debug assertions based on RUSTC_DEBUG_ASSERTIONS environment variable.
2020-07-04Fix caching issue when building tools.Eric Huss-4/+18
2020-07-03Add rust-analyzer submoduleAleksey Kladov-3/+149
The current plan is that submodule tracks the `release` branch of rust-analyzer, which is updated once a week. rust-analyzer is a workspace (with a virtual manifest), the actual binary is provide by `crates/rust-analyzer` package. Note that we intentionally don't add rust-analyzer to `Kind::Test`, for two reasons. *First*, at the moment rust-analyzer's test suite does a couple of things which might not work in the context of rust repository. For example, it shells out directly to `rustup` and `rustfmt`. So, making this work requires non-trivial efforts. *Second*, it seems unlikely that running tests in rust-lang/rust repo would provide any additional guarantees. rust-analyzer builds with stable and does not depend on the specifics of the compiler, so changes to compiler can't break ra, unless they break stability guarantee. Additionally, rust-analyzer itself is gated on bors, so we are pretty confident that test suite passes.
2020-07-02Auto merge of #73954 - Manishearth:rollup-8qvh170, r=Manishearthbors-34/+165
Rollup of 10 pull requests Successful merges: - #73414 (Implement `slice_strip` feature) - #73564 (linker: Create GNU_EH_FRAME header by default when producing ELFs) - #73622 (Deny unsafe ops in unsafe fns in libcore) - #73684 (add spans to injected coverage counters, extract with CoverageData query) - #73812 (ast_pretty: Pass some token streams and trees by reference) - #73853 (Add newline to rustc MultiSpan docs) - #73883 (Compile rustdoc less often.) - #73885 (Fix wasm32 being broken due to a NodeJS version bump) - #73903 (Changes required for rustc/cargo to build for iOS targets) - #73938 (Optimise fast path of checked_ops with `unlikely`) Failed merges: r? @ghost
2020-07-02Remove render-redirect-pages option in rustdocGuillaume Gomez-15/+1
2020-07-02Rollup merge of #73903 - luxxxxy:ios-rustc, r=nikomatsakisManish Goregaokar-0/+19
Changes required for rustc/cargo to build for iOS targets cargo, rustc, clippy, rust-src, and rust-analysis successfully build for `aarch64-apple-ios` with these changes. NOTE: cargo required arm64-ios openssl/libcurl to be linked. ![image](https://user-images.githubusercontent.com/65794972/86178510-75d78080-baf6-11ea-9c17-b74bd6c85272.png) ![image](https://user-images.githubusercontent.com/65794972/86178525-7bcd6180-baf6-11ea-9974-f99980cbdb24.png)
2020-07-02Rollup merge of #73883 - ehuss:rustdoc-stage-previous, r=Mark-SimulacrumManish Goregaokar-34/+146
Compile rustdoc less often. Previously rustdoc was built 3 times with `x.py test`: 1. stage2 (using stage1 compiler) for compiletest tests (stage1-tools copied to stage2). 2. stage1 (using stage0 compiler) for std crate tests (stage0-tools copied to stage1). 3. stage2 test (using stage2 compiler) for rustdoc crate tests and error_index_generator (stage2-tools). This PR removes the majority of number 3, where it will instead use the stage1 compiler, which will share the artifacts from number 1. This matches the behavior of the libstd crate tests. I don't think it is entirely necessary to run the tests using stage2. At `-j2`, the last build step goes from about 300s to 70s on my machine. It's not a huge win, but shaving 4 minutes isn't bad. The other two builds would be pretty difficult (or undesired or impossible) to unify. It looks like std tests use stage1 very intentionally (see `force_use_stage1` and its history), and compiletests use the top stage very intentionally. Unfortunately the linkchecker builds all docs at stage2 (stage2-tools), which means a few build script artifacts are not shared. It's not really clear to me how to fix that (because it uses `default_doc`, there doesn't seem to be any control over the stages). --- For `x.py doc`, rustdoc was previously built three times (with compiler-docs): 1. stage2 (using stage1 compiler) for normal documentation output (stage1-tools copied to stage2). 2. stage1 (using stage0 compiler) for compiler-docs 3. stage2 (using stage2 compiler) for error_index_generator (stage2-tools) This PR combines these so that they consistently use the "top stage" rustdoc. I don't know why the compiler-docs was written to use stage minus one, but it seems better to be consistent across the doc steps. --- I've tried to test this with a variety of commands (`x.py doc`, `x.py test`, different `--stage` flags, `full-bootstrap`, setting `--target`, etc.) to try to make sure there aren't significant regressions here. It's tricky since there are so many variables, and this stuff is difficult for me to fully understand. Closes #70799 (I think)
2020-07-01Rollup merge of #73929 - kraai:fix-comment-typo, r=jonas-schievinkManish Goregaokar-1/+1
Fix comment typo
2020-07-01Rollup merge of #72569 - ChrisDenton:remove-innosetup, r=nikomatsakisManish Goregaokar-21/+0
Remove legacy InnoSetup GUI installer On Windows the InnoSetup `.exe` installer was superseded by the MSI installer long ago. It's no longer needed. The `.exe` installer hasn't been linked from the [other installation methods](https://forge.rust-lang.org/infra/other-installation-methods.html#standalone) page in many years. As far as I can tell the intent was always to remove this installer once the MSI proved itself. Though admittedly both installers feel very "legacy" at this point. Removing this would mean we only maintain one Windows GUI installer and would speed up the distribution phase. As a result of removing InnoSetup, this closes #24397
2020-07-01Tests for number of times rustdoc is built with x.py test and doc.Eric Huss-14/+94
2020-07-01Explicitly check for iOS/tvOS.aspen-1/+1
2020-07-01Also document iphoneos-version-min.aspen-0/+1
2020-07-01Document the CMake defines.aspen-1/+4
2020-07-01Fix comment typoKRAAI, MATTHEW [VISUS]-1/+1
2020-06-30Don't break on iOS Simulator builds.aspen-1/+5
2020-06-30Only set the flag in LLVM builds.aspen-5/+3
2020-06-30Changes required for rustc/cargo to build for iOS targetsaspen-0/+13
2020-06-30Auto merge of #73456 - tmiasko:musl-libdir, r=Mark-Simulacrumbors-7/+19
bootstrap: Configurable musl libdir Make it possible to customize the location of musl libdir using musl-libdir in config.toml, e.g., to use lib64 instead of lib.
2020-06-29Compile rustdoc less often.Eric Huss-24/+56
2020-06-29Auto merge of #73374 - alexcrichton:compiler-bulitins-debug-assertions, ↵bors-32/+8
r=Mark-Simulacrum rustbuild: Move compiler-builtins build logic to manifest This commit moves the compiler-builtins-specific build logic from `src/bootstrap/bin/rustc.rs` into the workspace `Cargo.toml`'s `[profile]` configuration. Now that rust-lang/cargo#7253 is fixed we can ensure that Cargo knows about debug assertions settings, and it can also be configured to specifically disable debug assertions unconditionally for compiler-builtins. This should improve rebuild logic when debug-assertions settings change and also improve build-std integration where Cargo externally now has an avenue to learn how to build compiler-builtins as well.
2020-06-29rustbuild: Move compiler-builtins build logic to manifestAlex Crichton-32/+8
This commit moves the compiler-builtins-specific build logic from `src/bootstrap/bin/rustc.rs` into the workspace `Cargo.toml`'s `[profile]` configuration. Now that rust-lang/cargo#7253 is fixed we can ensure that Cargo knows about debug assertions settings, and it can also be configured to specifically disable debug assertions unconditionally for compiler-builtins. This should improve rebuild logic when debug-assertions settings change and also improve build-std integration where Cargo externally now has an avenue to learn how to build compiler-builtins as well.
2020-06-27Auto merge of #73671 - ehuss:update-mdbook, r=Mark-Simulacrumbors-17/+2
Update mdbook This updates mdbook to 0.4. The list of changes can be found at https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-040. I think the most important one is the change to include fonts with the book instead of using the Google Fonts CDN. This adds a few megabytes of fonts to the docs component. It may be possible to share the fonts across the books, but would take a fair bit of work to make that happen, so I'm not sure if it is necessary. This also removes mdbook-linkcheck. It is currently not being used, and I don't foresee it going back into use anytime soon. I would prefer not to maintain something that isn't being used, and it removes a very large number of dependencies.
2020-06-26Rollup merge of #73691 - ajpaverd:bootstrap-windows-73689, r=Mark-SimulacrumManish Goregaokar-0/+6
Bootstrap: detect Windows based on sys.platform Closes #73689.
2020-06-26Rollup merge of #72937 - AdrianCX:master, r=nikomatsakisManish Goregaokar-17/+4
Fortanix SGX target libunwind build process changes Ticket: https://github.com/fortanix/rust-sgx/issues/174 LLVM related changes (merged): https://github.com/rust-lang/llvm-project/pull/57 Description: libunwind changes needed to run code in sgx environment via rust-sgx. Target that uses this in rust: x86_64-fortanix-unknown-sgx. Without this change, rust std for this toolchain is forced to use a precompiled library loaded via environment variable. With this change we act the same as musl target.
2020-06-26Remove mdbook-linkcheck.Eric Huss-17/+2
2020-06-25Support configurable deny-warnings for all in-tree crates.Eric Huss-34/+59
2020-06-25Bootstrap: fallback detection of WindowsAndrew Paverd-0/+6
2020-06-25Fix commentsAdrian Cruceru-0/+7
2020-06-24Update libunwind build process for x86_64-fortanix-unknown-sgx targetAdrian Cruceru-20/+0
2020-06-23Rollup merge of #73590 - davidtwco:bootstrap-fix-config-env-var, ↵Manish Goregaokar-5/+9
r=Mark-Simulacrum bootstrap: no `config.toml` exists regression Fixes #73574. This PR fixes a regression introduced in #73317 where an oversight meant that `config.toml` was assumed to exist.
2020-06-22Re-enable Clippy testsAaron Hill-4/+1
2020-06-22bootstrap: no `config.toml` exists regressionDavid Wood-5/+9
This commit fixes a regression introduced in #73317 where an oversight meant that `config.toml` was assumed to exist. Signed-off-by: David Wood <david@davidtw.co>
2020-06-21Auto merge of #72696 - jethrogb:jb/llvm-zlib, r=Mark-Simulacrumbors-1/+8
Enable LLVM zlib Compilers may generate ELF objects with compressed sections (although rustc currently doesn't do this). Currently, when linking these with `rust-lld`, you'll get this error: `rust-lld: error: ...: contains a compressed section, but zlib is not available` This enables zlib when building LLVM.
2020-06-20Rollup merge of #73404 - ajpaverd:cfguard_syntax, r=Mark-SimulacrumRalf Jung-2/+2
Update CFGuard syntax Update the naming and syntax of the control-flow-guard option, as discussed in #68793. r? @Mark-Simulacrum
2020-06-20Rollup merge of #73171 - tblah:riscv-qemu-test, r=pietroalbiniRalf Jung-0/+2
RISC-V Emulated Testing Adds a disabled docker image on which to run RISC-V tests. Based on the armhf image. Test using ``` ./src/ci/docker/run.sh riscv64gc-linux ``` cc: @msizanoen1
2020-06-20bootstrap: Factor out common code in supported_sanitizersTomasz Miąsko-45/+29
2020-06-20bootstrap: Build sanitizer runtimes for aarch64-unknown-linux-gnuTomasz Miąsko-0/+9
2020-06-19Rollup merge of #73440 - jyn514:bootstrap/build-rustdoc, r=Mark-SimulacrumManish Goregaokar-1/+1
Add src/librustdoc as an alias for src/tools/rustdoc No one actually works with src/tools/rustdoc, it's almost empty. Closes https://github.com/rust-lang/rust/issues/73439
2020-06-19Rollup merge of #73352 - ehuss:bootstrap-metadata, r=Mark-SimulacrumRalf Jung-100/+76
Speed up bootstrap a little. The bootstrap script was calling `cargo metadata` 3 times (or 6 with `-v`). This is a very expensive operation, and this attempts to avoid the extra calls. On my system, a simple command like `./x.py test -h -v` goes from about 3 seconds to 0.4. An overview of the changes: - Call `cargo metadata` only once with `--no-deps`. Optional dependencies are filtered in `in_tree_crates` (handling `profiler_builtins` and `rustc_codegen_llvm` which are driven by the config). - Remove a duplicate call to `metadata::build` when using `-v`. I'm not sure why it was there, it looks like a mistake or vestigial from previous behavior. - Remove check for `_shim`, I believe all the `_shim` crates are now gone. - Remove check for `rustc_` and `*san` for `test::Crate::should_run`, these are no longer dependencies in the `test` tree. - Use relative paths in `./x.py test -h -v` output. - Some code cleanup (remove unnecessary `find_compiler_crates`, etc.). - Show suite paths (`src/test/ui/...`) in `./x.py test -h -v` output. - Some doc comments.