about summary refs log tree commit diff
path: root/src/bootstrap/builder.rs
AgeCommit message (Collapse)AuthorLines
2018-09-17Auto merge of #52036 - collin5:b50509-2, r=collin5bors-0/+74
Clean up dependency tracking in Rustbuild [2/2] Make `clear_if_dirty` calls in `Builder::cargo` with stamp dependencies for the given Mode. Continuation of #50904 Ref issue #50509 r? @Mark-Simulacrum
2018-09-17refactor Builder::cargo, clean deps for cmd!=testCollins Abitekaniza-5/+2
2018-09-12remove struct CleanToolsCollins Abitekaniza-3/+14
2018-09-12nit: rearrange and make match exhaustiveCollins Abitekaniza-5/+8
also indicate difference between out_dir and my_out
2018-09-12clear_if_dirty with self.rustc(compiler) for Mode::RustcCollins Abitekaniza-0/+1
2018-09-12use stage 1 compiler only for stampsCollins Abitekaniza-8/+8
2018-09-12clear_if_dirty in Builder::cargo with passed modeCollins Abitekaniza-0/+62
2018-09-10Add rustc SHA to released DWARF debuginfoAlex Crichton-2/+6
This commit updates the debuginfo that is encoded in all of our released artifacts by default. Currently it has paths like `/checkout/src/...` but these are a little inconsistent and have changed over time. This commit instead attempts to actually define the file paths in our debuginfo to be consistent between releases. All debuginfo paths are now intended to be `/rustc/$sha` where `$sha` is the git sha of the released compiler. Sub-paths are all paths into the git repo at that `$sha`.
2018-08-20bootstrap: Allow to invoke cargo with the Usage: rustc [OPTIONS] INPUTMichael Woerister-2/+2
Options: -h, --help Display this message --cfg SPEC Configure the compilation environment -L [KIND=]PATH Add a directory to the library search path. The optional KIND can be one of dependency, crate, native, framework or all (the default). -l [KIND=]NAME Link the generated crate(s) to the specified native library NAME. The optional KIND can be one of static, dylib, or framework. If omitted, dylib is assumed. --crate-type [bin|lib|rlib|dylib|cdylib|staticlib|proc-macro] Comma separated list of types of crates for the compiler to emit --crate-name NAME Specify the name of the crate being built --emit [asm|llvm-bc|llvm-ir|obj|metadata|link|dep-info|mir] Comma separated list of types of output for the compiler to emit --print [crate-name|file-names|sysroot|cfg|target-list|target-cpus|target-features|relocation-models|code-models|tls-models|target-spec-json|native-static-libs] Comma separated list of compiler information to print on stdout -g Equivalent to -C debuginfo=2 -O Equivalent to -C opt-level=2 -o FILENAME Write output to <filename> --out-dir DIR Write output to compiler-chosen filename in <dir> --explain OPT Provide a detailed explanation of an error message --test Build a test harness --target TARGET Target triple for which the code is compiled -W, --warn OPT Set lint warnings -A, --allow OPT Set lint allowed -D, --deny OPT Set lint denied -F, --forbid OPT Set lint forbidden --cap-lints LEVEL Set the most restrictive lint level. More restrictive lints are capped at this level -C, --codegen OPT[=VALUE] Set a codegen option -V, --version Print version info and exit -v, --verbose Use verbose output Additional help: -C help Print codegen options -W help Print 'lint' options and default settings --help -v Print the full set of options rustc accepts command.
2018-08-14Add lldb to the buildTom Tromey-0/+1
This optionally adds lldb (and clang, which it needs) to the build. Because rust uses LLVM 7, and because clang 7 is not yet released, a recent git master version of clang is used. The lldb that is used includes the Rust plugin. lldb is only built when asked for, or when doing a nightly build on macOS. Only macOS is done for now due to difficulties with the Python dependency.
2018-08-02rustbuild: fix local_rebuildMarc-Antoine Perennou-1/+1
If we detect a local rebuild (e.g. bootstrap compiler is the same version as target compiler), we set stage to 1. When trying to build e.g. UnstableBook, we use Mode::ToolBootstrap and stage is 1. Just allow Mode::ToolBootstrap and stagge != 0 if we are in a local_rebuild Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2018-07-27Prefer to_string() to format!()ljedrz-1/+1
2018-07-18Rollup merge of #52464 - o01eg:patch-1, r=alexcrichtonkennytm-0/+2
Allow clippy to be installed with make install After #51122 clippy is available as a component but doesn't install when building from source. This PR allows to install clippy with extended tools.
2018-07-18Rollup merge of #52439 - o01eg:fix-52317, r=alexcrichtonkennytm-1/+1
Revert some changes from #51917 to fix custom libdir Should fix #52317 also adds `libdir` value to output.
2018-07-17Allow clippy to be installed with make installO01eg-0/+2
After #51122 clippy is available as a component but don't install when building from source. This PR allows to install clippy with extended tools.
2018-07-16Enable incremental independent of stageMark Rousskov-4/+1
Previously we'd only do so for stage 0 but with keep-stage improvements it seems likely that we'll see more developers working in the stage 1, so we should allow enabling incremental for them. Ideally, the check we probably want is to only enable incremental for the last compiler build scheduled, but there's no good way to do so today. Just enabling incremental in all stages should be sufficient; we may be doing extra work that's needles -- compiling incrementally something that will never be recompiled in-place -- but that should be sufficiently unlikely (i.e., users either don't care or won't be compiling the compiler twice).
2018-07-16Revert some changes from #51917 to fix #52317.O01eg-1/+1
2018-07-12Rollup merge of #52220 - ljedrz:dyn_bootstrap, r=kennytmkennytm-1/+1
Deny bare trait objects in `src/bootstrap` Enforce `#![deny(bare_trait_objects)]` in `src/bootstrap`.
2018-07-11Auto merge of #51230 - nikic:no-verify-lto, r=pnkfelixbors-0/+4
Disable LLVM verification by default Currently -Z no-verify only controls IR verification prior to LLVM codegen, while verification is performed unconditionally both before and after linking with (Thin)LTO. Also wondering what the sentiment is on disabling verification by default (and e.g. only enabling it on ALT builds with assertions). This does not seem terribly useful outside of rustc development and it does seem to show up in profiles (at something like 3%). **EDIT:** A table showing the various configurations and what is enabled when. | Configuration | Dynamic verification performed | LLVM static assertions compiled in | | --- | --- | --- | | alt builds | | yes | | nightly builds | | no | | stable builds | | no | | CI builds | | | | dev builds in a checkout | | |
2018-07-10Deny bare trait objects in `src/bootstrap`.ljedrz-1/+1
2018-07-03Compile stage0 tools with the raw bootstrap compilerAlex Crichton-3/+19
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-22Added stripping current directory prefixes when comparing suite path namesSteven Laabs-0/+6
2018-06-21Auto merge of #50336 - japaric:llvm-tools, r=Mark-Simulacrumbors-0/+1
ship LLVM tools with the toolchain this PR adds llvm-{nm,objcopy,objdump,size} to the rustc sysroot (right next to LLD) this slightly increases the size of the rustc component. I measured these numbers on x86_64 Linux: - rustc-1.27.0-dev-x86_64-unknown-linux-gnu.tar.gz 180M -> 193M (+7%) - rustc-1.27.0-dev-x86_64-unknown-linux-gnu.tar.xz 129M -> 137M (+6%) r? @alexcrichton cc #49584
2018-06-16Move bootstrap tests to the end of the default test runMark Simulacrum-1/+2
Since they are unlikely to fail and are almost never going to fail except with bootstrap changes (which would be tested locally anyway) it makes sense to run these tests close to last.
2018-06-12Add verify-llvm-ir flag to config.tomlNikita Popov-0/+4
2018-06-10Allowing building the codegen backend specifically.kennytm-0/+1
Use `./x.py build src/librustc_codegen_llvm` to build the codegen backend.
2018-06-08Do not require stage 2 compiler for rustdocMark Simulacrum-4/+1
2018-06-03make a llvm-tools rustup componentJorge Aparicio-0/+1
2018-06-03impl is_tool on Mode enumCollins Abitekaniza-2/+2
make is_tool inherent prop of mode fix errors from rebase resolve issues from review
2018-06-03refactor Mode enumCollins Abitekaniza-6/+6
2018-05-31builder.cargo(): don't add "--target"/"--release" to cargo installJohannes Nixdorf-5/+10
This is required to use builder.cargo for cargo-vendor.
2018-05-31bootstrap: pass crt-static for the compiler host as wellJohannes Nixdorf-0/+4
2018-05-30Run rustfmtSantiago Pastorino-490/+756
2018-05-30Add compare-mode to x.pySantiago Pastorino-0/+1
2018-05-28Auto merge of #50892 - davidtwco:issue-50004, r=alexcrichtonbors-2/+2
Added rustdoc documentation to compiler docs. Fixes #50004. r? @alexcrichton (since you reviewed the last PR about compiler docs)
2018-05-20Added rustdoc documentation step outputting into compiler documentation.David Wood-2/+2
2018-05-19Auto merge of #50709 - alexcrichton:revert-musl, r=sfacklerbors-4/+0
Revert #50105 until regression is fixed Discovered at https://github.com/rust-lang/rust/pull/50105#issuecomment-388630750 it looks like this caused a regression with i686 musl, so let's revert in the meantime while a fix is worked out
2018-05-17Rollup merge of #50806 - oli-obk:gesundheit, r=ehussMark Simulacrum-0/+1
Add `bless` x.py subcommand for easy ui test replacement fixes #49815 r? @nikomatsakis
2018-05-17Revert "bootstrap: pass crt-static for the compiler host as well"Alex Crichton-4/+0
This reverts commit ec2b861c2f8013e10ab1f6e01c9aed9ad1daaefe.
2018-05-17Auto merge of #50629 - Mark-Simulacrum:stage-step, r=alexcrichtonbors-5/+4
Switch to bootstrapping from 1.27 It's possible the Float trait could be removed from core, but I couldn't tell whether it was intended to be removed or not. @SimonSapin may be able to comment more here; we can presumably also do that in a follow up PR as this one is already quite large.
2018-05-17Remove MAKEFLAGS to prevent accidental inheritanceMark Simulacrum-5/+4
2018-05-17Fix selftestsOliver Schneider-0/+1
2018-05-17Make `bless` a flag instead of a subcommandOliver Schneider-5/+0
2018-05-17Add `bless` x.py subcommand for easy ui test replacementOliver Schneider-0/+5
2018-05-17Rename trans to codegen everywhere.Irina Popa-1/+1
2018-05-15Ensure libraries built in stage0 have unique metadataJosh Stone-1/+9
Issue #50786 shows a case with local rebuild where the libraries built by stage0 had the same suffix as stage0's own, and were accidentally loaded by that stage0 rustc when compiling `librustc_trans`. Now we set `__CARGO_DEFAULT_LIB_METADATA` to "bootstrap" during stage0, rather than the release channel like usual, so the library suffix will always be completely distinct from the stage0 compiler.
2018-05-11Auto merge of #50105 - mixi:crt-included, r=alexcrichtonbors-0/+4
Use the correct crt*.o files when linking musl targets. This is supposed to support optionally using the system copy of musl libc instead of the included one if supported. This currently only affects the start files, which is enough to allow building rustc on musl targets. Most of the changes are analogous to crt-static. Excluding the start files is something musl based distributions usually patch into their copy of rustc: - https://github.com/alpinelinux/aports/blob/eb064c8/community/rust/musl-fix-linux_musl_base.patch - https://github.com/voidlinux/void-packages/blob/77400fc/srcpkgs/rust/patches/link-musl-dynamically.patch For third-party distributions that not yet carry those patches it would be nice if it was supported without the need to patch upstream sources. ## Reasons ### What breaks? Some start files were missed when originally writing the logic to swap in musl start files (gcc comes with its own start files, which are suppressed by -nostdlib, but not manually included later on). This caused #36710, which also affects rustc with the internal llvm copy or any other system libraries that need crtbegin/crtend. ### How is it fixed? The system linker already has all the logic to decide which start files to include, so we can just defer to it (except of course if it doesn't target musl). ### Why is it optional? In #40113 it was first tried to remove the start files, which broke compiling musl-targeting static binaries with a glibc-targeting compiler. This is why it eventually landed without removing the start files. Being an option side-steps the issue. ### Why are the start files still installed? This has the nice side-effect, that the produced rust-std-* binaries can still be used by on a glibc-targeting system with a rustc built against glibc. ## Does it work? With the following build script (using [musl-cross-make](https://github.com/richfelker/musl-cross-make)): https://shadowice.org/~mixi/rust-musl/build.sh, I was able to cross-compile a musl-host musl-targeting rustc on a glibc-based system. The resulting binaries are at https://shadowice.org/~mixi/rust-musl/binaries/. This also requires #50103 and #50104 (which are also applied to the branch the build script uses).
2018-05-10Auto merge of #50200 - alexcrichton:compile-with-clang, r=kennytmbors-1/+5
Compile LLVM with Clang on release builders Attempting to cache in on some rustc compile time wins mentioned in https://github.com/rust-lang/rust/issues/49879#issuecomment-383602941
2018-05-10Auto merge of #49729 - collin5:b48483, r=Mark-Simulacrumbors-13/+38
./x.py test should be able to run individual tests Allows user to be able to run individual tests by specifying filename i.e `./x.py test src/test/run-pass/foo.rs` Fixes #48483
2018-05-09ci: Compile LLVM with Clang 6.0.0Alex Crichton-1/+5
Currently on CI we predominately compile LLVM with the default system compiler which means gcc on Linux, some version of Clang on OSX, MSVC on Windows, and gcc on MinGW. This commit switches Linux, OSX, and Windows to all use Clang 6.0.0 to build LLVM (aka the C/C++ compiler as part of the bootstrap). This looks to generate faster code according to #49879 which translates to a faster rustc (as LLVM internally is faster) The major changes here were to the containers that build Linux releases, basically adding a new step that uses the previous gcc 4.8 compiler to compile the next Clang 6.0.0 compiler. Otherwise the OSX and Windows scripts have been updated to download precompiled versions of Clang 6 and configure the build to use them. Note that `cc` was updated here to fix using `clang-cl` with `cc-rs` on MSVC, as well as an update to `sccache` on Windows which was needed to correctly work with `clang-cl`. Finally the MinGW compiler is entirely left out here intentionally as it's currently thought that Clang can't generate C++ code for MinGW and we need to use gcc, but this should be verified eventually.