about summary refs log tree commit diff
path: root/src/bootstrap/lib.rs
AgeCommit message (Collapse)AuthorLines
2017-02-08sanitizer supportJorge Aparicio-1/+6
2017-02-07Rollup merge of #39400 - alexcrichton:arm-cross-test, r=brsonCorey Farwell-0/+11
Add support for test suites emulated in QEMU This commit adds support to the build system to execute test suites that cannot run natively but can instead run inside of a QEMU emulator. A proof-of-concept builder was added for the `arm-unknown-linux-gnueabihf` target to show off how this might work. In general the architecture is to have a server running inside of the emulator which a local client connects to. The protocol between the server/client supports compiling tests on the host and running them on the target inside the emulator. Closes #33114
2017-02-02Build libbacktrace/jemalloc only when their timestamps are older than sourcesVadim Petrochenkov-17/+3
2017-02-02rustbuild: Build jemalloc and libbacktrace only once (take 2)Vadim Petrochenkov-2/+8
2017-01-29Add support for test suites emulated in QEMUAlex Crichton-0/+11
This commit adds support to the build system to execute test suites that cannot run natively but can instead run inside of a QEMU emulator. A proof-of-concept builder was added for the `arm-unknown-linux-gnueabihf` target to show off how this might work. In general the architecture is to have a server running inside of the emulator which a local client connects to. The protocol between the server/client supports compiling tests on the host and running them on the target inside the emulator. Closes #33114
2017-01-24rustbuild: Start building --enable-extendedAlex Crichton-0/+4
This commit adds a new flag to the configure script, `--enable-extended`, which is intended for specifying a desire to compile the full suite of Rust tools such as Cargo, the RLS, etc. This is also an indication that the build system should create combined installers such as the pkg/exe/msi artifacts. Currently the `--enable-extended` flag just indicates that combined installers should be built, and Cargo is itself not compiled just yet but rather only downloaded from its location. The intention here is to quickly get to feature parity with the current release process and then we can start improving it afterwards. All new files in this PR inside `src/etc/installer` are copied from the rust-packaging repository.
2017-01-01Auto merge of #38736 - xen0n:save-the-save-analysis, r=alexcrichtonbors-1/+10
rustbuild: save the save analysis Fixes #38734. ~~call me the nightly firefighter~~ r? @alexcrichton
2016-12-31rustbuild: fix save-analysis not being saved for 2-stage buildsWang Xuerui-4/+5
2016-12-31rustbuild: check if compiler is final stage wrt the full bootstrap settingWang Xuerui-0/+8
2016-12-30rustbuild: Compile all support tools in stage0Alex Crichton-2/+10
This commit changes all tools and such to get compiled in stage0, not in later stages. The purpose of this commit is to cut down dependencies on later stages for future modifications to the build system. Notably we're going to be adding builders that produce a full suite of cross-compiled artifacts for a particular host, and that shouldn't compile the `x86_64-unknown-linux-gnu` compiler more than once. Currently dependencies on, for example, the error index end up compiling the `x86_64-unknown-linux-gnu` compiler more than necessary. As a result here we move many dependencies on these tools to being produced by a stage0 compiler, not a stage1+ compiler. None of these tools actually need to be staged at all, so they'll exhibit consistent behavior across the stages.
2016-12-28rustbuild: Compile rustc twice, not thriceAlex Crichton-3/+25
This commit switches the rustbuild build system to compiling the compiler twice for a normal bootstrap rather than the historical three times. Rust is a bootstrapped language which means that a previous version of the compiler is used to build the next version of the compiler. Over time, however, we change many parts of compiler artifacts such as the metadata format, symbol names, etc. These changes make artifacts from one compiler incompatible from another compiler. Consequently if a compiler wants to be able to use some artifacts then it itself must have compiled the artifacts. Historically the rustc build system has achieved this by compiling the compiler three times: * An older compiler (stage0) is downloaded to kick off the chain. * This compiler now compiles a new compiler (stage1) * The stage1 compiler then compiles another compiler (stage2) * Finally, the stage2 compiler needs libraries to link against, so it compiles all the libraries again. This entire process amounts in compiling the compiler three times. Additionally, this process always guarantees that the Rust source tree can compile itself because the stage2 compiler (created by a freshly created compiler) would successfully compile itself again. This property, ensuring Rust can compile itself, is quite important! In general, though, this third compilation is not required for general purpose development on the compiler. The third compiler (stage2) can reuse the libraries that were created during the second compile. In other words, the second compilation can produce both a compiler and the libraries that compiler will use. These artifacts *must* be compatible due to the way plugins work today anyway, and they were created by the same source code so they *should* be compatible as well. So given all that, this commit switches the default build process to only compile the compiler three times, avoiding this third compilation by copying artifacts from the previous one. Along the way a new entry in the Travis matrix was also added to ensure that our full bootstrap can succeed. This entry does not run tests, though, as it should not be necessary. To restore the old behavior of a full bootstrap (three compiles) you can either pass: ./configure --enable-full-bootstrap or if you're using config.toml: [build] full-bootstrap = true Overall this will hopefully be an easy 33% win in build times of the compiler. If we do 33% less work we should be 33% faster! This in turn should affect cycle times and such on Travis and AppVeyor positively as well as making it easier to work on the compiler itself.
2016-12-20Merge branch 'rustbuild-warnings' of https://github.com/alexcrichton/rust ↵Alex Crichton-0/+2
into rollup
2016-12-20rustbuild: Deny and fix warningsAlex Crichton-0/+2
Turned out this lint uncovered an actual bug! Closes #38484
2016-12-20Find FileCheck using llvm-configSeo Sanghyeon-1/+2
2016-12-19add and document `--incremental` flag along with misc other changesNiko Matsakis-2/+20
For example: - we now support `-vv` to get very verbose output. - RUSTFLAGS is respected by `x.py` - better error messages for some cases
2016-12-09Create tar balls of save-analysis-api metadata for the standard libraries as ↵Nick Cameron-0/+4
part of `make dist`.
2016-12-07mk: Switch rustbuild to the default build systemAlex Crichton-5/+91
This commit switches the default build system for Rust from the makefiles to rustbuild. The rustbuild build system has been in development for almost a year now and has become quite mature over time. This commit is an implementation of the proposal on [internals] which slates deletion of the makefiles on 2016-01-02. [internals]: https://internals.rust-lang.org/t/proposal-for-promoting-rustbuild-to-official-status/4368 This commit also updates various documentation in `README.md`, `CONTRIBUTING.md`, `src/bootstrap/README.md`, and throughout the source code of rustbuild itself. Closes #37858
2016-11-30Update the bootstrap compilerAlex Crichton-14/+2
Now that we've got a beta build, let's use it!
2016-11-26Auto merge of #38008 - bluss:rustbuild-benches, r=alexcrichtonbors-1/+3
Add rustbuild command `bench` Add command bench to rustbuild, so that `./x.py bench <path>` can compile and run benchmarks. `./x.py bench --stage 1 src/libcollections` and `./x.py bench --stage 1 src/libstd` should both compile well. Just `./x.py bench` runs all benchmarks for the libstd crates. Fixes #37897
2016-11-25rustbuild: Add bench subcommandUlrik Sverdrup-1/+3
Add command `./x.py bench`; use `./x.py bench --help -v` to list all available benchmark targets.
2016-11-23std: make compilation of libpanic_unwind optional via a Cargo featureJorge Aparicio-1/+1
with this feature disabled, you can (Cargo) compile std with "panic=abort" rustbuild will build std with this feature enabled, to maintain the status quo fixes #37252
2016-11-14rustbuild: Allow configuration of python interpreterAlex Crichton-0/+5
Add a configuration key to `config.toml`, read it from `./configure`, and add auto-detection if none of those were specified. Closes #35760
2016-11-08rustbuild: Tweak for vendored dependenciesAlex Crichton-0/+3
A few changes are included here: * The `winapi` and `url` dependencies were dropped. The source code for these projects is pretty weighty, and we're about to vendor them, so let's not commit to that intake just yet. If necessary we can vendor them later but for now it shouldn't be necessary. * The `--frozen` flag is now always passed to Cargo, obviating the need for tidy's `cargo_lock` check. * Tidy was updated to not check the vendor directory Closes #34687
2016-11-05Merge branch 'gdb-next-gen' of https://github.com/TimNN/rust into rollupAlex Crichton-2/+0
2016-11-05Merge branch 'new-rustbuild' into rollupAlex Crichton-245/+26
2016-11-03Set RUSTC_BOOTSTRAP to some value.Brian Anderson-1/+1
Environment variables on windows can't be empty.
2016-11-02rustbuild: Rewrite user-facing interfaceAlex Crichton-245/+26
This commit is a rewrite of the user-facing interface to the rustbuild build system. The intention here is to make it much easier to compile/test the project without having to remember weird rule names and such. An overall view of the new interface is: # build everything ./x.py build # document everyting ./x.py doc # test everything ./x.py test # test libstd ./x.py test src/libstd # build libcore stage0 ./x.py build src/libcore --stage 0 # run stage1 run-pass tests ./x.py test src/test/run-pass --stage 1 The `src/bootstrap/bootstrap.py` script is now aliased as a top-level `x.py` script. This `x` was chosen to be both short and easily tab-completable (no collisions in that namespace!). The build system now accepts a "subcommand" of what to do next, the main ones being build/doc/test. Each subcommand then receives an optional list of arguments. These arguments are paths in the source repo of what to work with. That is, if you want to test a directory, you just pass that directory as an argument. The purpose of this rewrite is to do away with all of the arcane renames like "rpass" is the "run-pass" suite, "cfail" is the "compile-fail" suite, etc. By simply working with directories and files it's much more intuitive of how to run a test (just pass it as an argument). The rustbuild step/dependency management was also rewritten along the way to make this easy to work with and define, but that's largely just a refactoring of what was there before. The *intention* is that this support is extended for arbitrary files (e.g. `src/test/run-pass/my-test-case.rs`), but that isn't quite implemented just yet. Instead directories work for now but we can follow up with stricter path filtering logic to plumb through all the arguments.
2016-10-31detect gdb version & rust support in compiletestTim Neumann-2/+0
2016-10-20Auto merge of #37280 - alexcrichton:debuginfo, r=brsonbors-0/+1
Enable line number debuginfo in releases This commit enables by default passing the `-C debuginfo=1` argument to the compiler for the stable, beta, and nightly release channels. A new configure option was also added, `--enable-debuginfo-lines`, to enable this behavior in developer builds as well. Closes #36452
2016-10-19Enable line number debuginfo in releasesAlex Crichton-0/+1
This commit enables by default passing the `-C debuginfo=1` argument to the compiler for the stable, beta, and nightly release channels. A new configure option was also added, `--enable-debuginfo-lines`, to enable this behavior in developer builds as well. Closes #36452
2016-10-19Detect local-rebuild by just the MAJOR.MINOR versionJosh Stone-3/+3
A new point-release shouldn't change any language semantics, so a local stage0 that matches MAJOR.MINOR version should still be considered a local-rebuild as far as `--cfg stageN` features go. e.g. `1.14.0` should be considered a local-rebuild for any `1.14.X`. (Bootstrap keys used to be an issue too, until #37265.)
2016-10-19Allow bootstrapping without a key. Fixes #36548Brian Anderson-11/+6
This will make it easier for packagers to bootstrap rustc when they happen to have a bootstrap compiler with a slightly different version number. It's not ok for anything other than the build system to set this environment variable.
2016-10-13rustbuild: Less panics in musl_rootAlex Crichton-1/+2
Don't panic if the target wasn't configured.
2016-10-08rustbuild: Optimize build times slightlyAlex Crichton-1/+0
As the entry point for building the Rust compiler, a good user experience hinges on this compiling quickly to get to the meat of the problem. To that end use `#[cfg]`-specific dependencies to avoid building Windows crates on Unix and drop the `regex` crate for now which was easily replacable with some string searching.
2016-10-05rustbuild: Add install target. #34675Ahmed Charles-0/+3
It just prints to the screen currently.
2016-10-01Auto merge of #36853 - TimNN:rustbuild-out-of-tree, r=alexcrichtonbors-7/+12
fix out-of-tree rustbuild See https://github.com/rust-lang/rust/pull/36456#issuecomment-250589906 r? @alexcrichton
2016-09-30TidyBrian Anderson-1/+2
2016-09-30Support emscripten in rustbuildBrian Anderson-1/+1
2016-09-30fix out-of-tree rustbuildTim Neumann-7/+12
2016-09-29Auto merge of #36456 - alexcrichton:rustbuild-dont-use-c, r=jonathandturnerbors-4/+12
rustbuild: Use current_dir instead of -C Apparently some versions of git don't support the `-C` flag, so let's use the guaranteed-to-work `current_dir` function.
2016-09-28rustbuild: Use current_dir instead of -CAlex Crichton-4/+12
Apparently some versions of git don't support the `-C` flag, so let's use the guaranteed-to-work `current_dir` function.
2016-09-27Remove requirement to use 10.7 (fixes macOS)Jonathan Turner-7/+0
2016-09-26Rollup merge of #36663 - brson:build-plan, r=alexcrichtonJonathan Turner-1/+8
rustbuild: Print out all build steps when --verbose These helped me debug some problems with the asmjs target. It's just vomiting debug representations, so not the prettiest stuff. r? @alexcrichton
2016-09-25Auto merge of #36442 - alexcrichton:rustbuild-cross, r=brsonbors-1/+5
rustbuild: Nicer error for host builds of targets If a triple is configured only as a target, not a host, then trying to build that triple with host artifacts would cause a panic. Fail a little nicer instead. Closes #36268
2016-09-23rustbuild: Print out all build steps when --verboseBrian Anderson-1/+8
2016-09-15Auto merge of #36439 - alexcrichton:fix-rustbuild, r=japaricbors-0/+2
rustbuild: Fix dependency tracking with new Cargo The recent Cargo update changed filenames, which broke a lot of incremental rustbuild builds. What it thought were the output files were indeed no longer the output files! (wreaking havoc). This commit updates this to stop guessing filenames of Cargo and just manage stamp files instead.
2016-09-13Auto merge of #36041 - ahmedcharles:try, r=nrcbors-1/+1
Replace try! with ?.
2016-09-12rustbuild: Nicer error for host builds of targetsAlex Crichton-1/+5
If a triple is configured only as a target, not a host, then trying to build that triple with host artifacts would cause a panic. Fail a little nicer instead. Closes #36268
2016-09-12rustbuild: Fix dependency tracking with new CargoAlex Crichton-0/+2
The recent Cargo update changed filenames, which broke a lot of incremental rustbuild builds. What it thought were the output files were indeed no longer the output files! (wreaking havoc). This commit updates this to stop guessing filenames of Cargo and just manage stamp files instead.
2016-09-12crate-ify compiler-rt into compiler-builtinsJorge Aparicio-11/+0
libcompiler-rt.a is dead, long live libcompiler-builtins.rlib This commit moves the logic that used to build libcompiler-rt.a into a compiler-builtins crate on top of the core crate and below the std crate. This new crate still compiles the compiler-rt instrinsics using gcc-rs but produces an .rlib instead of a static library. Also, with this commit rustc no longer passes -lcompiler-rt to the linker. This effectively makes the "no-compiler-rt" field of target specifications a no-op. Users of `no_std` will have to explicitly add the compiler-builtins crate to their crate dependency graph *if* they need the compiler-rt intrinsics. Users of the `std` have to do nothing extra as the std crate depends on compiler-builtins. Finally, this a step towards lazy compilation of std with Cargo as the compiler-rt intrinsics can now be built by Cargo instead of having to be supplied by the user by some other method. closes #34400