summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2016-08-14Auto merge of #35666 - eddyb:rollup, r=eddybbors-3/+9
Rollup of 30 pull requests - Successful merges: #34941, #35392, #35444, #35447, #35491, #35533, #35539, #35558, #35573, #35574, #35577, #35586, #35588, #35594, #35596, #35597, #35598, #35606, #35611, #35615, #35616, #35620, #35622, #35640, #35643, #35644, #35646, #35647, #35648, #35661 - Failed merges: #35395, #35415
2016-08-14Rollup merge of #35577 - japaric:relax, r=alexcrichtonEduard-Mihai Burtescu-2/+7
add -mrelax-relocations=no to i686-musl and i586-gnu I've been experiencing #34978 with these two targets. This applies the hack in #35178 to these targets as well. r? @alexcrichton
2016-08-14Rollup merge of #35574 - badboy:emscripten-test-fixes, r=brsonEduard-Mihai Burtescu-1/+2
Emscripten test fixes This picks up parts of #31623 to disable certain tests that emscripten can't run, as threads/processes are not supported. I re-applied @tomaka's changes manually, I can rebase those commits with his credentials if he wants. It also disables jemalloc for emscripten (at least in Rustbuild, I have to check if there is another setting for the same thing in the old makefile approach). This should not impact anything for normal builds.
2016-08-12Produce source package in rust-installer format in addition to vanilla tarballDiggory Blake-1/+206
Copy source files from rust code Add missing wildcard Remove unused function Remove use of tar --transform
2016-08-11fix matchJorge Aparicio-1/+2
2016-08-10add -mrelax-relocations=no to i686-musl and i586-gnuJorge Aparicio-2/+6
I've been experiencing #34978 with these two targets. This applies the hack in #35178 to these targets as well.
2016-08-10[emscripten] Disable jemalloc for emscriptenJan-Erik Rediger-1/+2
2016-08-10Improved checking of target's llvm_configCameron Hart-1/+11
Point llvm @bitshifter branch until PR accepted Use today's date for LLVM auto clean trigger Update LLVM submodule to point at rust-lang fork. Handle case when target is set
2016-08-06Merge branch 'master' into issue-30961Cameron Hart-91/+439
2016-08-02Fix style issuesm4b-2/+2
2016-08-01Add -mrelax-relocations=no hacks to fix musl buildm4b-0/+6
2016-07-30Auto merge of #35060 - japaric:arm-musl, r=alexcrichtonbors-9/+8
Add ARM MUSL targets Rebase of #33189. I tested this by producing a std for `arm-unknown-linux-musleabi` then I cross compiled Hello world to said target. Checked that the produced binary was statically linked and verified that the binary worked under QEMU. This depends on rust-lang/libc#341. I'll have to update this PR after that libc PR is merged. I'm also working on generating ARM musl cross toolchain via crosstool-ng. Once I verified those work, I'll send a PR to rust-buildbot. r? @alexcrichton cc @timonvo
2016-07-30Auto merge of #35004 - asomers:master, r=alexcrichtonbors-1/+3
Fix build of compiler-rt on FreeBSD Broken since ee6011fc71e02485f2dffcc25be64631c2008775 removed cmake from the process. There are likely other platforms still broken, but I didn't test on them.
2016-07-30Add ARM MUSL targets.Timon Van Overveldt-3/+2
The targets are: - `arm-unknown-linux-musleabi` - `arm-unknown-linux-musleabihf` - `armv7-unknown-linux-musleabihf` These mirror the existing `gnueabi` targets. All of these targets produce fully static binaries, similar to the x86 MUSL targets. For now these targets can only be used with `--rustbuild` builds, as https://github.com/rust-lang/compiler-rt/pull/22 only made the necessary compiler-rt changes in the CMake configs, not the plain GNU Make configs. I've tested these targets GCC 5.3.0 compiled again musl-1.1.12 (downloaded from http://musl.codu.org/). An example `./configure` invocation is: ``` ./configure \ --enable-rustbuild --target=arm-unknown-linux-musleabi \ --musl-root="$MUSL_ROOT" ``` where `MUSL_ROOT` points to the `arm-linux-musleabi` prefix. Usually that path will be of the form `/foobar/arm-linux-musleabi/arm-linux-musleabi`. Usually the cross-compile toolchain will live under `/foobar/arm-linux-musleabi/bin`. That path should either by added to your `PATH` variable, or you should add a section to your `config.toml` as follows: ``` [target.arm-unknown-linux-musleabi] cc = "/foobar/arm-linux-musleabi/bin/arm-linux-musleabi-gcc" cxx = "/foobar/arm-linux-musleabi/bin/arm-linux-musleabi-g++" ``` As a prerequisite you'll also have to put a cross-compiled static `libunwind.a` library in `$MUSL_ROOT/lib`. This is similar to [how the x86_64 MUSL targets are built] (https://doc.rust-lang.org/book/advanced-linking.html).
2016-07-30Update gcc crate dependency to 0.3.27.Timon Van Overveldt-6/+6
This is to pull in changes to support ARM MUSL targets. This change also commits a couple of other cargo-generated changes to other dependencies in the various Cargo.toml files.
2016-07-30Auto merge of #35117 - aravind-pg:path, r=alexcrichtonbors-0/+9
On Windows, ensure PATH does not contain invalid character `"` Fixes #34959. r? @alexcrichton
2016-07-29Make rust build pass LLVM_RUSTLLVM to C++ compilerCameron Hart-0/+4
2016-07-27rustbuild: Ensure PATH does not contain invalid character `"`Aravind Gollakota-0/+9
2016-07-26rustbuild: make backtraces (RUST_BACKTRACE) optionalJorge Aparicio-0/+10
but keep them enabled by default to maintain the status quo. When disabled shaves ~56KB off every x86_64-unknown-linux-gnu binary. To disable backtraces you have to use a config.toml (see src/bootstrap/config.toml.example for details) when building rustc/std: $ python bootstrap.py --config=config.toml
2016-07-24Follow-up to 1afb17ed5f9206e1e04c5d72ea724c5fadadd46cAlan Somers-1/+3
Disable gcc_personality_v0.c in rustbuild as well as the normal build. Rustbuild now gets further on FreeBSD, but it still fails due to other problems.
2016-07-21Auto merge of #34715 - scottcarr:mir-test, r=nikomatsakisbors-0/+7
Add MIR Optimization Tests I've starting working on the infrastructure for testing MIR optimizations. The plan now is to have a set of test cases (written in Rust), compile them with -Z dump-mir, and check the MIR before and after each pass.
2016-07-20add mir optimization tests, dump-mir-dir optionScott A Carr-0/+7
2016-07-20mk: Stop using cmake for compiler-rtAlex Crichton-82/+397
The compiler-rt build system has been a never ending cause of pain for Rust unfortunately: * The build system is very difficult to invoke and configure to only build compiler-rt, especially across platforms. * The standard build system doesn't actually do what we want, not working for some of our platforms and requiring a significant number of patches on our end which are difficult to apply when updating compiler-rt. * Compiling compiler-rt requires LLVM to be compiled, which... is a big dependency! This also means that over time compiler-rt is not guaranteed to build against older versions of LLVM (or newer versions), and we often want to work with multiple versions of LLVM simultaneously. The makefiles and rustbuild already know how to compile C code, the code here is far from the *only* C code we're compiling. This patch jettisons all logic to work with compiler-rt's build system and just goes straight to the source. We just list all files manually (copied from compiler-rt's lib/builtins/CMakeLists.txt) and compile them into an archive. It's likely that this means we'll fail to pick up new files when we upgrade compiler-rt, but that seems like a much less significant cost to pay than what we're currently paying. cc #34400, first steps towards that
2016-07-16Auto merge of #34606 - mathstuf:llvm-with-ninja, r=alexcrichtonbors-0/+1
llvm, rt: build using the Ninja generator if available The Ninja generator generally builds much faster than make. It may also be used on Windows to have a vast speed improvement over the Visual Studio generators. Currently hidden behind an `--enable-ninja` flag because it does not obey the top-level `-j` or `-l` flags given to `make`.
2016-07-16Auto merge of #34779 - infinity0:master, r=alexcrichtonbors-2/+15
If local-rust is the same as the current version, then force a local-rebuild In Debian, we would like the option to build/rebuild the current release from *either* the current or previous stable release. So we use enable-local-rust instead of enable-local-rebuild, and read the bootstrap key dynamically from whatever is installed locally. In general, it does not make much sense to allow enable-local-rust without also setting the bootstrap key, since the build would fail otherwise. (The way I detect "the bootstrap key of [the local] rustc installation" is a bit hacky, suggestions welcome.)
2016-07-15rustbuild: If local-rust is the same as the current version, then force a ↵Ximin Luo-2/+15
local-rebuild
2016-07-13build compiler docs if requested in configTim Neumann-4/+12
2016-07-13only remove directory if it existsTim Neumann-1/+1
2016-07-13create global doc dir for all doc targetsTim Neumann-0/+2
2016-07-07llvm, rt: build using the Ninja generator if availableBen Boeckel-0/+1
The Ninja generator generally builds much faster than make. It may also be used on Windows to have a vast speed improvement over the Visual Studio generators. Currently hidden behind an `--enable-ninja` flag because it does not obey the top-level `-j` or `-l` flags given to `make`.
2016-07-07Auto merge of #34677 - alexcrichton:no-more-build-directory, r=brsonbors-930/+909
rustbuild: Remove the `build` directory The organization in rustbuild was a little odd at the moment where the `lib.rs` was quite small but the binary `main.rs` was much larger. Unfortunately as well there was a `build/` directory with the implementation of the build system, but this directory was ignored by GitHub on the file-search prompt which was a little annoying. This commit reorganizes rustbuild slightly where all the library files (the build system) is located directly inside of `src/bootstrap` and all the binaries now live in `src/bootstrap/bin` (they're small). Hopefully this should allow GitHub to index and allow navigating all the files while maintaining a relatively similar layout to the other libraries in `src/`.
2016-07-06Rollup merge of #34558 - GlenDC:master, r=alexcrichtonSteve Klabnik-1/+1
rustbuild: propagate bootstrap.py '--help' flag Fixes #34534. r? @alexcrichton
2016-07-05rustbuild: Remove the `build` directoryAlex Crichton-930/+909
The organization in rustbuild was a little odd at the moment where the `lib.rs` was quite small but the binary `main.rs` was much larger. Unfortunately as well there was a `build/` directory with the implementation of the build system, but this directory was ignored by GitHub on the file-search prompt which was a little annoying. This commit reorganizes rustbuild slightly where all the library files (the build system) is located directly inside of `src/bootstrap` and all the binaries now live in `src/bootstrap/bin` (they're small). Hopefully this should allow GitHub to index and allow navigating all the files while maintaining a relatively similar layout to the other libraries in `src/`.
2016-07-06Tweak verbosity to hopefully better match intuitive expectationsXimin Luo-2/+2
2016-07-06Have verify() return a bool rather than a generic RuntimeErrorXimin Luo-10/+9
2016-07-04Avoid redundant downloads when bootstrappingXimin Luo-0/+8
If the local file is available, then verify it against the hash we just downloaded, and if it matches then we don't need to download it again.
2016-07-03Auto merge of #34614 - cynicaldevil:build-time, r=alexcrichtonbors-0/+12
Build: Shows total time taken to build the compiler Fixes #34600 Prints the total time taken to build rustc by executing `src/bootstrap/bootstrap.py`; also includes time taken to download `stage0` compiler and deps. r? @alexcrichton
2016-07-02Auto merge of #34597 - CensoredUsername:bootstrap-fix, r=alexcrichtonbors-1/+1
Support more python 2.7 versions in bootstrap.py It seems python broke compatability between 2.7.9 and 2.7.12 as on the former a WindowsError was raised while on the latter a subprocess.CalledProcessError was raised while testing for the existence of uname. As a WindowsError being thrown obviously indicates we're running on windows, this should probably be accepted too.
2016-07-02Build: Shows total time taken to build the compilerNikhil Shagrithaya-0/+12
2016-07-02Rollup merge of #34567 - alexcrichton:rustbuild-android, r=brsonManish Goregaokar-52/+227
rustbuild: Implement testing for Android This commit enhances the rustbuild support for testing Android to the same level of parity as the makefiles. This involved: * A new step to copy the standard library and other shared objects to the emulator. This is injected as a dependency of all test suites for Android. * Appropriate arguments are now passed through to compiletest to ensure that it can run tests. * When testing the standard library the test executables are probed for and shipped to the emulator to run for each test. * Fixing compilation of compiler-rt a bit All support added here is modeled after what's found in the makefiles, just translating one strategy to another. As an added bonus this commit adds support for the "check" step to automatically run tests for all targets, and the "check-target" step now runs all tests for a particular target, automatically filtering the tests if the target is detected as a cross-compile. Note that we don't (and probably won't) have a bot which is actually going to exercise any of this just yet, but all tests have passed locally for me at least.
2016-07-02Rollup merge of #34545 - sanxiyn:rustbuild, r=alexcrichtonManish Goregaokar-0/+5
Add rustc-stageN targets to rustbuild
2016-07-01Older versions of python 2.7 can raise a WindowsError instead of a ↵CensoredUsername-1/+1
subprocess.CalledProcessError when `uname` does not exist
2016-06-30Auto merge of #34563 - alexcrichton:robust-mk, r=brsonbors-4/+6
mk: Don't consider LLVM done until it's done Currently if an LLVM build is interrupted *after* it creates the llvm-config binary but before it's done it puts us in an inconsistent state where we think LLVM is compiled but it's not actually. This tweaks our logic to only consider LLVM done building once it's actually done building. This should hopefully alleviate problems on the bots where if we interrupt at the wrong time it doesn't corrupt the build directory.
2016-06-30rustbuild: Clean out tmp directory on `make clean`Alex Crichton-0/+3
Right now we generate error index information into this directory, but it's never cleaned out. This means that if a build *bounces* because of something in this directory it'll continue to cause all future builds to fail because the relevant files are never removed.
2016-06-30mk: Don't consider LLVM done until it's doneAlex Crichton-4/+6
Currently if an LLVM build is interrupted *after* it creates the llvm-config binary but before it's done it puts us in an inconsistent state where we think LLVM is compiled but it's not actually. This tweaks our logic to only consider LLVM done building once it's actually done building. This should hopefully alleviate problems on the bots where if we interrupt at the wrong time it doesn't corrupt the build directory.
2016-06-29rustbuild: Implement testing for AndroidAlex Crichton-52/+227
This commit enhances the rustbuild support for testing Android to the same level of parity as the makefiles. This involved: * A new step to copy the standard library and other shared objects to the emulator. This is injected as a dependency of all test suites for Android. * Appropriate arguments are now passed through to compiletest to ensure that it can run tests. * When testing the standard library the test executables are probed for and shipped to the emulator to run for each test. * Fixing compilation of compiler-rt a bit All support added here is modeled after what's found in the makefiles, just translating one strategy to another. As an added bonus this commit adds support for the "check" step to automatically run tests for all targets, and the "check-target" step now runs all tests for a particular target, automatically filtering the tests if the target is detected as a cross-compile. Note that we don't (and probably won't) have a bot which is actually going to exercise any of this just yet, but all tests have passed locally for me at least.
2016-06-29propagate rustbuild's bootstrap.py '--help' flagdecauwsemaecker.glen@gmail.com-1/+1
2016-06-29Add rustc-stageN targets to rustbuildSeo Sanghyeon-0/+5
2016-06-27rustbuild: Update how compiler-rt is calledAlex Crichton-23/+46
Looks like compiler-rt has been tweaked slightly during the last update, propagate these changes to rustbuild as well.
2016-06-22Fix typo in bootstrap READMEFabian Vogt-1/+1
"boostrap" instead of "bootstrap"