summary refs log tree commit diff
path: root/src/bootstrap/bootstrap.py
AgeCommit message (Collapse)AuthorLines
2018-01-28rustc: Split Emscripten to a separate codegen backendAlex Crichton-7/+16
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-23Add ./x.py check src/{libstd,libtest,rustc}.Mark Simulacrum-0/+1
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-17Update Cargo and its dependenciesAlex Crichton-5/+0
This'll probably have a bunch of build errors, so let's try and head those off and find them sooner rather than later!
2017-10-31bootstrap: Add missing cputype matching for sparc64John Paul Adrian Glaubitz-1/+1
2017-10-19Allow passing a path with tildetopecongiro-1/+1
2017-10-17bootstrap: Avoid fetching jemalloc if it's disabledTatsuyuki Ishi-1/+2
Fix #45300
2017-10-16Merge branch 'master' into future_importsjohnthagen-1/+2
2017-10-11Merge branch 'master' into pep8-bootstrapjohnthagen-1/+1
2017-10-09Add __future__ imports to increase compatibility with Python 3. Derive ↵johnthagen-1/+1
Option from object to make it a new-style class for Python 3 compatibility.
2017-10-08Fix PEP8 style issues in bootstrap codejohnthagen-0/+1
2017-10-08Use identity operator `is` when comparing to Nonejohnthagen-1/+1
2017-09-21Catch IOErrorMarcus Buffett-1/+1
If config.toml doesn't exist, then an IOError will be raised on the `with open(...)` line. Prior to e788fa7, this was caught because the `except` clause didn't specify what exceptions it caught, so both IOError and OSError were caught
2017-09-17bootstrap: plumb verbosity into submodule opsTamir Duberstein-3/+2
Fix some lints while I'm here.
2017-09-02Remove invalid doctest from bootstrap.py.kennytm-4/+0
Make sure that if the test is failed, the CI will stop the build.
2017-08-27rustbuild: Rewrite the configure script in PythonAlex Crichton-187/+149
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-07-25bootstrap: Major refactoringMilton Mazzarri-201/+305
This commit includes the following: * Fix syntax errors in Python 3 * Include more docstrings in classes, methods, and functions * Include unit tests using `unittest` * Merge implementation of `{rustc,cargo}_out_of_date` * Merge implementation of `RustBuild.{cargo,rustc}` * Remove unnecessary source code * Move all the attributes defined outside of `__init__` * Remove remaining `%s` from print function * Remove `WindowsError` reference on non-windows systems * Rename some variables to be more explicit avoid their meaning * Run bootstrap tests in the CI process * Remove non-pythonic getters * Remove duplicate code in `download_stage0` method * Reduce the number of branches in `build_bootstrap` method * Re-raise exception when we cannot execute uname in non-windows systems * Avoid long lines
2017-07-21rustbuild: Fix the --build argument to bootstrap.pySegev Finer-1/+2
This makes the --build argument also apply for the downloading of the stage0 toolchain and building rustbuild. Fixes #42116
2017-07-05Switch to rust-lang-nursery/compiler-builtinsAlex Crichton-1/+1
This commit migrates the in-tree `libcompiler_builtins` to the upstream version at https://github.com/rust-lang-nursery/compiler-builtins. The upstream version has a number of intrinsics written in Rust and serves as an in-progress rewrite of compiler-rt into Rust. Additionally it also contains all the existing intrinsics defined in `libcompiler_builtins` for 128-bit integers. It's been the intention since the beginning to make this transition but previously it just lacked the manpower to get done. As this PR likely shows it wasn't a trivial integration! Some highlight changes are: * The PR rust-lang-nursery/compiler-builtins#166 contains a number of fixes across platforms and also some refactorings to make the intrinsics easier to read. The additional testing added there also fixed a number of integration issues when pulling the repository into this tree. * LTO with the compiler-builtins crate was fixed to link in the entire crate after the LTO process as these intrinsics are excluded from LTO. * Treatment of hidden symbols was updated as previously the `#![compiler_builtins]` crate would mark all symbol *imports* as hidden whereas it was only intended to mark *exports* as hidden.
2017-07-01Simplify print argumentsMilton Mazzarri-1/+1
2017-06-30bootstrap: Fix some PEP8 issuesMilton Mazzarri-19/+34
This commit also adds a few missing docstrings
2017-06-21Pass path to python from bootstrap.py to bootstrap.rsStepan Koltsov-0/+1
When bootstrap is executed with python not in `$PATH`, (e. g. `c:\Python27\python.exe x.py test`) bootstrap cannot find python and crashes. This commit passes path to python in `BOOTSTRAP_PYTHON` env var.
2017-06-19Bump version and stage0 compilerAlex Crichton-0/+1
2017-05-25bootstrap.py: support verbose for submodulesTatsuyuki Ishi-3/+3
2017-05-25bootstrap.py: decode to strTatsuyuki Ishi-11/+10
Also, improve the split mechanism to address space in paths.
2017-05-25bootstrap.py: Filter instead of iterationTatsuyuki Ishi-9/+8
2017-05-25Format bootstrap.py using autopep8Tatsuyuki Ishi-35/+59
2017-05-25Use the improved submodule handlingTatsuyuki Ishi-48/+18
2017-05-24bootstrap: Use common run() function to call cargoDennis Schridde-18/+12
This brings verbosity even to invocation of cargo itself
2017-05-24bootstrap: Make bootstrap verbose if requestedDennis Schridde-0/+4
Fixes: #42099
2017-05-24bootstrap: Actually respect verbosity setting in config.tomlDennis Schridde-0/+5
2017-05-18Fix x.pySimonas Kazlauskas-3/+4
2017-05-17Reset submodule management to what master doesAlex Crichton-19/+50
Basically just translate what's done on master in Rust to Python here.
2017-05-18Move submodule initialization to bootstrap.pyTatsuyuki Ishi-3/+36
2017-04-30Rename os variable in bootstrap.py to avoid shadowing os module.Titus Barik-2/+2
2017-04-29Update stage0 bootstrap compilerAlex Crichton-17/+27
We've got a freshly minted beta compiler, let's update to use that on nightly! This has a few other changes associated with it as well * A bump to the rustc version number (to 1.19.0) * Movement of the `cargo` and `rls` submodules to their "proper" location in `src/tools/{cargo,rls}`. Now that Cargo workspaces support the `exclude` option this can work. * Updates of the `cargo` and `rls` submodules to their master branches. * Tweak to the `src/stage0.txt` format to be more amenable for Cargo version numbers. On the beta channel Cargo will bootstrap from a different version than rustc (e.g. the version numbers are different), so we need different configuration for this. * Addition of `dev` as a readable key in the `src/stage0.txt` format. If present then stage0 compilers are downloaded from `dev-static.rust-lang.org` instead of `static.rust-lang.org`. This is added to accomodate our updated release process with Travis and AppVeyor.
2017-04-26Rollup merge of #41456 - jessicah:haiku-support, r=alexcrichtonAriel Ben-Yehuda-0/+3
Haiku: fix initial platform support
2017-04-26Rollup merge of #41370 - malbarbo:android-bootstrap, r=alexcrichtonAriel Ben-Yehuda-6/+16
Add bootstrap support for android
2017-04-24Haiku: add missing cases of using LIBRARY_PATHJessica Hamilton-0/+3
2017-04-18Add bootstrap support for androidMarco A L Barbosa-6/+16
2017-04-17bootstrap: Don't workaround uname -m on DarwinRicho Healey-8/+0
This no longer manifests on any versions of OSX that I could find.
2017-04-08Rollup merge of #41152 - cuviper:bootstrap-armv7, r=japaricTim Neumann-2/+2
bootstrap.py: fix armv7 detection This matches the logic that was in `./configure` before f8ca805422db8.
2017-04-07bootstrap.py: fix armv7 detectionJosh Stone-2/+2
This matches the logic that was in `./configure` before f8ca805422db8.
2017-04-06Auto merge of #41102 - frewsxcv:rollup, r=frewsxcvbors-2/+5
Rollup of 5 pull requests - Successful merges: #40908, #41011, #41026, #41037, #41050 - Failed merges:
2017-04-02Finish the improvements I planned.Nathan Stocks-2/+3
- No more manual args manipulation -- getopts used for everything. As a result, options can be in any position, now, even before the subcommand. - The additional options for test, bench, and dist now appear in the help output. - No more single-letter variable bindings used internally for large scopes. - Don't output the time measurement when just invoking 'x.py' - Logic is now much more linear. We build strings up, and then print them.
2017-03-30Don't print build statistics if we explicitly asked for the help message.Nathan Stocks-2/+4
2017-03-30Fix stage0->stage1 build when using "pthreads" mingw compiler.Vadim Chugunov-1/+10
2017-03-29rustbuild: Update bootstrap compilerAlex Crichton-12/+5
Now that we've also updated cargo's release process this commit also changes the download location of Cargo from Cargos archives back to the static.r-l.o archives. This should ensure that the Cargo download is the exact Cargo paired with the rustc that we release.
2017-03-11configure: Remove --build detectionAlex Crichton-4/+19
This commit removes detection of CFG_OSTYPE and CFG_CPUTYPE from the configure script, which means that the default value of `--build` is no longer present in the configure script. All this logic is now available in rustbuild itself, so there's no need to duplicate it.
2017-03-10Support armhf abi on 64-bit ARM cpusXimin Luo-1/+1
They report their `uname -m` as armv8l rather than aarch64. Patch originally by Matthias Klose <doko@debian.org>
2017-03-04bootstrap.py: Report build statusVadim Petrochenkov-6/+15
Move some code from x.py to bootstrap.py