about summary refs log tree commit diff
path: root/src/bootstrap/builder.rs
AgeCommit message (Collapse)AuthorLines
2018-03-04Auto merge of #48630 - alexcrichton:more-sccache, r=kennytmbors-5/+22
rustbuild: Pass `ccache` to build scripts This is a re-attempt at #48192 hopefully this time with 100% less randomly [blocking builds for 20 minutes][block]. To work around #48192 the sccache server is started in the `run.sh` script very early on in the compilation process. [block]: https://github.com/rust-lang/rust/issues/48192
2018-03-03rust: Import LLD for linking wasm objectsAlex Crichton-1/+1
This commit imports the LLD project from LLVM to serve as the default linker for the `wasm32-unknown-unknown` target. The `binaryen` submoule is consequently removed along with "binaryen linker" support in rustc. Moving to LLD brings with it a number of benefits for wasm code: * LLD is itself an actual linker, so there's no need to compile all wasm code with LTO any more. As a result builds should be *much* speedier as LTO is no longer forcibly enabled for all builds of the wasm target. * LLD is quickly becoming an "official solution" for linking wasm code together. This, I believe at least, is intended to be the main supported linker for native code and wasm moving forward. Picking up support early on should help ensure that we can help LLD identify bugs and otherwise prove that it works great for all our use cases! * Improvements to the wasm toolchain are currently primarily focused around LLVM and LLD (from what I can tell at least), so it's in general much better to be on this bandwagon for bugfixes and new features. * Historical "hacks" like `wasm-gc` will soon no longer be necessary, LLD will [natively implement][gc] `--gc-sections` (better than `wasm-gc`!) which means a postprocessor is no longer needed to show off Rust's "small wasm binary size". LLD is added in a pretty standard way to rustc right now. A new rustbuild target was defined for building LLD, and this is executed when a compiler's sysroot is being assembled. LLD is compiled against the LLVM that we've got in tree, which means we're currently on the `release_60` branch, but this may get upgraded in the near future! LLD is placed into rustc's sysroot in a `bin` directory. This is similar to where `gcc.exe` can be found on Windows. This directory is automatically added to `PATH` whenever rustc executes the linker, allowing us to define a `WasmLd` linker which implements the interface that `wasm-ld`, LLD's frontend, expects. Like Emscripten the LLD target is currently only enabled for Tier 1 platforms, notably OSX/Windows/Linux, and will need to be installed manually for compiling to wasm on other platforms. LLD is by default turned off in rustbuild, and requires a `config.toml` option to be enabled to turn it on. Finally the unstable `#![wasm_import_memory]` attribute was also removed as LLD has a native option for controlling this. [gc]: https://reviews.llvm.org/D42511
2018-03-04Rollup merge of #48664 - Keruspe:codegen, r=alexcrichtonkennytm-1/+1
make codegen-backends directory name configurable This allows to parallel-install several versions of rust system-wide Fixes #48263
2018-03-02make codegen-backends directory name configurableMarc-Antoine Perennou-1/+1
This allows to parallel-install several versions of rust system-wide Fixes #48263 Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2018-03-01rustbuild: Pass `ccache` to build scriptsAlex Crichton-5/+22
This is a re-attempt at #48192 hopefully this time with 100% less randomly [blocking builds for 20 minutes][block]. To work around #48192 the sccache server is started in the `run.sh` script very early on in the compilation process. [block]: https://github.com/rust-lang/rust/issues/48192
2018-03-01Rollup merge of #48405 - kennytm:autotoolstate-follow-up, r=Mark-SimulacrumManish Goregaokar-2/+4
Auto-toolstate management follow-up. Tracking comment: https://github.com/rust-lang/rust/issues/45861#issuecomment-367302777 * Fixed rust-lang-nursery/rust-toolstate#1, a proper link to the PR will be included. * Fixed rust-lang-nursery/rust-toolstate#2, a comment will be posted to the PR if the toolstate changed * Toolstate regression will be rejected at the last week of the 6-week cycle (currently entirely date-based). * Implemented https://internals.rust-lang.org/t/the-current-submodule-setup-is-not-tenable/6593, moved doc tests of Nomicon, Reference, Rust-by-Example and The Book to the "tools" job and thus allowed to fail like other external tools.
2018-02-25Rollup merge of #48517 - penpalperson:master, r=Mark-Simulacrumkennytm-0/+3
Added error-format flag to x.py. Fixes #48475 r? @Mark-Simulacrum
2018-02-24Added error-format flag to x.py.penpalperson-0/+3
2018-02-23Split test::Docs into one Step for each book.kennytm-2/+4
The *.md at the root directory in src/doc are no longer tested, but this should be fine since all files there are deprecated.
2018-02-19rustbuild: make libdir_relative a methodJosh Stone-3/+4
2018-02-19rustbuild: Restore Config.libdir_relativeJosh Stone-2/+2
This re-introduces a `Config.libdir_relative` field, now derived from `libdir` and made relative to `prefix` if necessary. This fixes a regression from #46592 when `--libdir` is given an absolute path. `Builder::sysroot_libdir` should always use a relative path so its callers don't clobber system locations, and `librustc` also asserts that `CFG_LIBDIR_RELATIVE` is really relative.
2018-02-16Fix panic when `x.py` is called without any arguments.kennytm-2/+4
2018-02-15Consider paths passed to x.py to be root-relative.Mark Simulacrum-0/+4
We'd previously assumed that these paths would be relative to the src dir, and that for example our various CI scripts would, when calling x.py, use `../x.py build ../src/tools/...` but this isn't the case -- they use `../x.py` without using the relevant source-relative path. We eventually may want to make this (actually somewhat logical) change, but this is not that time.
2018-02-15Prevent silently ignoring unmatched pathsMark Simulacrum-1/+1
Primarily for CI purposes; this is intended to avoid cases where we update rustbuild and unintentionally make CI stop running some builds to the arguments being passed no longer applying for some reason.
2018-02-15Auto merge of #48105 - Mark-Simulacrum:exclude-paths, r=alexcrichtonbors-23/+99
Implement excluding a build-step via --exclude First step to fixing https://github.com/rust-lang/rust/issues/47911. This doesn't change any CI configuration, but implements what I believe necessary to make that feasible in rustbuild. In theory this should be sufficient to allow someone to open a PR against .travis.yml and appveyor.yml which splits the Windows 32-bit tests and maybe the OS X tests into multiple builders (depending on what our cost-concerns are) to reduce runtimes. r? @alexcrichton cc @kennytm
2018-02-15Revert "rustbuild: Pass `ccache` to build scripts"Alex Crichton-22/+5
This reverts commit 64a8730e171367e4979cd9c25f0e0fdc2c157446.
2018-02-13Fix default Steps without paths.Mark Simulacrum-5/+10
Some Steps are by-default run but don't have any paths associated with them. We need to have at least one PathSet per each Step, though, so we add an empty one on calls to `never()`.
2018-02-11Change Step to be invoked with a path when in default mode.Mark Simulacrum-40/+85
Previously, a Step would be able to tell on its own when it was invoked "by-default" (that is, `./x.py test` was called instead of `./x.py test some/path`). This commit replaces that functionality, invoking each Step with each of the paths it has specified as "should be invoked by." For example, if a step calls `path("src/tools/cargo")` and `path("src/doc/cargo")` then it's make_run will be called twice, with "src/tools/cargo" and "src/doc/cargo." This makes it so that default handling logic is in builder, instead of spread across various Steps. However, this meant that some Step specifications needed to be updated, since for example `rustdoc` can be built by `./x.py build src/librustdoc` or `./x.py build src/tools/rustdoc`. A `PathSet` abstraction is added that handles this: now, each Step can not only list `path(...)` but also `paths(&[a, b, ...])` which will make it so that we don't invoke it with each of the individual paths, instead invoking it with the first path in the list (though this shouldn't be depended on). Future work likely consists of implementing a better/easier way for a given Step to work with "any" crate in-tree, especially those that want to run tests, build, or check crates in the std, test, or rustc crate trees. Currently this is rather painful to do as most of the logic is duplicated across should_run and make_run. It seems likely this can be abstracted away into builder somehow.
2018-02-10Remove DontDistWithMiri struct and instead just directly check it in builderMark Simulacrum-2/+7
2018-02-10Implement excluding a build-step via --excludeMark Simulacrum-5/+26
2018-02-11Rollup merge of #48120 - matthiaskrgr:typos_src_1, r=alexcrichtonkennytm-1/+1
fix typos in src/{bootstrap,ci,etc,lib{backtrace,core,fmt_macros}} via codespell
2018-02-10fix typos in src/{bootstrap,ci,etc,lib{backtrace,core,fmt_macros}}Matthias Krüger-1/+1
2018-02-10Rollup merge of #48059 - alexcrichton:sccachebs, r=Mark-Simulacrumkennytm-5/+22
rustbuild: Pass `ccache` to build scripts Right now the ccache setting is only used for LLVM, but this tweaks it to also be used for build scripts so C++ builds like `librustc_llvm` can be a bit speedier.
2018-02-08rustbuild: Pass `ccache` to build scriptsAlex Crichton-5/+22
Right now the ccache setting is only used for LLVM, but this tweaks it to also be used for build scripts so C++ builds like `librustc_llvm` can be a bit speedier.
2018-02-08Add tests for themesGuillaume Gomez-1/+1
2018-02-03Disable ThinLTO for dist builds.Mark Simulacrum-6/+15
Dist builds should always be as fast as we can make them, and since those run on CI we don't care quite as much for the build being somewhat slower. As such, we don't automatically enable ThinLTO on builds for the dist builders.
2018-01-31rustc: Move location of `codegen-backends` dirAlex Crichton-0/+5
Right now this directory is located under: $sysroot/lib/rustlib/$target/lib/codegen-backends but after seeing what we do in a few other places it seems that a more appropriate location would be: $sysroot/lib/rustlib/$target/codegen-backends so this commit moves it!
2018-01-29Add per-stage RUSTFLAGS: RUSTFLAGS_STAGE_{0,1,2} and RUSTFLAGS_STAGE_NOT_0Mark Simulacrum-0/+12
Fixes #47658.
2018-01-23Add ./x.py check src/{libstd,libtest,rustc}.Mark Simulacrum-10/+13
This currently only supports a limited subset of the full compilation, but is likely 90% of what people will want and is possible without building a full compiler (i.e., running LLVM). In theory, this means that contributors who don't want to build LLVM now have an easy way to compile locally, though running tests won't work.
2018-01-18Auto merge of #47528 - GuillaumeGomez:rollup, r=GuillaumeGomezbors-2/+5
Rollup of 6 pull requests - Successful merges: #47250, #47313, #47398, #47468, #47471, #47520 - Failed merges:
2018-01-17Update Cargo and its dependenciesAlex Crichton-0/+33
This'll probably have a bunch of build errors, so let's try and head those off and find them sooner rather than later!
2018-01-17Rollup merge of #47250 - GuillaumeGomez:test-rustdoc-js, r=Mark-SimulacrumGuillaume Gomez-2/+5
Test rustdoc js Add tests for the rustdoc search. It was heavily required because of all the recent breaking changes that happened while I went through improvements in doc search (add search in/for generic search for example).
2018-01-15Auto merge of #46196 - projektir:rbe-submodule, r=steveklabnikbors-1/+1
Adding RBE as a submodule #46194 Adding RBE as a submodule to start issue #46194.
2018-01-13Adding RBE as a submodule #46194projektir-1/+1
2018-01-12End of rustdoc-js tool add into builderGuillaume Gomez-1/+2
2018-01-12Move forward to add rustdoc testGuillaume Gomez-1/+3
2018-01-12Remove unused configuration parameter `libdir_relative`.O01eg-2/+2
2018-01-12Add library path for real rustdoc with `RUSTDOC_LIBDIR` environment variable.O01eg-1/+4
2018-01-12Stage 1 and later use relative libdir.O01eg-1/+1
2018-01-04rustc: Don't use relative paths for extended errorsAlex Crichton-2/+2
These no longer work now that Cargo changes the cwd of rustc while it's running. Instead use an absolute path that's set by rustbuild.
2018-01-04Bump to 1.25.0Alex Crichton-1/+2
* Bump the release version to 1.25 * Bump the bootstrap compiler to the recent beta * Allow using unstable rustdoc features on beta - this fix has been applied to the beta branch but needed to go to the master branch as well.
2017-12-14Do not produce debuginfo for toolsOliver Schneider-2/+5
2017-12-06Update miri to rustc changesOliver Schneider-28/+67
2017-09-23Remove leftoverbjorn3-6/+0
2017-09-23Move NoLlvmMetadataLoader to rustc_trans_traitsbjorn3-0/+3
2017-09-23Dont do no-trans for llvm enabled buildsbjorn3-0/+6
2017-09-23Allow building stage 2 compiler librariesbjorn3-1/+1
2017-09-19Add clippy to `toolstate.toml`Oliver Schneider-1/+1
2017-09-18Auto merge of #43628 - oli-obk:orbital_standard_library, r=alexcrichtonbors-3/+4
Run the miri test suite on the aux builder and travis Reopen of #38350 see https://github.com/rust-lang/rust/pull/43340#issuecomment-316940762 for earlier discussion Rationale for running miri's test suite in rustc's CI is that miri currently contains many features that we want in const eval in the future, and these features would break if the test suite is not run. fixes #44077 r? @nikomatsakis cc @eddyb
2017-09-17Prevent distribution if miri is enabledOliver Schneider-1/+1