summary refs log tree commit diff
path: root/src/bootstrap/config.rs
AgeCommit message (Collapse)AuthorLines
2018-03-30Handle fast-submodules option correctlyPetr Hosek-0/+4
This option was introduced in 72cb109bec8, but it uses two different spellings (fast-submodule vs fast-submodules) and isn't handled by Rust bootstrap which means that any attempt to set this flag fails.
2018-03-20ci: Print out how long each step takes on CIAlex Crichton-0/+3
This commit updates CI configuration to inform rustbuild that it should print out how long each step takes on CI. This'll hopefully allow us to track the duration of steps over time and follow regressions a bit more closesly (as well as have closer analysis of differences between two builds). cc #48829
2018-03-16Rollup merge of #48892 - alexcrichton:thinlto-again, r=Mark-Simulacrumkennytm-5/+0
rustbuild: Remove ThinLTO-related configuration This commit removes some ThinLTO/codegen unit cruft primarily only needed during the initial phase where we were adding ThinLTO support to rustc itself. The current bootstrap compiler knows about ThinLTO and has it enabled by default for multi-CGU builds which are also enabled by default. One CGU builds (aka disabling ThinLTO) can be achieved by configuring the number of codegen units to 1 for a particular builds. This also changes the defaults for our dist builders to go back to multiple CGUs. Unfortunately we're seriously bleeding for cycle time on the bots right now so we need to recover any time we can.
2018-03-12Auto merge of #48295 - Keruspe:master, r=alexcrichtonbors-1/+3
rustbuild: pass datadir to rust-installer This fixes zsh completion install when $datadir != $prefix/share
2018-03-09rustbuild: Remove ThinLTO-related configurationAlex Crichton-5/+0
This commit removes some ThinLTO/codegen unit cruft primarily only needed during the initial phase where we were adding ThinLTO support to rustc itself. The current bootstrap compiler knows about ThinLTO and has it enabled by default for multi-CGU builds which are also enabled by default. One CGU builds (aka disabling ThinLTO) can be achieved by configuring the number of codegen units to 1 for a particular builds. This also changes the defaults for our dist builders to go back to multiple CGUs. Unfortunately we're seriously bleeding for cycle time on the bots right now so we need to recover any time we can.
2018-03-08Refactor run_host_only to have the proper effect.Mark Simulacrum-1/+1
Previously it was set to true when we didn't run HOSTS steps.
2018-03-08bootstrap: pass datadir to rust-installerMarc-Antoine Perennou-1/+3
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2018-03-03rust: Import LLD for linking wasm objectsAlex Crichton-0/+4
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-02make codegen-backends directory name configurableMarc-Antoine Perennou-0/+5
This allows to parallel-install several versions of rust system-wide Fixes #48263 Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2018-02-25Rollup merge of #48517 - penpalperson:master, r=Mark-Simulacrumkennytm-0/+2
Added error-format flag to x.py. Fixes #48475 r? @Mark-Simulacrum
2018-02-24Added error-format flag to x.py.penpalperson-0/+2
2018-02-19rustbuild: make libdir_relative a methodJosh Stone-18/+12
2018-02-19rustbuild: Restore Config.libdir_relativeJosh Stone-0/+17
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-10Implement excluding a build-step via --excludeMark Simulacrum-0/+2
2018-02-05Add build.tools option to manage installation of extended rust tools.O01eg-1/+4
2018-02-03Disable ThinLTO for dist builds.Mark Simulacrum-0/+5
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-30Add wasm_syscall feature to build systemDiggory Blake-0/+3
2018-01-28rustc: Split Emscripten to a separate codegen backendAlex Crichton-0/+9
This commit introduces a separately compiled backend for Emscripten, avoiding compiling the `JSBackend` target in the main LLVM codegen backend. This builds on the foundation provided by #47671 to create a new codegen backend dedicated solely to Emscripten, removing the `JSBackend` of the main codegen backend in the process. A new field was added to each target for this commit which specifies the backend to use for translation, the default being `llvm` which is the main backend that we use. The Emscripten targets specify an `emscripten` backend instead of the main `llvm` one. There's a whole bunch of consequences of this change, but I'll try to enumerate them here: * A *second* LLVM submodule was added in this commit. The main LLVM submodule will soon start to drift from the Emscripten submodule, but currently they're both at the same revision. * Logic was added to rustbuild to *not* build the Emscripten backend by default. This is gated behind a `--enable-emscripten` flag to the configure script. By default users should neither check out the emscripten submodule nor compile it. * The `init_repo.sh` script was updated to fetch the Emscripten submodule from GitHub the same way we do the main LLVM submodule (a tarball fetch). * The Emscripten backend, turned off by default, is still turned on for a number of targets on CI. We'll only be shipping an Emscripten backend with Tier 1 platforms, though. All cross-compiled platforms will not be receiving an Emscripten backend yet. This commit means that when you download the `rustc` package in Rustup for Tier 1 platforms you'll be receiving two trans backends, one for Emscripten and one that's the general LLVM backend. If you never compile for Emscripten you'll never use the Emscripten backend, so we may update this one day to only download the Emscripten backend when you add the Emscripten target. For now though it's just an extra 10MB gzip'd. Closes #46819
2018-01-12Remove unused configuration parameter `libdir_relative`.O01eg-2/+0
2018-01-12Fix #45345.O01eg-0/+1
Re-implement ```bash CFG_LIBDIR_RELATIVE=`echo ${CFG_LIBDIR} | cut -c$((${#CFG_PREFIX}+${CAT_INC}))-` ``` from old `configure` script.
2017-12-27Revert "Add a file to trivially disable tool building or testing"kennytm-15/+0
This reverts commit ab018c76e14b87f3c9e0b7384cc9b02d94779cd5. This also adds the `ToolBuild::is_ext_tool` field to replace the previous `ToolBuild::expectation` field, to indicate whether a build-failure of certain tool is essential.
2017-12-17Add sync module to rustc_data_structuresJohn Kåre Alsaker-0/+3
2017-12-03Record build and test result of extended tools into toolstates.json.kennytm-0/+4
2017-11-25rustbuild: Enable WebAssembly backend by defaultAlex Crichton-2/+3
This commit alters how we compile LLVM by default enabling the WebAssembly backend. This then also adds the wasm32-unknown-unknown target to get compiled on the `cross` builder and distributed through rustup. Tests are not yet enabled for this target but that should hopefully be coming soon!
2017-11-11Disable LLVM assertions on Nightly, enable them in "alt" builds.Simon Sapin-1/+1
2017-10-26config.toml: Add stubs for recognized-but-unused install pathsJosh Stone-0/+5
... specifically `datadir`, `infodir`, and `localstatedir`. These were already accepted by `configure.py`, but it didn't have any place to put the values.
2017-10-20rustbuild: Compile rustc with ThinLTOAlex Crichton-4/+3
This commit enables ThinLTO for the compiler as well as multiple codegen units. This is intended to get the benefits of parallel codegen while also avoiding any major loss of perf. Finally this commit is also intended as further testing for #45320 and shaking out bugs.
2017-10-16bootstrap: update and enable the LLVM version-checkJosh Stone-0/+1
While the `config.toml.example` comments say "we automatically check the version by default," we actually didn't. That check was badly out of date, only allowing 3.5, 3.6, or 3.7. This it now updated to the new 3.9 minimum requirement, and truly enabled by default.
2017-10-15rustbuild: Support specifying archiver and linker explicitlyVadim Petrochenkov-1/+7
2017-10-09cleanup: rustc doesn't use an external archiverVadim Petrochenkov-3/+0
2017-09-17Add a file to trivially disable tool building or testingOliver Schneider-0/+15
2017-09-17Get the miri test suite to run inside the rustc dev environmentOliver Schneider-0/+4
2017-08-28use an optional bool to keep track of ignore-git setting, if not specified ↵Jeremy Sorensen-1/+5
by the end, use the channel to determine its value
2017-08-27rustbuild: Rewrite the configure script in PythonAlex Crichton-252/+51
This commit rewrites our ancient `./configure` script from shell into Python. The impetus for this change is to remove `config.mk` which is just a vestige of the old makefile build system at this point. Instead all configuration is now solely done through `config.toml`. The python script allows us to more flexibly program (aka we can use loops easily) and create a `config.toml` which is based off `config.toml.example`. This way we can preserve comments and munge various values as we see fit. It is intended that the configure script here is a drop-in replacement for the previous configure script, no functional change is intended. Also note that the rationale for this is also because our build system requires Python, so having a python script a bit earlier shouldn't cause too many problems. Closes #40730
2017-08-22Introduce crt_static target option in config.tomlSamuel Holland-0/+3
This controls the value of the crt-static feature used when building the standard library for a target, as well as the compiler itself when that target is the host.
2017-08-13Correct code to not run host-only tests.Mark Simulacrum-0/+6
2017-08-13Add ability to ignore git when building rust.Mark Simulacrum-0/+4
Some users of the build system change the git sha on every build due to utilizing git to push changes to a remote server. This allows them to simply configure that away instead of depending on custom patches to rustbuild.
2017-08-13Allow overriding build triple via flag.Mark Simulacrum-1/+5
We first check the configuration, then passed parameters (--build), then fall back to the auto-detection that bootstrap.py does. Fixes #39673.
2017-08-13Allow specifiying targets and hosts not in the config file.Mark Simulacrum-10/+0
We no longer care about the source of this information, so there is no reason to restrict users.
2017-08-13Unify flags into config.Mark Simulacrum-12/+55
This introduces a slight change in behavior, where we unilaterally respect the --host and --target parameters passed for all sanity checking and runtime configuration.
2017-08-11Move config.toml.example to the root dirSteven Fackler-1/+1
It's way more discoverable here.
2017-08-11Build support for no llvmbjorn3-0/+4
2017-07-30rustbuild: Remove `--enable-llvm-clean-rebuild`Alex Crichton-4/+0
This was intended for bots back in the day where we'd persist caches of LLVM builds across runs, but nowadays we don't do that on any of the bots so this option is no longer necessary
2017-07-24Add a disabled builder for aarch64 emulated testsAlex Crichton-0/+5
This commit adds a disabled builder which will run all tests for the standard library for aarch64 in a QEMU instance. Once we get enough capacity to run this on Travis this can be used to boost our platform coverage of AArch64
2017-07-20Use a single line for serde annotations.Mark Simulacrum-14/+7
2017-07-20Utilize interning to allow Copy/Clone stepsMark Simulacrum-48/+41
2017-07-20Update to toml 0.4Mark Simulacrum-31/+33
2017-07-04Clarify meaning of Build.cargo, Build.rustc.Mark Simulacrum-6/+20
Rename Build.{cargo, rustc} to {initial_cargo, initial_rustc}.
2017-07-04Clippy lintsMark Simulacrum-1/+1
2017-07-04Clean up and restructure sanity checking.Mark Simulacrum-0/+1