about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2020-02-11rustbuild: include channel in sanitizers installed nameMarc-Antoine Perennou-6/+10
Allows parallel install of different rust channels Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2020-02-10Enable Control Flow Guard in rustbuildAndrew Paverd-0/+18
2020-02-09Auto merge of #68623 - Zoxc:lld, r=Mark-Simulacrumbors-7/+49
Add an option to use LLD to link the compiler on Windows platforms Based on https://github.com/rust-lang/rust/pull/68609. Using LLD is good way to improve compile times on Windows since `link.exe` is quite slow. The time for `x.py build --stage 1 src/libtest` goes from 0:12:00 to 0:08:29. Compile time for `rustc_driver` goes from 226.34s to 18.5s. `rustc_macros` goes from 28.69s to 7.7s. The size of `rustc_driver` is also reduced from 83.3 MB to 78.7 MB. r? @Mark-Simulacrum
2020-02-09Add some commentsJohn Kåre Alsaker-0/+1
2020-02-07PEP8 format spacingChris Simpkins-5/+6
2020-02-07PEP8 format spacingChris Simpkins-4/+3
2020-02-07remove unnecessary local variable assignment in context managerChris Simpkins-1/+1
2020-02-06rustc: rename -Zexternal-macro-backtrace to -Zmacro-backtrace.Eduard-Mihai Burtescu-1/+7
2020-02-04Rollup merge of #68805 - matthiaskrgr:cleanup_bootstrap, r=Mark-SimulacrumDylan DPC-57/+40
bootstrap: fix clippy warnings r? @oli-obk
2020-02-04Remove unused core_intrinsics feature gate from bootstrapbjorn3-1/+0
2020-02-04Auto merge of #68708 - Mark-Simulacrum:stage0-step, r=pietroalbinibors-6/+6
Step stage0 to bootstrap from 1.42 This also includes a commit which fixes the rustfmt downloading logic to redownload when the rustfmt channel changes, and bumps rustfmt to a more recent version.
2020-02-03bootstrap: fix clippy warningsMatthias Krüger-58/+41
2020-01-31Drop cfg(bootstrap) codeMark Rousskov-1/+1
2020-01-31Bump rustfmt and stage0Mark Rousskov-1/+1
2020-01-31Correctly reinstall rustfmt on channel changeMark Rousskov-4/+4
2020-01-31Install robots.txt into rust-docs tarballsMark Rousskov-0/+1
2020-01-29Don't use a whitelist for use_lldJohn Kåre Alsaker-5/+1
2020-01-29Link a linking issueJohn Kåre Alsaker-1/+2
2020-01-29Add an option to use LLD to link the compiler on Windows platformsJohn Kåre Alsaker-7/+51
2020-01-27compiletest: Remove unused llvm-cxxflags optionTomasz Miąsko-6/+1
2020-01-24Rollup merge of #68500 - Mark-Simulacrum:fix-bootstrap-clearing, r=alexcrichtonTyler Mandry-1/+1
Clear out std, not std tools This was a typo that slipped in, and meant that we were still not properly clearing out std. This is basically #67760 but actually correct...
2020-01-24Rollup merge of #68473 - nopsledder:rust_sanitizer_fuchsia, r=alexcrichtonTyler Mandry-0/+18
Enable ASan on Fuchsia This change adds the x86_64-fuchsia and aarch64-fuchsia LLVM targets to those allowed to invoke -Zsanitizer. Currently, the only overlap between compiler_rt sanitizers supported by both rustc and Fuchsia is ASan.
2020-01-23Clear out std, not std toolsMark Rousskov-1/+1
This was a typo that slipped in, and meant that we were still not properly clearing out std.
2020-01-23Auto merge of #68391 - tmiasko:compiletest-debuginfo, r=alexcrichtonbors-8/+0
compiletest: Simplify multi-debugger support Previous implementation used a single mode type to store various pieces of otherwise loosely related information: * Whether debuginfo mode is in use or not. * Which debuggers should run in general. * Which debuggers are enabled for particular test case. The new implementation introduces a separation between those aspects. There is a single debuginfo mode parametrized by a debugger type. The debugger detection is performed first and a separate configuration is created for each detected debugger. The test cases are gathered independently for each debugger which makes it trivial to implement support for `ignore` / `only` conditions. Functional changes: * A single `debuginfo` entry point (rather than `debuginfo-cdb`, `debuginfo-gdb+lldb`, etc.). * Debugger name is included in the test name. * Test outputs are placed in per-debugger directory. * Fixed spurious hash mismatch. Previously, the config mode would change from `DebugInfoGdbLldb` (when collecting tests) to `DebugInfoGdb` or `DebugInfoLldb` (when running them) which would affect hash computation. * PYTHONPATH is additionally included in gdb hash. * lldb-python and lldb-python-dir are additionally included in lldb hash.
2020-01-22Enable ASan on FuchsiaAaron Green-0/+18
This change adds the x86_64-fuchsia and aarch64-fuchsia LLVM targets to those allowed to invoke -Zsanitizer. Currently, the only overlap between compiler_rt sanitizers supported by both rustc and Fuchsia is ASan.
2020-01-22bootstrap: update clippy subcmd decriptionMatthias Krüger-1/+1
Clarify where the clippy used in `./x.py clippy` is coming from. It uses whatever clippy binary was installed via rustup, cargo-install or otherwise and does NOT use the binary generated by `./x.py build src/tools/clippy`.
2020-01-20compiletest: Simplify multi-debugger supportTomasz Miąsko-8/+0
Previous implementation used a single mode type to store various pieces of otherwise loosely related information: * Whether debuginfo mode is in use or not. * Which debuggers should run in general. * Which debuggers are enabled for particular test case. The new implementation introduces a separation between those aspects. There is a single debuginfo mode parametrized by a debugger type. The debugger detection is performed first and a separate configuration is created for each detected debugger. The test cases are gathered independently for each debugger which makes it trivial to implement support for `ignore` / `only` conditions. Functional changes: * A single `debuginfo` entry point (rather than `debuginfo-cdb`, `debuginfo-gdb+lldb`, etc.). * Debugger name is included in the test name. * Test outputs are placed in per-debugger directory. * Fixed spurious hash mismatch. Previously, the config mode would change from `DebugInfoGdbLldb` (when collecting tests) to `DebugInfoGdb` or `DebugInfoLldb` (when running them) which would affect hash computation. * PYTHONPATH is additionally included in gdb hash. * lldb-python and lldb-python-dir are additionally included in lldb hash.
2020-01-15Rollup merge of #68231 - danielframpton:windows-crosscompile, r=alexcrichtonYuki Okushi-0/+2
Better support for cross compilation on Windows. I have been investigating enabling panic=unwind for aarch64-pc-windows-msvc (see #65313) and building rustc and cargo hosted on aarch64-pc-windows-msvc. Without the libpath changes we were trying to link a mix of amd64 and arm64 binaries. Without the cmake system name change, the llvm build was trying to run an arm64 build tool on the x86_64 build machine. That said, I haven't tested all different combinations here and am very open to resolving this a different way.
2020-01-15Rollup merge of #68141 - euclio:replace-bindings-with-winapi, r=alexcrichtonYuki Okushi-127/+27
use winapi for non-stdlib Windows bindings
2020-01-14Better support for cross compilation on Windows.Daniel Frampton-0/+2
2020-01-14Tweak assertion note in fmtYuki Okushi-1/+9
2020-01-11use winapi for non-stdlib Windows bindingsAndy Russell-127/+27
2020-01-11Rollup merge of #68074 - matthew-healy:skip-llvm-rebuild-option, r=CentrilMazdak Farrokhzad-2/+19
Add `llvm-skip-rebuild` flag to `x.py` This PR follows on from #67437 to complete the feature request from #65612. Specifically it adds a new command-line flag, `--llvm-skip-rebuild`, which overrides both any value set in `config.toml` and the default value (`false`). I'm not 100% confident that I've implemented the override in the "best" way, but I've checked it locally and it seems to work at least. This option isn't currently mentioned in the Guide to Rustc Development. I'd be happy to write something on it if folk think that's worthwhile.
2020-01-10Auto merge of #65241 - tmiasko:no-std-san, r=alexcrichtonbors-47/+159
build-std compatible sanitizer support ### Motivation When using `-Z sanitizer=*` feature it is essential that both user code and standard library is instrumented. Otherwise the utility of sanitizer will be limited, or its use will be impractical like in the case of memory sanitizer. The recently introduced cargo feature build-std makes it possible to rebuild standard library with arbitrary rustc flags. Unfortunately, those changes alone do not make it easy to rebuild standard library with sanitizers, since runtimes are dependencies of std that have to be build in specific environment, generally not available outside rustbuild process. Additionally rebuilding them requires presence of llvm-config and compiler-rt sources. The goal of changes proposed here is to make it possible to avoid rebuilding sanitizer runtimes when rebuilding the std, thus making it possible to instrument standard library for use with sanitizer with simple, although verbose command: ``` env CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS=-Zsanitizer=thread cargo test -Zbuild-std --target x86_64-unknown-linux-gnu ``` ### Implementation * Sanitizer runtimes are no long packed into crates. Instead, libraries build from compiler-rt are used as is, after renaming them into `librusc_rt.*`. * rustc obtains runtimes from target libdir for default sysroot, so that they are not required in custom build sysroots created with build-std. * The runtimes are only linked-in into executables to address issue #64629. (in previous design it was hard to avoid linking runtimes into static libraries produced by rustc as demonstrated by sanitizer-staticlib-link test, which still passes despite changes made in #64780). cc @kennytm, @japaric, @firstyear, @choller
2020-01-11Rollup merge of #68075 - ollie27:rustbuild_books, r=Mark-SimulacrumYuki Okushi-72/+14
rustbuild: Cleanup book generation The Cargo book can be generated the same way as the other books.
2020-01-11Rollup merge of #68039 - euclio:remove-strip-hidden, r=dtolnayYuki Okushi-1/+1
remove explicit strip-hidden pass from compiler doc generation `strip-hidden` is now implied by `--document-private-items` with #67875, so there's no need to specify it anymore.
2020-01-10Prefer llvm-skip-rebuild flag value over config.tomlMatthew Healy-2/+6
2020-01-10Match llvm-skip-rebuild flagMatthew Healy-0/+5
2020-01-09rustbuild: Cleanup book generationOliver Middleton-72/+14
The Cargo book can be generated the same way as the other books.
2020-01-09Add llvm-skip-rebuild to optsMatthew Healy-0/+8
2020-01-09Add bootstrap step for building sanitizer runtimesTomasz Miąsko-43/+159
2020-01-09Remove sanitizer runtime cratesTomasz Miąsko-4/+0
2020-01-08remove strip-hidden pass from compiler doc generationAndy Russell-1/+1
2020-01-08Build compiletest with in-tree libtestJosh Stone-2/+8
2020-01-08Remove obsolete llvm_tools flagJosh Stone-11/+1
2020-01-08Auto merge of #67760 - Mark-Simulacrum:rustc-dirty, r=alexcrichtonbors-2/+13
Clear out target directory if compiler has changed Previously, we relied fully on Cargo to detect that the compiler had changed and it needed to rebuild the standard library (or later "components"). This used to not quite be the case prior to moving to LLVM be a separate cargo invocation; subsequent compiles would recompile std and friends if LLVM had changed (#67077 is the PR that changes things here). This PR moves us to clearing out libstd when it is being compiled if the rustc we're using has changed. We fairly harshly limit the cases in which we do this (e.g., ignoring dry run mode, and so forth, as well as rustdoc invocations). This is primarily because when we're not using the compiler directly, so clearing out in other cases is likely to lead to bugs, particularly as our deletion scheme is pretty blunt today (basically removing more than is needed, i.e., not just the rustc artifacts). In practice, this targeted fix does fix the known bug, though it may not fully resolve the problem here. It's also not clear that there is a full fix hiding here that doesn't involve a more major change (like -Zbinary-dep-depinfo was). As a drive-by fix, don't delete the compiler before calling Build::copy, as that also deletes the compiler.
2020-01-03Rollup merge of #67636 - semarie:bootstrap-rustfmt, r=Mark-SimulacrumYuki Okushi-0/+1
allow rustfmt key in [build] section Permit using `rustfmt` in `config.toml`. It will allow to not download `rustfmt` binary, which is not possible for at least some tiers-3 platforms. Fixes: #67624 r? @Mark-Simulacrum
2020-01-02bootstrap: Allow for setting the ThinLTO import limit used for compiler the ↵Michael Woerister-0/+18
compiler.
2020-01-01Clear out target directory if compiler has changedMark Rousskov-2/+13
Previously, we relied fully on Cargo to detect that the compiler had changed and it needed to rebuild the standard library (or later "components"). This used to not quite be the case prior to moving to LLVM be a separate cargo invocation; subsequent compiles would recompile std and friends if LLVM had changed (#67077 is the PR that changes things here). This PR moves us to clearing out libstd when it is being compiled if the rustc we're using has changed. We fairly harshly limit the cases in which we do this (e.g., ignoring dry run mode, and so forth, as well as rustdoc invocations). This is primarily because when we're not using the compiler directly, so clearing out in other cases is likely to lead to bugs, particularly as our deletion scheme is pretty blunt today (basically removing more than is needed, i.e., not just the rustc artifacts). In practice, this targeted fix does fix the known bug, though it may not fully resolve the problem here. It's also not clear that there is a full fix hiding here that doesn't involve a more major change (like -Zbinary-dep-depinfo was). As a drive-by fix, don't delete the compiler before calling Build::copy, as that also deletes the compiler.
2019-12-29tidy: Enforce formatting rather than just check it if `--bless` is specifiedVadim Petrochenkov-1/+1