Commit Graph

1044 Commits

Author SHA1 Message Date
gnzlbg 5146663602 fix linking error on i586 2017-11-14 21:35:05 +01:00
Guillaume Gomez 529bb320f7 Rollup merge of #45961 - dereckson:unix-agnosticity-ci, r=Mark-Simulacrum
Use #!/usr/bin/env as shebang for Bash scripts

On some systems, the bash command could be available in another
directory than /bin. As such, to offer an env shebang is more
convenient.

This make sense even for docker scripts, as you can use Docker
on FreeBSD or SmartOS for example.
2017-11-14 16:52:11 +01:00
Sébastien Santoro de8c57cb24 Use #!/usr/bin/env as shebang for Bash scripts
On some systems, the bash command could be available in another
directory than /bin. As such, to offer an env shebang is more
convenient.

This make sense even for docker scripts, as you can use Docker
on FreeBSD or SmartOS for example.
2017-11-13 14:33:12 +00:00
bors b7ccb0a5a7 Auto merge of #45810 - SimonSapin:ac-dc, r=aturon
Disable LLVM assertions on Nightly, enable them in "alt" builds.

Per IRC discussion https://mozilla.logbot.info/rust-infra/20171106#c13812170-c13812204

Background: https://internals.rust-lang.org/t/disabling-llvm-assertions-in-nightly-builds/5388/14
2017-11-13 11:46:55 +00:00
bors 7f43981ebf Auto merge of #45623 - mneumann:dragonfly-ci, r=alexcrichton
Add ci for DragonFly
2017-11-12 23:31:58 +00:00
Michael Neumann 949abfe7d5 Add ci for DragonFly (disabled for now) 2017-11-12 19:00:35 +01:00
Simon Sapin 325a769a21 Disable LLVM assertions on Nightly, enable them in "alt" builds. 2017-11-11 23:31:37 +01:00
kennytm 33400fbbcd
Modify the script to allow for running docker images on Windows 7. 2017-11-06 03:53:40 +08:00
kennytm 1b5aaf22e8
dist-powerpc64le-linux: Use links from vault.centos.org instead.
This commit reverts #45734 and applies #45744. We expect the vault links
to be more stable than mirror.centos.org.
2017-11-06 03:53:40 +08:00
kennytm 1f95c6de3c
Fix broken link in `build-powerpc64le-toolchain.sh` 2017-11-03 15:53:36 +08:00
kennytm c46b04cbdd
ci: Upgrade Android SDK/NDK and refactor to use sdkmanager/avdmanager.
* SDK tools is upgraded to 27.0.0.
   - Refactored to use `sdkmanager`/`avdmanager` instead of the deprecated
     `android` tool.

* The Java version used by Android SDK is downgraded to OpenJDK-8, in order
  to download the SDK through HTTPS.

* NDK is upgrade to r15c.
   - Dropped support for android-9 (2.3 / Gingerbread), the minimal
     supported version is now android-14 (4.0 / Ice Cream Sandwich).
   - Changed the default Android compiler from GCC to clang.
   - For details of change introduced by NDK r15, see
     https://github.com/android-ndk/ndk/wiki/Changelog-r15.
2017-10-29 05:58:00 +08:00
Alex Crichton 36822ba39a ci: Test more asmjs again
This was accidentally added in #45352, forgot to back it out!
2017-10-25 09:58:48 -07:00
Simon Sapin daf84db4d2 Add WebRender to cargotest 2017-10-24 21:41:33 +02:00
Simon Sapin f4f18586e7 Move cargotest to separate jobs on Travis-CI and AppVeyor 2017-10-23 13:12:12 +02:00
bors 4279e2b4c1 Auto merge of #45393 - alexcrichton:update-musl, r=Mark-Simulacrum
ci: Update musl with new release

Apparently there's at least one CVE fixed in the new version of musl, and
because we're distributing it seems like a good opportunity to update!

Unfortunately it looks like #38618 still hasn't been fixed.
2017-10-21 19:02:41 +00:00
Alex Crichton b1f246c12e ci: Update musl with new release
Apparently there's at least one CVE fixed in the new version of musl, and
because we're distributing it seems like a good opportunity to update!

Unfortunately it looks like #38618 still hasn't been fixed.
2017-10-19 13:26:21 -07:00
kennytm 342e01b742
Rollup merge of #45352 - alexcrichton:emscripten-tests, r=nikomatsakis
test: Update Emscripten failures/passing

All tests should now have annotation for *why* they're ignored on emscripten. A
few tests no longer need such an annotation as well!

Closes #41299
2017-10-20 00:01:52 +08:00
kennytm 7da795ba10
Rollup merge of #45343 - bgermann:master, r=alexcrichton
Make Solaris builder compatible with Solaris 10 retry

Unfortunately, #45255 does not quite cut it,
so use a different approach to have Solaris 10 compatibility
by tricking libbacktrace's autoconf tests.
The sysroot download routine is slightly changed, too.
2017-10-20 00:01:50 +08:00
Alex Crichton d9ecdfe3a7 test: Update Emscripten failures/passing
All tests should now have annotation for *why* they're ignored on emscripten. A
few tests no longer need such an annotation as well!

Closes #41299
2017-10-17 18:46:38 -07:00
bgermann 0597bdabff Remove tabs 2017-10-17 16:39:15 +02:00
bgermann b3ea6e5fc5 Make Solaris builder compatible with Solaris 10 retry
Unfortunately, #45255 does not quite cut it,
so use a different approach to have Solaris 10 compatibility
by tricking libbacktrace's autoconf tests.
The sysroot download routine is slightly changed, too.
2017-10-17 15:53:18 +02:00
Josh Stone 68311bdf2b Bump the minimum LLVM to 3.9
Old LLVM bugs are reportedly cropping up harder, but 3.9 seems to be OK.

Fixes #45277.
2017-10-16 13:10:16 -07:00
bors 8382f39b6b Auto merge of #45299 - kennytm:rollup, r=kennytm
Rollup of 9 pull requests

- Successful merges: #45113, #45250, #45255, #45258, #45263, #45264, #45269, #45280, #45289
- Failed merges:
2017-10-15 08:39:58 +00:00
bgermann 8f4ff6307f Make Solaris builder compatible with Solaris 10 2017-10-13 11:36:44 +02:00
Marco A L Barbosa 1a2ce7d51a Add gcc-multilib to cross2 2017-10-11 23:17:50 -03:00
Marco A L Barbosa 0f427036c7 Add builder for x86_64-unknown-linux-gnux32 in cross2 2017-10-11 21:36:37 -03:00
Alex Crichton d5d4494213 ci: Fix installing the Android SDK
Apparently the https urls are broken due to some certificate validation
whatnots, and so far the least intrusive solution I've found is to just disable
that.
2017-10-10 18:59:40 -07:00
bgermann 724dd46536 Add libsocket and libresolv to Solaris builder 2017-10-05 19:05:19 +02:00
bgermann a78ce07381 Fix CC for solaris environments 2017-10-05 13:48:34 +02:00
bgermann 4e69d2e3eb Merge dist-solaris with cross2 builder 2017-10-05 01:22:30 +02:00
bgermann a82891ab5c Rename dist-fuchsia builder to cross2 2017-10-05 00:40:36 +02:00
bgermann 80fe86f8c7 Add build environment for Solaris
This can be used to build rust-std.

The dilos illumos distribution was chosen, because illumos is free software
as opposed to Oracle Solaris and dilos is the only illumos distribution that
supports x86_64 and sparcv9 at the same level.
2017-10-03 14:48:39 +02:00
Mark Simulacrum d6451f0b33 Rollup merge of #44903 - kallisti5:ci-build-disabled, r=aidanhs
ci: Fix building disabled containers

* Change the context into the disabled directory. Now you can test
  containers which are disabled.
2017-09-29 17:59:05 -06:00
Alexander von Gluck IV 3457a22d91 ci: Fix building disabled containers
* Change the context into the disabled directory. Now you can test
  containers which are disabled.
2017-09-28 10:27:15 -05:00
bors 9cb90f4e23 Auto merge of #44779 - tjkirch:master, r=alexcrichton
Add aarch64-unknown-linux-musl target

This adds support for the aarch64-unknown-linux-musl target in the build and CI systems.

This addresses half of issue #42520.

The new file `aarch64_unknown_linux_musl.rs` is a copy of `aarch64_unknown_linux_gnu.rs` with "gnu" replaced by "musl", and the added logic in `build-arm-musl.sh` is similarly a near-copy of the arches around it, so overall the changes were straightforward.

Testing:

```
$ sudo ./src/ci/docker/run.sh cross
...
Dist std stage2 (x86_64-unknown-linux-gnu -> aarch64-unknown-linux-musl)
Building stage2 test artifacts (x86_64-unknown-linux-gnu -> aarch64-unknown-linux-musl)
   Compiling getopts v0.2.14
   Compiling term v0.0.0 (file:///checkout/src/libterm)
   Compiling test v0.0.0 (file:///checkout/src/libtest)
    Finished release [optimized] target(s) in 16.91 secs
Copying stage2 test from stage2 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / aarch64-unknown-linux-musl)
...
Build completed successfully in 0:55:22
```

```
$ rustup toolchain link local obj/build/x86_64-unknown-linux-gnu/stage2
$ rustup default local
```

After setting the local toolchain as default, and adding this in ~/.cargo/config:

```
[target.aarch64-unknown-linux-musl]
linker = "aarch64-linux-musl-gcc"
```

...then the toolchain was able to build a working ripgrep as a test:

```
$ readelf -a target/aarch64-unknown-linux-musl/debug/rg | grep -i interpreter
$ readelf -a target/aarch64-unknown-linux-musl/debug/rg | grep NEEDED
$ file target/aarch64-unknown-linux-musl/debug/rg
target/aarch64-unknown-linux-musl/debug/rg: ELF 64-bit LSB executable, ARM aarch64, version 1 (GNU/Linux), statically linked, BuildID[sha1]=be11036b0988fac5dccc9f6487eb780b05186582, not stripped
```
2017-09-28 03:28:20 +00:00
James Tucker a3aef1aa95 Fix fuchsia toolchain prebuild setup
* Adjust bootstrap to provide useful output on failure
 * Add missing package dependencies in the build environment
 * Fix permission bits on prebuilt toolchain files
2017-09-24 21:32:27 -07:00
James Tucker c481f85dc2 ensure that prebuilt toolchain binaries are +x 2017-09-24 13:55:55 -07:00
Petr Hosek 992e94ab3b Re-add CMake package
This appears to be needed by the Rust build.
2017-09-24 13:55:55 -07:00
Petr Hosek 1fdbfa9930 Use Zircon's Clang rather than building our own
This toolchain is already used to build Zircon itself and is the
official Clang toolchain used by all Fuchsia developers.
2017-09-24 13:55:55 -07:00
Petr Hosek 850c7cbbf1 Download clang-tools-extra as well 2017-09-24 13:53:10 -07:00
Petr Hosek 6c08208c31 Install unzip into Fuchsia Docker container 2017-09-24 13:53:10 -07:00
Petr Hosek ae0cf7fd5f Update Fuchsia toolchain build
compiler-rt is now being built as part of the toolchain itself.
2017-09-24 13:53:10 -07:00
P.Y. Laligand 20265ef3ac Updated Zircon version. 2017-09-24 13:53:10 -07:00
P.Y. Laligand 43cff131dd The Magenta kernel is now called Zircon. 2017-09-24 13:53:10 -07:00
Ben Cressey f94bd36fd1 add aarch64-unknown-linux-musl target
Signed-off-by: Ben Cressey <bcressey@amazon.com>
Signed-off-by: Tom Kirchner <tjk@amazon.com>
2017-09-23 14:46:33 -07:00
Oliver Schneider f0b5402283
Improve documentation 2017-09-17 21:40:13 +02:00
Oliver Schneider f381744d91
Get the miri test suite to run inside the rustc dev environment 2017-09-17 21:40:13 +02:00
Tim Neumann 80d7e76185 Rollup merge of #44617 - alexcrichton:download-from-us-west-1, r=aidanhs
ci: Upload/download from a new S3 bucket

Moving buckets from us-east-1 to us-west-1 because us-west-1 is where
rust-central-station itself runs and in general is where we have all our other
buckets.
2017-09-17 13:19:11 +02:00
Tim Neumann 2934588c15 Rollup merge of #44381 - jessicah:haiku-ci, r=alexcrichton
ci: introduce haiku x86_64 builder
2017-09-17 13:19:01 +02:00
bors ef227f5ffe Auto merge of #44641 - alexcrichton:disable-more-osx-assertions, r=Mark-Simulacrum
ci: Disable rustc debug assertions on OSX

This commit disables debug assertions for OSX in an effort to improve cycle time
on OSX. It looks like #44610 didn't shave off quite as much time as desired so
let's see how much this helps.
2017-09-17 05:19:00 +00:00
Alex Crichton c1a83acf98 ci: Disable rustc debug assertions on OSX
This commit disables debug assertions for OSX in an effort to improve cycle time
on OSX. It looks like #44610 didn't shave off quite as much time as desired so
let's see how much this helps.
2017-09-16 17:25:12 -07:00
Alex Crichton 5cfee9b854 ci: Upload/download from a new S3 bucket
Moving buckets from us-east-1 to us-west-1 because us-west-1 is where
rust-central-station itself runs and in general is where we have all our other
buckets.
2017-09-16 08:35:47 -07:00
Jessica Hamilton 3443dd8801 ci: haiku: wrap lines as necessary for tidy. 2017-09-16 01:00:40 -05:00
Jessica Hamilton 06d8118d8e ci: haiku: rename llvm-config to address tidy issues. 2017-09-15 21:51:50 -05:00
Jessica Hamilton 4fb402c37b ci: move dist-x86_64-haiku into disabled. 2017-09-15 19:04:24 -05:00
Alex Crichton ddd321df91 travis: Move sccache to the us-west-1 region
Most of the other rust-lang buckets are in us-west-1 and I think the original
bucket was just accidentally created in the us-east-1 region. Let's consolidate
by moving it to the same location as the rest of our buckets.
2017-09-14 13:17:25 -07:00
Jessica Hamilton cbc9031fbc ci: introduce haiku x86_64 builder 2017-09-06 20:05:00 -05:00
Jeremy Sorensen 4f591a47d5 fix option for RUST_CONFIGURE_ARGS to be rust.ignore-git=false 2017-08-29 22:01:51 -07:00
Jeremy Sorensen d24ee2380f change option for RUST_CONFIGURE_ARGS to ignore-git=false 2017-08-29 09:39:12 -07:00
Jeremy Sorensen 68aab69af3 add ignore-git=true option to RUST_CONFIGURE_ARGS 2017-08-29 08:27:30 -07:00
Alex Crichton ffe64a26ab ci: Remove the need for `dumb-init`
Newer versions of Docker have a `--init` argument which spawns an init process
in the container, which we should be able to use everywhere now.
2017-08-26 18:34:13 -07:00
Jeremy Soller 727b473e5c Mark install-x86_64-redox.sh as executable 2017-08-15 06:46:06 -06:00
Jeremy Soller 1cc33c07fa Move Redox Dockerfile to disabled directory :( 2017-08-14 15:46:43 -06:00
Jeremy Soller a3d9c36720 Use scripts to reduce code size 2017-08-14 15:45:54 -06:00
Jeremy Soller 9a76934cea Add redox build to cross 2017-08-14 15:45:54 -06:00
Jeremy Soller 6d8520d638 Add Redox Dockerfile 2017-08-14 15:45:54 -06:00
Alex Crichton eb1c44b6ed rustbuild: Remove `--enable-llvm-clean-rebuild`
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-30 13:50:19 -07:00
Mark Simulacrum e5116b661a Rollup merge of #43536 - alexcrichton:privileged, r=TimNN
Flag docker invocations as --privileged on CI

When upgrading to LLVM 5.0 it was found that the leak sanitizer tests were
failing with fatal errors, but they were passing locally when run. Turns out it
looks like they may be using new ptrace-like syscalls so the docker container
now needs `--privileged` when executing to complete the test.
2017-07-29 18:03:56 -06:00
Alex Crichton b121689c6a Flag docker invocations as --privileged on CI
When upgrading to LLVM 5.0 it was found that the leak sanitizer tests were
failing with fatal errors, but they were passing locally when run. Turns out it
looks like they may be using new ptrace-like syscalls so the docker container
now needs `--privileged` when executing to complete the test.
2017-07-29 13:44:28 -07:00
Alex Crichton 122fd188ae rustbuild: Update cross-compilers for FreeBSD
When working through bugs for the LLVM 5.0 upgrade it looks like the FreeBSD
cross compilers we're currently using are unable to build LLVM, failing with
references to the function `std::to_string` claiming it doesn't exist. I don't
actually know what this function is, but assuming that it was added in a more
recent version of a C++ standard I've updated the gcc versions for the
toolchains we're using. This made the error go away!
2017-07-28 14:26:27 -07:00
bors d02fb3bcf4 Auto merge of #42059 - derekdreery:bugfix/fix_emscripten_tests, r=alexcrichton
Make compiletest set cwd before running js tests

Proposed fix for #38800.

Not all tests pass yet - I will mention failures here once the test suite has finished.
2017-07-26 18:27:19 +00:00
Richard Dodd 874ecdc09f Remove custom node script 2017-07-26 09:43:09 +01:00
bors bad58f2791 Auto merge of #43226 - alexcrichton:aarch64-ci, r=aidanhs
Add a disabled builder for aarch64 emulated tests

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-26 03:53:46 +00:00
Milton Mazzarri f516765b94 bootstrap: Major refactoring
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-25 06:37:10 -05:00
Alex Crichton 8ef3f69ffb Add a disabled builder for aarch64 emulated tests
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-24 16:24:52 -07:00
Alex Crichton 8340f74eb7 travis: Switch `curl -s` to `curl -f`
I seem to have been a little too tired when I fixed up the container scripts,
applying the wrong flag!
2017-07-18 07:42:32 -07:00
Alex Crichton c843661d9a travis: Make a few `curl` invocations more resilient
Use the `-f` flag to indicate that, for example, a 500 response code is to be
considered a failure, triggering the normal retry logic. Also ignore errors
where we check the date from google.com, as a failure there shouldn't fail the
build.
2017-07-17 20:11:24 -07:00
Thomas Lively 3bf8116280 Split old and experimental wasm builders 2017-07-13 08:59:01 -07:00
Ty Coghlan 250346128b Updated docker images to factor out common scripts 2017-07-12 21:25:36 -04:00
bors 33e353ea51 Auto merge of #43091 - aidanhs:aphs-no-docker-priv, r=alexcrichton
Privileged in docker run isn't necessary

Added relatively recently in https://github.com/rust-lang/rust/pull/40199/files#diff-71609a365528e4649836825d8250c241R57, but I don't see anything in that PR that requires it. If it's not strictly necessary, we shouldn't use it.

(if this lands I'll make a PR against libc which also uses privileged)

r? @alexcrichton
2017-07-07 08:13:20 +00:00
Aidan Hobson Sayers 4bd27fc21b Privileged in docker run isn't necessary 2017-07-06 23:16:12 +01:00
Aidan Hobson Sayers 7c8523e87b Retry downloading llvm commit tarball 2017-07-06 18:55:07 +01:00
Alex Crichton 7e6c9f3635 Switch to rust-lang-nursery/compiler-builtins
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-05 07:08:36 -07:00
Thomas Lively c130b83bae Restore old emscripten.sh for use by asmjs 2017-06-24 11:35:48 -07:00
Thomas Lively 4ad6a95860 Add Target (de)serialization for environment vars
Also turn WebAssembly backend back on in its builder.
2017-06-23 17:49:36 -07:00
Thomas Lively a4f97449b0 Add wasm32-experimental-emscripten to wasm builder
This modifies the builder to download and use the LLVM tools from the
last known good build on the WebAssembly buildbot waterfall, since these
tools are built with the WebAssembly LLVM backend enabled.
2017-06-22 18:34:56 -07:00
Thomas Lively 447297ce59 Make wasm32 buildbot test LLVM backend
This adds the experimental targets option to configure so it can be used
by the builders and changes the wasm32 Dockerfile accordingly. Instead
of using LLVM from the emsdk, the builder's emscripten tools now uses
the Rust in-tree LLVM, since this is the one built with wasm support.
2017-06-22 18:34:56 -07:00
bors c3627e25ee Auto merge of #42631 - malbarbo:wasm32, r=alexcrichton
Add a travis builder for wasm32-unknown-emscripten

This commits add an entry to travis matrix that will execute wasm32-unknown-emscripten tests suites.

- Emscripten for asmjs was updated to sdk-1.37.13-64bit
- The tests are run with node 8.0.0 (it can execute wasm)
- A wrapper script is used to run each test from the directory where it is (workaround for https://github.com/kripken/emscripten/issues/4542)
- Some tests are ignore, see #42629 and #42630
2017-06-16 07:54:59 +00:00
Aidan Hobson Sayers d0c1e6480c Use --depth to speed up pristine submodule cloning
In addition, remove all the unused cache stuff
2017-06-15 00:31:39 +01:00
Marco A L Barbosa 9da77b3ec5 Disable wasm32 image 2017-06-13 19:14:15 -03:00
Marco A L Barbosa 35d6eb38d2 Make tidy happy 2017-06-13 12:39:35 -03:00
Marco A L Barbosa dd0727fee4 Add missing emscripten.sh file 2017-06-13 11:02:00 -03:00
Marco A L Barbosa 9b88a1b30b Add docker image for wasm32-unknown-emscripten
- rename emscripten docker image to asmjs
- create wasm32 docker image
2017-06-13 09:32:30 -03:00
Marco Castelluccio 4c908a9d37 Enable profiler selectively on some builders 2017-06-06 18:09:33 +01:00
Marco Castelluccio 13b3c34e4b Spell profiler option correctly... 2017-06-06 00:42:09 +01:00
Marco Castelluccio 26ad8d4ad3 Enable profiler on all builders 2017-06-05 23:56:59 +01:00
Mark Simulacrum 3447aa764a Quiet tests on PR tests 2017-06-02 12:04:00 -06:00
kennytm e6e5dc0e9c
ci: Improve log output (mainly Travis).
* Bring back colors on Travis, which was disabled since #39036.
  Append --color=always to cargo when running in CI environment.
* Removed `set -x` in the shell scripts. The `retry` function already
  prints which command it is running, add `-x` just add noise to the
  output.
* Support travis_fold/travis_time. Matching pairs of these allow Travis CI
  to collapse the output in between. This greatly cut down the unnecessary
  "successful" output one need to scroll through before finding the failed
  statement.
2017-06-02 01:14:26 +08:00
bors 920c4799be Auto merge of #42218 - venkatagiri:update_cross, r=alexchrichton
use shared scripts for init and sccache in cross image

cc #42201
cc @malbarbo
2017-05-28 22:15:10 +00:00
Venkata Giri Reddy 7acc999b42 ci: move musl install into their own scripts 2017-05-26 12:50:52 -04:00
Alex Crichton 357133b362 Update OpenSSL download location
In rustbuild itself we download from our mirror but in the containers we don't
do this yet. The OpenSSL download url changes from time to time (it breaks when
they release a new version) so let's download from our mirror instead.
2017-05-25 10:08:35 -07:00
Venkata Giri Reddy 5ce2eb1bd8 use shared scripts for init and sccache in cross image 2017-05-25 00:43:21 -06:00
Aidan Hobson Sayers 47f8b4a3d8 Hack around abysmally slow llvm clones 2017-05-25 02:19:00 +01:00
Marco A L Barbosa 9b184c0c17 ci: fix dist-powerpc-linux image 2017-05-18 17:11:46 -03:00
Marco A L Barbosa 502eadbf8f ci: add filesystem layout docs 2017-05-18 09:21:11 -03:00
Marco A L Barbosa d15c950ac6 ci: move shared scripts to src/ci/docker/scripts/ 2017-05-18 08:33:10 -03:00
Marco A L Barbosa 307d8e5aa5 ci: allows shared scripts 2017-05-17 18:20:50 -03:00
Alex Crichton c30e007b86 Update sccache binaries to mozilla/sccache@d3627d766
This commit updates the sccache binaries to fix a cache load failure seen
on #41926, fixed by mozilla/sccache#119
2017-05-12 09:07:10 -07:00
bors 2cc3358e4f Auto merge of #41864 - malbarbo:android-docker, r=alexcrichton
Add disabled android host builders

Introduce the concept of disabled builder. A disabled builder is one that is not run by travis. It is intended to be run by the user who wants a rustc for a tier 2 or 3 platform. Off corse, there is no guarantee that it will work.
2017-05-11 14:05:37 +00:00
Marco A L Barbosa 2e509d2410 Add disabled android host builders 2017-05-09 20:02:11 -03:00
Marco A L Barbosa 49f793ac17 ci: Update android ndk and sdk 2017-05-09 15:40:30 -03:00
Alex Crichton aa891a57a1 ci: Update sccache build
Pulls in mozilla/sccache@ef0d77543 to fix #40240 again after the builds included
in #41447 forgot to include the mio fixed included in #41076.

Closes #40240
2017-04-29 00:29:54 -07:00
Alex Crichton 2e72bcb934 appveyor: Use Ninja/sccache on MSVC
Now that the final bug fixes have been merged into sccache we can start
leveraging sccache on the MSVC builders on AppVeyor instead of relying on the
ad-hoc caching strategy of trigger files and whatnot.
2017-04-27 07:19:34 -07:00
Alex Crichton 499b84aca8 travis: Update sccache build used
This build is no longer a forked version with temporary bugfixes, everything
should be upstreamed!
2017-04-27 07:18:01 -07:00
bors 0777c757a6 Auto merge of #40123 - TimNN:llvm40, r=alexcrichton
LLVM 4.0 Upgrade

Since nobody has done this yet, I decided to get things started:

**Todo:**

* [x] push the relevant commits to `rust-lang/llvm` and `rust-lang/compiler-rt`
* [x] cleanup `.gitmodules`
* [x] Verify if there are any other commits from `rust-lang/llvm` which need backporting
* [x] Investigate / fix debuginfo ("`<optimized out>`") failures
* [x] Use correct emscripten version in docker image

---

Closes #37609.

---

**Test results:**

Everything is green 🎉
2017-04-24 22:18:16 +00:00
Tim Neumann a0ce63be2b FIN: update emscripten builder 2017-04-23 22:00:01 +02:00
Marco A L Barbosa 51cc0e38e3 Add x86_64-linux-android target 2017-04-20 16:29:59 -03:00
bors 5997806a6a Auto merge of #41157 - aidanhs:aphs-debug-appveyor-cache, r=TimNN
Add a comment for disabling errexit, try to debug appveyor cache

Comments added as requested.

Also, lets add some cache debugging to appveyor. I *think* this is how to ignore errors in cmd.exe (and I did try it on my own machine), but I'm not 100% sure how appveyor runs them. In the worst case it'll fail but I guess that isn't the end of the world since the build has already failed by this point.

r? @TimNN
2017-04-16 22:24:36 +00:00
Aidan Hobson Sayers bb843582ca Add a comment for disabling errexit 2017-04-14 15:30:01 +01:00
Alex Crichton cdedecb7ba travis: Enable rust-analysis package for more targets
This commit enables the `rust-analysis` package to be produced for all targets
that are part of the `dist-*` suite of docker images on Travis. Currently
these packages are showing up with `available = false` in the
`channel-rust-nightly.toml` manifest where we'd prefer to have them show up for
all targets.

Unfortunately rustup isn't handling the `available = false` section well right
now, so this should also inadvertently fix the nightly regression.
2017-04-12 20:48:18 -07:00
bors 8c6e2ff452 Auto merge of #40584 - nrc:rls-submod, r=alexcrichton
Add the RLS as a submodule and build a package out of it

r? @brson (and cc @alexcrichton) Please review closely, I am not at all convinced I've done the right things here. I did run `x.py dist` and it makes an rls package which looks right to my eyes, but I haven't tested on non-linux platforms nor am I really sure what it should look like.

This does not attempt to run tests for the RLS yet.
2017-04-12 05:26:10 +00:00
Corey Farwell 72538dee4d Rollup merge of #41231 - TimNN:fix-centos, r=frewsxcv
Use correct vault URL in CentOS images

r? @frewsxcv
2017-04-11 18:36:17 -04:00
Tim Neumann 56503dd4ad use correct vault url 2017-04-11 22:53:16 +02:00
Aidan Hobson Sayers f297767b2c Make sccache a bit quieter 2017-04-11 00:22:26 +01:00
Nick Cameron 5766d526a2 Remove --enable-save-analysis configure flag 2017-04-10 08:46:20 +12:00
bors 547c12b8a6 Auto merge of #41147 - aidanhs:aphs-fix-appveyor-cache, r=TimNN
Disable errexit for sanity checking git repo

Unblock appveyor
2017-04-08 04:21:43 +00:00
Aidan Hobson Sayers bd4f3815eb Disable errexit for sanity checking git repo 2017-04-07 20:15:02 +01:00
bors 53f4bc311b Auto merge of #41138 - frewsxcv:rollup, r=frewsxcv
Rollup of 9 pull requests

- Successful merges: #40797, #41047, #41056, #41061, #41075, #41080, #41120, #41130, #41131
- Failed merges:
2017-04-07 15:25:47 +00:00
Corey Farwell 72308b1c23 Rollup merge of #41130 - petrhosek:fuchsia-ci-upstream, r=alexcrichton
travis: Use upstream LLVM repositories for Fuchsia

The Fuchsia copies of LLVM repositories contain additional patches
for work-in-progress features and there is some amount of churn that
may break Rust. Use upstream LLVM repositories instead for building
the toolchain used by the Fuchsia builder.
2017-04-07 09:20:10 -04:00
Corey Farwell 2a92fe2aaa Rollup merge of #41080 - cuviper:generic-powerpc, r=alexcrichton
dist-powerpc-linux: use a pure 32-bit CPU profile

With `-mcpu=power4`, code might use instructions like `fcfid`, excluding
older CPUs like the PowerPC G4, which apparently some users would like
to use.  The generic `-mcpu=powerpc` should stick to pure 32-bit PowerPC
instructions.

Fixes rust-lang/cargo#3852.
2017-04-07 09:20:08 -04:00
Corey Farwell a2c032631b Rollup merge of #41075 - aidanhs:aphs-enable-appveyor-cache, r=alexcrichton
Re-enable appveyor cache

After breaking the queue last time, I'm cautiously back with a PR to re-enable caching on appveyor.

If you look at https://ci.appveyor.com/project/rust-lang/rust/build/1.0.2623/job/46o90by4ari6gege (one of the multiple runs that started failed, there are actually two errors - one for restoring the cache, one right at the bottom for creating a directory. I only noticed the restore error at the time as I was a bit rushed to revert and didn't stop to wonder why it continued - turns out appveyor [does not abort on cache restore failure](https://github.com/appveyor/ci/issues/723).

Turns out the cause of the build failures was the cache directory existing and me being thinking that because mkdir on windows is [recursive by default](http://stackoverflow.com/a/905239/2352259), it ignores the error if the directory already exists. Apparently this is not true, so now it checks if the directory exists before attempting to create.

In addition, I've added some more paranoia to double check everything is sane.
2017-04-07 09:20:07 -04:00
bors c438c1fb39 Auto merge of #40971 - malbarbo:android-emulator-64, r=alexcrichton
Use 64 bits emulator to run android tests

Also install headless jre instead of the full jre.
2017-04-07 12:51:18 +00:00
Petr Hosek b135c1291d travis: Use upstream LLVM repositories for Fuchsia
The Fuchsia copies of LLVM repositories contain additional patches
for work-in-progress features and there is some amount of churn that
may break Rust. Use upstream LLVM repositories instead for building
the toolchain used by the Fuchsia builder.
2017-04-06 23:29:23 -07:00
Corey Farwell 9516c80bb7 Rollup merge of #41089 - alexcrichton:update-musl, r=brson
travis: Update musl for i686/x86_64

This is a random stab towards #38618, no idea if it'll work. But hey more
up-to-date software is better, right?
2017-04-06 14:55:04 -04:00
Alex Crichton 631f761f18 travis: Update musl for i686/x86_64
This is a random stab towards #38618, no idea if it'll work. But hey more
up-to-date software is better, right?
2017-04-05 11:10:48 -07:00
Josh Stone 608e8fe16c dist-powerpc-linux: use a pure 32-bit CPU profile
With `-mcpu=power4`, code might use instructions like `fcfid`, excluding
older CPUs like the PowerPC G4, which apparently some users would like
to use.  The generic `-mcpu=powerpc` should stick to pure 32-bit PowerPC
instructions.

Fixes rust-lang/cargo#3852.
2017-04-05 00:41:08 -07:00
Alex Crichton e60ea55f66 travis: Update sccache binaries
I've tracked down what I believe is the last spurious sccache failure on #40240
to behavior in mio (carllerche/mio#583), and this commit updates the binaries to
a version which has that fix incorporated.
2017-04-04 15:55:23 -07:00
Aidan Hobson Sayers b970bc2a79 Enable appveyor cache, add more paranoia 2017-04-04 23:41:38 +01:00
Tim Neumann dd7fc23a21 fix rollup 2017-04-04 15:46:48 +02:00
Tim Neumann efdf05d91e Merge remote-tracking branch 'hub/centos5-vault' into rollup 2017-04-04 15:43:07 +02:00
Tim Neumann 6dc8869f38 use fixed ip for vault.centos.org until updates have propagated to all mirrors 2017-04-03 22:51:06 +02:00
Tim Neumann 802c11c33e switch to vault.centos.org 2017-04-03 22:14:45 +02:00
Alex Crichton 541512b0bf travis: Split all dist builders in two
Previously we would use one builder on Travis to produce two sets of host
compilers for two different targets. Unfortunately though we've recently
increased how much we're building for each target so this is starting to take
unnecessarily long (#40804). This commit splits the dist builders in two by
ensuring that we only dist one target on each builder, which should take a much
shorter amount of time. This should also unblock other work such as landing the
RLS (#40584).
2017-04-03 12:30:06 -07:00
Marco A L Barbosa 113b3b46a7 Use 64 bits emulator to run android tests
Also install headless jre instead of the full jre.
2017-03-31 17:26:55 -03:00
Corey Farwell a9dc8ac7ac Rollup merge of #40780 - aidanhs:aphs-cache-git-modules, r=alexcrichton
Attempt to cache git modules

Partial resolution of #40772, appveyor remains to be done once travis looks like it's working ok.

The approach in this PR is based on the `--reference` flag to `git-clone`/`git-submodule --update` and is a compromise based on the current limitations of the tools we're using.

The ideal would be:
1. have a cached pristine copy of rust-lang/rust master in `$HOME/rustsrc` with all submodules initialised
2. clone the PR branch with `git clone --recurse-submodules --reference $HOME/rustsrc git@github.com:rust-lang/rust.git`

This would (in the nonexistent ideal world) use the pristine copy as an object cache for the top level repo and all submodules, transferring over the network only the changes on the branch. Unfortunately, a) there is no way to manually control the initial clone with travis and b) even if there was, cloned submodules don't use the submodules of the reference as an object cache. So the steps we end up with are:

1. have a cached pristine copy of rust-lang/rust master in `$HOME/rustsrc` with all submodules initialised
2. have a cloned PR branch
3. extract the path of each submodule, and explicitly `git submodule update --init --reference $HOME/rustsrc/$module $module` (i.e. point directly to the location of the pristine submodule repo) for each one

I've also taken some care to make this forward compatible, both for adding and removing submodules.

r? @alexcrichton
2017-03-29 16:53:29 -04:00
Aidan Hobson Sayers 96e174febd Minor tweaks to retry utility 2017-03-29 10:47:43 +01:00
Aidan Hobson Sayers 0347ff5823 Attempt to cache git modules 2017-03-29 02:51:56 +01:00
bors 0f5ddb953a Auto merge of #40809 - alexcrichton:update-sccache-again, r=alexcrichton
travis: Update sccache again

Looks like the last version was built with mio 0.6.5 which now has known bugs
against it. This build includes mio 0.6.6
2017-03-26 01:33:39 +00:00
Tim Neumann 935d84a272 fix permissions of emsdk_portable 2017-03-25 17:22:07 +01:00
Ariel Ben-Yehuda ca85c400da travis: try to fix the build on emscripten
The emsdk-portable .tar.gz now extracts to emsdk-portable instead of
emsdk_portable. Handle that.
2017-03-25 17:36:54 +03:00
Alex Crichton bff332e0a2 travis: Update sccache again
Looks like the last version was built with mio 0.6.5 which now has known bugs
against it. This build includes mio 0.6.6
2017-03-24 19:00:35 -07:00
Alex Crichton 05c4051f64 travis: Update sccache binary 2017-03-23 10:16:57 -07:00
Alex Crichton 38795677ae travis: Delay sccache downloads in docker
Let's have this layer be towards the end as we're emprically changing sccache
more than we're changing the rest of the image, so this'll allow us to reuse as
much of the cached image as possible.
2017-03-23 10:16:57 -07:00
bors d5580374d7 Auto merge of #40758 - frewsxcv:rollup, r=frewsxcv
Rollup of 5 pull requests

- Successful merges: #40612, #40627, #40668, #40715, #40753
- Failed merges:
2017-03-23 14:26:13 +00:00
Corey Farwell 4e962422d7 Rollup merge of #40612 - TimNN:new-netbsd-cross, r=alexcrichton
Use the "official" cross compiler for NetBSD

The current NetBSD cross compiler is lacking, for example `std::thread` is not available (which causes problems for LLVM 4.0). This PR uses the official netbsd build system to compiler the cross compiler.

@alexcrichton: Can you please mirror `ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-7.0/source/sets/{src,gnusrc,sharesrc,syssrc}.tgz`. (Optionally you may want to use NetBSD versions 7.0.2 or 7.1, in that case you'll probably want to update the binary downloads used today as well).

I'll update the URL's afterwards (or feel free to use "allow edits from maintainers").

r? @alexcrichton
2017-03-23 08:42:45 -05:00
bors 8dfc25e05e Auto merge of #40605 - alexcrichton:add-stamps, r=brson
travis: Add timestamps to all build messages

When debugging why builds are taking so long it's often useful to get the
timestamp of all log messages as we're not always timing every tiny step of the
build. I wrote a [utility] for prepending a relative timestamp from the start of
a process which is now downloaded to the builders and is what we wrap the entire
build invocation in.

[utility]: https://github.com/alexcrichton/stamp-rs

Closes #40577
2017-03-23 12:03:39 +00:00
Alex Crichton 2727866831
travis: Don't enable quiet tests
This makes travis problems more difficult to debug, so let's just enable more
verbose logging.
2017-03-21 16:51:57 -04:00
Tim Neumann 88d5645fb8 dist-x86-linux: ugrade gcc to 4.8.5 2017-03-21 20:40:06 +01:00
Tim Neumann ba90248dac include compiler hash in wrapper scripts 2017-03-21 20:37:50 +01:00
Alex Crichton 7ae7bf31e2 Switch to rust-lang-ci mirror URLs 2017-03-21 20:37:50 +01:00
Tim Neumann 1f65610675 ci/netbsd: use the "official" cross compiler 2017-03-21 20:37:50 +01:00
Alex Crichton 7305ca3852 travis: Don't set `RUST_LOG` globally
I have a suspicion that this caused a large regression in cycle times by forcing
the compiler to perform more checks on every `debug!` statement, so let's test
this out by removing the `RUST_LOG` env var globally.

This regression in cycle time was witnessed between [two] [builds] where the
[PR] in question didn't do much suspicious. Judging by how the stage0 times
*also* regressed though then this is my best guess.

[two]: https://travis-ci.org/rust-lang/rust/builds/210149932
[builds]: https://travis-ci.org/rust-lang/rust/builds/210179995
[PR]: https://github.com/rust-lang/rust/pull/40446
2017-03-20 14:32:36 -07:00
bors df3ab375f3 Auto merge of #40507 - alexcrichton:static-libcurl, r=brson
travis: Ensure cargo links libcurl statically

We don't want a dynamic dependency in the library that we ship, so link it
statically by configuring curl-sys's build script to not pick up the system
version via pkg-config.
2017-03-18 03:31:58 +00:00
Alex Crichton bbfdb56910 travis: Use `hide_output` in dist-powerpc64-linux
Looks like we blew the 4MB cap, so let's hide some more output.
2017-03-17 07:12:56 -07:00
Alex Crichton ec829fe00e travis: Update sccache binary
I've built a local copy with mozilla/sccache#79 and mozilla/sccache#78. Let's
see if that helps #40240!
2017-03-16 07:55:15 -07:00
bors 0aeb9c1297 Auto merge of #40383 - ishitatsuyuki:easy-dist-analysis, r=alexcrichton
rustbuild: Make save-analysis an option

This makes save-analysis an option independent from the release channel.

The CI build scripts have been modified to enable the flag.

*Merge with caution.* I haven't tested this, and this can cause nightly breakage.
2017-03-15 13:50:13 +00:00
Alex Crichton 5fab9bf4f6 travis: Ensure cargo links libcurl statically
We don't want a dynamic dependency in the library that we ship, so link it
statically by configuring curl-sys's build script to not pick up the system
version via pkg-config.
2017-03-13 22:13:37 -07:00
Vadim Petrochenkov 362aa9a317 Default llvm.clean-rebuild to false 2017-03-12 14:02:49 +03:00
bors 5d0be0d72a Auto merge of #40199 - alexcrichton:doc-proc-macro, r=brson
rustbuild: Build documentation for `proc_macro`

This commit fixes #38749 by building documentation for the `proc_macro` crate by
default for configured hosts. Unfortunately did not turn out to be a trivial
fix. Currently rustbuild generates documentation into multiple locations: one
for std, one for test, and one for rustc. The initial fix for this issue simply
actually executed `cargo doc -p proc_macro` which was otherwise completely
elided before.

Unfortunately rustbuild was the left to merge two documentation trees together.
One for the standard library and one for the rustc tree (which only had docs for
the `proc_macro` crate). Rustdoc itself knows how to merge documentation files
(specifically around search indexes, etc) but rustbuild was unaware of this, so
an initial fix ended up destroying the sidebar and the search bar from the
libstd docs.

To solve this issue the method of documentation has been tweaked slightly in
rustbuild. The build system will not use symlinks (or directory junctions on
Windows) to generate all documentation into the same location initially. This'll
rely on rustdoc's logic to weave together all the output and ensure that it ends
up all consistent.

Closes #38749
2017-03-11 11:42:09 +00:00
Tatsuyuki Ishi e31e264c55 rustbuild: Make save-analysis an option 2017-03-11 20:00:05 +09:00
Alex Crichton c1c3b09f28 Rollup merge of #40324 - alexcrichton:sccache-errors, r=aturon
travis: Attempt to debug sccache failures

I can't find anything that'd cause unexpected EOF in the source, so let's try
taking a look at the error logs on failures.
2017-03-10 16:18:28 -08:00
Alex Crichton f846aaf81f rustbuild: Build documentation for `proc_macro`
This commit fixes #38749 by building documentation for the `proc_macro` crate by
default for configured hosts. Unfortunately did not turn out to be a trivial
fix. Currently rustbuild generates documentation into multiple locations: one
for std, one for test, and one for rustc. The initial fix for this issue simply
actually executed `cargo doc -p proc_macro` which was otherwise completely
elided before.

Unfortunately rustbuild was the left to merge two documentation trees together.
One for the standard library and one for the rustc tree (which only had docs for
the `proc_macro` crate). Rustdoc itself knows how to merge documentation files
(specifically around search indexes, etc) but rustbuild was unaware of this, so
an initial fix ended up destroying the sidebar and the search bar from the
libstd docs.

To solve this issue the method of documentation has been tweaked slightly in
rustbuild. The build system will not use symlinks (or directory junctions on
Windows) to generate all documentation into the same location initially. This'll
rely on rustdoc's logic to weave together all the output and ensure that it ends
up all consistent.

Closes #38749
2017-03-10 13:04:49 -08:00
Petr Hosek 9a8461104e travis: Fuchsia builder
This change introduces a Dockerfile and script which builds a complete
Fuchsia toolchain which can be used to build Rust distribution for
Fuchsia. We only support cross-compiling at the moment, hence only
setting the target.
2017-03-10 08:28:40 -08:00
Alex Crichton a8cacd3d21 travis: Attempt to debug sccache failures
I can't find anything that'd cause unexpected EOF in the source, so let's try
taking a look at the error logs on failures.
2017-03-10 07:51:14 -08:00
Alex Crichton f44801c5ee travis: Split the linux-tested-targets builder
Travis only gives us 30GB disk space and we don't currently have an option to
increase that. Each musl target generates "hello world" binaries of about 3.5MB
in size, and we're testing two targets in the same image. We have around 3k
run-pass tests and 2 musl targets which works out to around 20GB. That's
dangerously close to the limit and is causing PRs to bounce.

This PR splits up the builder in two, one for x86_64 musl and the other for
i686. Hopefully that'll keep us under the disk limit.

Closes #40359
2017-03-09 11:54:24 -08:00
Alex Crichton 44a01b8a54 rustbuild: Add support for compiling Cargo
This commit adds support to rustbuild for compiling Cargo as part of the release
process. Previously rustbuild would simply download a Cargo snapshot and
repackage it. With this change we should be able to turn off artifacts from the
rust-lang/cargo repository and purely rely on the artifacts Cargo produces here.

The infrastructure added here is intended to be extensible to other components,
such as the RLS. It won't exactly be a one-line addition, but the addition of
Cargo didn't require too much hooplah anyway.

The process for release Cargo will now look like:

* The rust-lang/rust repository has a Cargo submodule which is used to build a
  Cargo to pair with the rust-lang/rust release
* Periodically we'll update the cargo submodule as necessary on rust-lang/rust's
  master branch
* When branching beta we'll create a new branch of Cargo (as we do today), and
  the first commit to the beta branch will be to update the Cargo submodule to
  this exact revision.
* When branching stable, we'll ensure that the Cargo submodule is updated and
  then make a stable release.

Backports to Cargo will look like:

* Send a PR to cargo's master branch
* Send a PR to cargo's release branch (e.g. rust-1.16.0)
* Send a PR to rust-lang/rust's beta branch updating the submodule
* Eventually send a PR to rust-lang/rust's master branch updating the submodule

For reference, the process to add a new component to the rust-lang/rust release
would look like:

* Add `$foo` as a submodule in `src/tools`
* Add a `tool-$foo` step which compiles `$foo` with the specified compiler,
  likely mirroring what Cargo does.
* Add a `dist-$foo` step which uses `src/tools/$foo` and the `tool-$foo` output
  to create a rust-installer package for `$foo` likely mirroring what Cargo
  does.
* Update the `dist-extended` step with a new dependency on `dist-$foo`
* Update `src/tools/build-manifest` for the new component.
2017-03-03 07:29:31 -08:00
Steve Klabnik aff269b5dc Rollup merge of #40130 - alexcrichton:fix-musl-again, r=nikomatsakis
travis: Fix typos in linux-tested-targets

These flags were supposed to be relevant for musl, not for gnu

cc #39979
2017-02-28 15:38:39 -08:00
Alex Crichton 500076e141 travis: Split Android into dist/test images
PRs can't land againt beta right now because the android bot is filling up on
disk space. I don't really know what's going on but the android bot is the
longest one to run anyway so it'll benefit from being split up regardless.
2017-02-27 21:20:23 -08:00
Alex Crichton ac0521e526 travis: Fix typos in linux-tested-targets
These flags were supposed to be relevant for musl, not for gnu

cc #39979
2017-02-27 12:46:43 -08:00
Alex Crichton 65b46098b7 appveyor: Use sccache on pc-windows-gnu for caching
Now that mozilla/sccache#43 is fixed the caching works for MinGW on Windows. We
still can't use it for MSVC just yet, but I'll try to revive that branch at some
point.
2017-02-27 11:51:44 -08:00
Alex Crichton c08f3824cd travis: Make more network requests retryable
This commit attempts to move more network operations to being retryable through
various operations. For example git submodule updates, downloading snapshots,
etc, are now all in retryable steps.

Hopefully this commit can cut down on the number of network failures we've been
seeing!
2017-02-25 21:28:54 -08:00
Eduard-Mihai Burtescu 411d8e95db Rollup merge of #40019 - alexcrichton:fix-musl, r=brson
travis: Compile a more compatible libc.a for musl

The mitigations for #34978 involve passing `-Wa,-mrelax-relocations=no` to all C
code we compile, and we just forgot to pass it when compiling musl itself.

Closes #39979
2017-02-25 14:13:30 +02:00
Alex Crichton 255a87499d Update sccache binaries on CI
Currently CI builds can fail spuriously during the LLVM build (#39003). I
believe this is due to sccache, and I believe that in turn was due to the fact
that the sccache server used to just be a raw mio server. Historically raw mio
servers are quite complicated to get right, but this is why we built Tokio! The
sccache server has been migrated to Tokio which I suspect would fix any latent
issues.

I have no confirmation of this (never been able to reproduce the deadlock
locally), but my hunch is that updating sccache to the master branch will fix
the timeouts during the LLVM build.

The binaries previously came from Gecko's infrastructure, but I've built new
ones by hand for Win/Mac/Linux and uploaded them to our CI bucket.
2017-02-24 13:16:54 -08:00
Alex Crichton 9a08f40349 travis: Move -mrelax-relocations to Docker config
This doesn't belong in rustbuild itself, and now that we have only rustbuild we
can move this out of the build system.
2017-02-21 14:22:48 -08:00
Alex Crichton 305aca86f9 travis: Compile a more compatible libc.a for musl
The mitigations for #34978 involve passing `-Wa,-mrelax-relocations=no` to all C
code we compile, and we just forgot to pass it when compiling musl itself.

Closes #39979
2017-02-21 14:22:42 -08:00
bors ccd96c945f Auto merge of #39824 - alexcrichton:disable-dist-src, r=brson
travis: Disable source tarballs on most builders

Currently we create a source tarball on almost all of the `DEPLOY=1` builders
but this has the adverse side effect of all source tarballs overriding
themselves in the S3 bucket. Normally this is ok but unfortunately a source
tarball created on Windows is not buildable on Unix.

On Windows the vendored sources contain paths with `\` characters in them which
when interpreted on Unix end up in "file not found" errors.

Instead of this overwriting behavior, whitelist just one linux builder for
producing tarballs and avoid producing tarballs on all other hosts.
2017-02-16 08:20:29 +00:00
Alex Crichton 1902488228 travis: Disable source tarballs on most builders
Currently we create a source tarball on almost all of the `DEPLOY=1` builders
but this has the adverse side effect of all source tarballs overriding
themselves in the S3 bucket. Normally this is ok but unfortunately a source
tarball created on Windows is not buildable on Unix.

On Windows the vendored sources contain paths with `\` characters in them which
when interpreted on Unix end up in "file not found" errors.

Instead of this overwriting behavior, whitelist just one linux builder for
producing tarballs and avoid producing tarballs on all other hosts.
2017-02-15 18:07:16 -08:00
Corey Farwell c9737af4ed Rollup merge of #39754 - alexcrichton:less-assertions, r=brson
travis: Add builders without assertions

This commit adds three new builders, one OSX, one Linux, and one MSVC, which
will produce "nightlies" with LLVM assertions disabled. Currently all nightly
releases have LLVM assertions enabled to catch bugs before they reach the
beta/stable channels. The beta/stable channels, however, do not have LLVM
assertions enabled.

Unfortunately though projects like Servo are stuck on nightlies for the near
future at least and are also suffering very long compile times. The purpose of
this commit is to provide artifacts to these projects which are not distributed
through normal channels (e.g. rustup) but are provided for developers to use
locally if need be.

Logistically these builds will all be uploaded to `rustc-builds-alt` instead of
the `rustc-builds` folder of the `rust-lang-ci` bucket. These builds will stay
there forever (until cleaned out if necessary) and there are no plans to
integrate this with rustup and/or the official release process.
2017-02-14 10:07:31 -05:00
Eduard-Mihai Burtescu d29f0bc8fa Automatically vendor Cargo deps when building the source tarballs. 2017-02-14 01:52:03 +02:00
Alex Crichton 0340ddeb3b travis: Add builders without assertions
This commit adds three new builders, one OSX, one Linux, and one MSVC, which
will produce "nightlies" with LLVM assertions disabled. Currently all nightly
releases have LLVM assertions enabled to catch bugs before they reach the
beta/stable channels. The beta/stable channels, however, do not have LLVM
assertions enabled.

Unfortunately though projects like Servo are stuck on nightlies for the near
future at least and are also suffering very long compile times. The purpose of
this commit is to provide artifacts to these projects which are not distributed
through normal channels (e.g. rustup) but are provided for developers to use
locally if need be.

Logistically these builds will all be uploaded to `rustc-builds-alt` instead of
the `rustc-builds` folder of the `rust-lang-ci` bucket. These builds will stay
there forever (until cleaned out if necessary) and there are no plans to
integrate this with rustup and/or the official release process.
2017-02-11 17:38:09 -08:00
Corey Farwell 116bdacf6b Rollup merge of #39647 - japaric:sparc, r=alexcrichton
build std for sparc64-unknown-linux-gnu

r? @alexcrichton

panicking / unwinding is broken (#39646) but with std available at least people
will be able to debug that issue on real hardware
2017-02-09 08:47:36 -05:00
Corey Farwell 1e3e904101 Rollup merge of #39671 - alexcrichton:change-order, r=brson
travis: Fix build order of dist-x86-linux

I just tried to build this container locally but it looks like connecting to
ftp.gnu.org requires SNI, so let's build curl/OpenSSL first to ensure that we've
got an SNI-capable client to download gcc/binutils with.
2017-02-08 23:55:51 -05:00
Corey Farwell 3053494a9a Rollup merge of #38699 - japaric:lsan, r=alexcrichton
LeakSanitizer, ThreadSanitizer, AddressSanitizer and MemorySanitizer support

```
$ cargo new --bin leak && cd $_

$ edit Cargo.toml && tail -n3 $_
```

``` toml
[profile.dev]
opt-level = 1
```

```
$ edit src/main.rs && cat $_
```

``` rust
use std::mem;

fn main() {
    let xs = vec![0, 1, 2, 3];
    mem::forget(xs);
}
```

```
$ RUSTFLAGS="-Z sanitizer=leak" cargo run --target x86_64-unknown-linux-gnu; echo $?
    Finished dev [optimized + debuginfo] target(s) in 0.0 secs
     Running `target/debug/leak`

=================================================================
==10848==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x557c3488db1f in __interceptor_malloc /shared/rust/checkouts/lsan/src/compiler-rt/lib/lsan/lsan_interceptors.cc:55
    #1 0x557c34888aaa in alloc::heap::exchange_malloc::h68f3f8b376a0da42 /shared/rust/checkouts/lsan/src/liballoc/heap.rs:138
    #2 0x557c34888afc in leak::main::hc56ab767de6d653a $PWD/src/main.rs:4
    #3 0x557c348c0806 in __rust_maybe_catch_panic ($PWD/target/debug/leak+0x3d806)

SUMMARY: LeakSanitizer: 16 byte(s) leaked in 1 allocation(s).
23
```

```
$ cargo new --bin racy && cd $_

$ edit src/main.rs && cat $_
```

``` rust
use std::thread;

static mut ANSWER: i32 = 0;

fn main() {
    let t1 = thread::spawn(|| unsafe { ANSWER = 42 });
    unsafe {
        ANSWER = 24;
    }
    t1.join().ok();
}
```

```
$ RUSTFLAGS="-Z sanitizer=thread" cargo run --target x86_64-unknown-linux-gnu; echo $?
==================
WARNING: ThreadSanitizer: data race (pid=12019)
  Write of size 4 at 0x562105989bb4 by thread T1:
    #0 racy::main::_$u7b$$u7b$closure$u7d$$u7d$::hbe13ea9e8ac73f7e $PWD/src/main.rs:6 (racy+0x000000010e3f)
    #1 _$LT$std..panic..AssertUnwindSafe$LT$F$GT$$u20$as$u20$core..ops..FnOnce$LT$$LP$$RP$$GT$$GT$::call_once::h2e466a92accacc78 /shared/rust/checkouts/lsan/src/libstd/panic.rs:296 (racy+0x000000010cc5)
    #2 std::panicking::try::do_call::h7f4d2b38069e4042 /shared/rust/checkouts/lsan/src/libstd/panicking.rs:460 (racy+0x00000000c8f2)
    #3 __rust_maybe_catch_panic <null> (racy+0x0000000b4e56)
    #4 std::panic::catch_unwind::h31ca45621ad66d5a /shared/rust/checkouts/lsan/src/libstd/panic.rs:361 (racy+0x00000000b517)
    #5 std:🧵:Builder::spawn::_$u7b$$u7b$closure$u7d$$u7d$::hccfc37175dea0b01 /shared/rust/checkouts/lsan/src/libstd/thread/mod.rs:357 (racy+0x00000000c226)
    #6 _$LT$F$u20$as$u20$alloc..boxed..FnBox$LT$A$GT$$GT$::call_box::hd880bbf91561e033 /shared/rust/checkouts/lsan/src/liballoc/boxed.rs:605 (racy+0x00000000f27e)
    #7 std::sys:👿🧵:Thread:🆕:thread_start::hebdfc4b3d17afc85 <null> (racy+0x0000000abd40)

  Previous write of size 4 at 0x562105989bb4 by main thread:
    #0 racy::main::h23e6e5ca46d085c3 $PWD/src/main.rs:8 (racy+0x000000010d7c)
    #1 __rust_maybe_catch_panic <null> (racy+0x0000000b4e56)
    #2 __libc_start_main <null> (libc.so.6+0x000000020290)

  Location is global 'racy::ANSWER::h543d2b139f819b19' of size 4 at 0x562105989bb4 (racy+0x0000002f8bb4)

  Thread T1 (tid=12028, running) created by main thread at:
    #0 pthread_create /shared/rust/checkouts/lsan/src/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:902 (racy+0x00000001aedb)
    #1 std::sys:👿🧵:Thread:🆕:hce44187bf4a36222 <null> (racy+0x0000000ab9ae)
    #2 std:🧵:spawn::he382608373eb667e /shared/rust/checkouts/lsan/src/libstd/thread/mod.rs:412 (racy+0x00000000b5aa)
    #3 racy::main::h23e6e5ca46d085c3 $PWD/src/main.rs:6 (racy+0x000000010d5c)
    #4 __rust_maybe_catch_panic <null> (racy+0x0000000b4e56)
    #5 __libc_start_main <null> (libc.so.6+0x000000020290)

SUMMARY: ThreadSanitizer: data race $PWD/src/main.rs:6 in racy::main::_$u7b$$u7b$closure$u7d$$u7d$::hbe13ea9e8ac73f7e
==================
ThreadSanitizer: reported 1 warnings
66
```

```
$ cargo new --bin oob && cd $_

$ edit src/main.rs && cat $_
```

``` rust
fn main() {
    let xs = [0, 1, 2, 3];
    let y = unsafe { *xs.as_ptr().offset(4) };
}
```

```
$ RUSTFLAGS="-Z sanitizer=address" cargo run --target x86_64-unknown-linux-gnu; echo $?
=================================================================
==13328==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fff29f3ecd0 at pc 0x55802dc6bf7e bp 0x7fff29f3ec90 sp 0x7fff29f3ec88
READ of size 4 at 0x7fff29f3ecd0 thread T0
    #0 0x55802dc6bf7d in oob::main::h0adc7b67e5feb2e7 $PWD/src/main.rs:3
    #1 0x55802dd60426 in __rust_maybe_catch_panic ($PWD/target/debug/oob+0xfe426)
    #2 0x55802dd58dd9 in std::rt::lang_start::hb2951fc8a59d62a7 ($PWD/target/debug/oob+0xf6dd9)
    #3 0x55802dc6c002 in main ($PWD/target/debug/oob+0xa002)
    #4 0x7fad8c3b3290 in __libc_start_main (/usr/lib/libc.so.6+0x20290)
    #5 0x55802dc6b719 in _start ($PWD/target/debug/oob+0x9719)

Address 0x7fff29f3ecd0 is located in stack of thread T0 at offset 48 in frame
    #0 0x55802dc6bd5f in oob::main::h0adc7b67e5feb2e7 $PWD/src/main.rs:1

  This frame has 1 object(s):
    [32, 48) 'xs' <== Memory access at offset 48 overflows this variable
HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext
      (longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-buffer-overflow $PWD/src/main.rs:3 in oob::main::h0adc7b67e5feb2e7
Shadow bytes around the buggy address:
  0x1000653dfd40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1000653dfd50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1000653dfd60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1000653dfd70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1000653dfd80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x1000653dfd90: 00 00 00 00 f1 f1 f1 f1 00 00[f3]f3 00 00 00 00
  0x1000653dfda0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1000653dfdb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1000653dfdc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1000653dfdd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1000653dfde0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Heap right redzone:      fb
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack partial redzone:   f4
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==13328==ABORTING
1
```

```
$ cargo new --bin uninit && cd $_

$ edit src/main.rs && cat $_
```

``` rust
use std::mem;

fn main() {
    let xs: [u8; 4] = unsafe { mem::uninitialized() };
    let y = xs[0] + xs[1];
}
```

```
$ RUSTFLAGS="-Z sanitizer=memory" cargo run; echo $?
==30198==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x563f4b6867da in uninit::main::hc2731cd4f2ed48f8 $PWD/src/main.rs:5
    #1 0x563f4b7033b6 in __rust_maybe_catch_panic ($PWD/target/debug/uninit+0x873b6)
    #2 0x563f4b6fbd69 in std::rt::lang_start::hb2951fc8a59d62a7 ($PWD/target/debug/uninit+0x7fd69)
    #3 0x563f4b6868a9 in main ($PWD/target/debug/uninit+0xa8a9)
    #4 0x7fe844354290 in __libc_start_main (/usr/lib/libc.so.6+0x20290)
    #5 0x563f4b6864f9 in _start ($PWD/target/debug/uninit+0xa4f9)

SUMMARY: MemorySanitizer: use-of-uninitialized-value $PWD/src/main.rs:5 in uninit::main::hc2731cd4f2ed48f8
Exiting
77
```
2017-02-08 23:55:43 -05:00
Alex Crichton 8fc0b37428 travis: Fix build order of dist-x86-linux
I just tried to build this container locally but it looks like connecting to
ftp.gnu.org requires SNI, so let's build curl/OpenSSL first to ensure that we've
got an SNI-capable client to download gcc/binutils with.
2017-02-08 17:13:46 -08:00
Jorge Aparicio 1914c8e0ac dist-x86-linux: install newer kernel headers 2017-02-08 18:51:43 -05:00
Jorge Aparicio 47ae2393e6 enable sanitizers on build job that tests x86_64 linux 2017-02-08 18:51:43 -05:00
Jorge Aparicio 72058e4f4c enable sanitizers on x86_64-linux releases 2017-02-08 18:51:43 -05:00
Jorge Aparicio 8bb4718200 build std for sparc64-unknown-linux-gnu 2017-02-08 10:31:19 -05:00
Corey Farwell 6fb57bf13f Rollup merge of #39431 - alexcrichton:no-more-makefiles, r=brson
Delete the makefile build system

This PR deletes the makefile build system in favor of the rustbuild build system. The beta has now been branched so 1.16 will continue to be buildable from the makefiles, but going forward 1.17 will only be buildable with rustbuild.

Rustbuild has been the default build system [since 1.15.0](https://github.com/rust-lang/rust/pull/37817) and the makefiles were [proposed for deletion](https://internals.rust-lang.org/t/proposal-for-promoting-rustbuild-to-official-status/4368) at this time back in November of last year.

And now with the deletion of these makefiles we can start getting those sweet sweet improvements of using crates.io crates in the compiler!
2017-02-07 22:54:25 -05:00
Corey Farwell 370b63f386 Rollup merge of #39400 - alexcrichton:arm-cross-test, r=brson
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-07 22:54:23 -05:00
Alex Crichton ce4abc3515 Delete Travis/AppVeyor makefile builders
We no longer need these builders as we're no longer testing the old build
system.
2017-02-06 08:42:54 -08:00
bors 0c85f2a1bd Auto merge of #38847 - michaelwoerister:gate-on-incr-comp, r=alexcrichton
travis: Gate on some minimal support for incremental compilation.

This commit adds a travis job that

1. builds a stage2 compiler in incremental mode (but with empty incremental compilation cache), and
2. builds and runs the run-pass test suite also in incremental mode.

Building incrementally with an empty cache makes sure that the compiler doesn't crash in dependency tracking during bootstrapping. Executing the incrementally built test suite gives some measure of confidence that we generate valid code.

Note, however, that the above does not give strong guarantees about the validity of incremental compilation, it just provides a basis for being able to rely on from-scratch incr. comp. builds as reference values in further tests (which then do actual incremental compilation).

r? @alexcrichton
2017-01-31 06:13:05 +00:00
Alex Crichton 1747ce25ad 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-01-29 14:16:41 -08:00
Josh Stone cb47d9ffc3 Fix the powerpc64 PATH 2017-01-28 22:02:49 -08:00
Josh Stone c051d2c8ad Add a license to build-powerpc64le-toolchain.sh 2017-01-28 21:41:35 -08:00
Josh Stone 23e8f70b46 travis: move IBM backwards in time
Using Ubuntu's cross-toolchains for powerpc* and s390x meant they were
depending on glibc symbols from Ubuntu 16.04. And if that host is ever
updated to a new release, the toolchains would raise the bar too.

This switches powerpc, powerpc64, and s390x to use crosstool-ng
toolchains, configured approximately like RHEL6 with kernel 2.6.32 and
glibc 2.12. This ABI level should also be compatible with Debian 7
(wheezy) and Ubuntu 12.04 (precise).

For powerpc64le, the challenge was that only glibc-2.19 officially added
support, but RHEL7 backported those changes to glibc-2.17. The backport
patches are complex and numerous, so instead of trying to push those
into crosstool-ng, this just uses glibc binaries directly from CentOS 7
and builds the toolchain manually.

This is ported from rust-lang/rust-buildbot#149.

r? @alexcrichton
2017-01-28 21:25:11 -08:00
bors 83c2d95238 Auto merge of #39245 - alexcrichton:enable-platform, r=brson
rustbuild: Start building --enable-extended

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.

cc #38531
2017-01-24 23:34:35 +00:00
Alex Crichton f3dfcae202 rustbuild: Start building --enable-extended
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-24 14:48:03 -08:00
Alex Crichton d56999aef9 travis: Enable testing i686 musl
This fixes the final issues with the target related to unwinding by disabling
removal of frame pointers.
2017-01-22 10:29:56 -08:00
Alex Crichton 72c3148bb3 More test fixes from rollup 2017-01-20 13:49:16 -08:00
Alex Crichton 5e8d7a4b7c Merge branch 'older-glibc' into rollup 2017-01-20 08:36:50 -08:00
Alex Crichton 1054171ac2 Rollup merge of #39132 - alexcrichton:static-libstdcpp, r=japaric
travis: Pass --enable-llvm-static-stdcpp

All our releases are compiled with this, so let's be sure to do so whenever
`DEPLOY` is set. This'll ensure that we don't have dynamic dependencies on
libstdc++ which LLVM depends on, but instead we link it all statically to have
more portable binaries.
2017-01-20 08:35:47 -08:00
Alex Crichton b174920827 Rollup merge of #39120 - alexcrichton:emscripten-tests, r=brson
travis: Get an emscripten builder online

This commit adds a new entry to the Travis matrix which will execute emscripten
test suites. Along the way it updates a few bits of the test suite to continue
passing on emscripten, such as:

* Ignoring i128/u128 tests as they're presumably just not working (didn't
  investigate as to why)
* Disabling a few process tests (not working on emscripten)
* Ignore some num tests in libstd (#39119)
* Fix some warnings when compiling
2017-01-20 08:35:47 -08:00
Alex Crichton 4a298dde72 Rollup merge of #39111 - alexcrichton:more-cross-targets, r=brson
travis: Expand the `cross` linux image

This expands the `cross` travis matrix entry with a few more targets that our
nightlies are building:

* x86_64-rumprun-netbsd
* arm-unknown-linux-musleabi
* arm-unknown-linux-musleabihf
* armv7-unknown-linux-musleabihf
* mips-unknown-linux-musl
* mipsel-unknown-linux-musl

This commit doesn't compile custom toolchains like our current cross-image does,
but instead compiles musl manually and then compiles libunwind manually (like
x86_64) for use for the ARM targets and just uses openwrt toolchains for the
mips targets.

cc #38531
2017-01-20 08:35:46 -08:00
Alex Crichton 0c7117457d Rollup merge of #39068 - alexcrichton:more-small-tests, r=brson
travis: Add i586 linux and i686 musl

This commit expands the existing x86_64-musl entry in the Travis matrix to also
build/test i586-unknown-linux-gnu and i686-unknown-linux-musl.

cc #38531
Closes #35599
Closes #39053
2017-01-20 08:35:46 -08:00
Alex Crichton 0a7420acd1 travis: Move glibc backwards in time
This commit updates the compilers for many of the artifacts that we're producing
on Travis. These compilers are all compiled by crosstool-ng as they're currently
done for the images in which we're building all our cross compiled compilers.

The purpose of this commit is that when we ship binaries the artifacts won't
require a newer glibc, but rather be as compatible as possible with Linux
distributions by working with a very old version of glibc.

This commit always allocates a new matrix entry for the i686/x86_64 builder.
This builder is dedicated to just producing artifacts and eventually we'll
expand it to building other tools like Cargo and the RLS. The other builders
testing i686 and x86_64 won't use these historical toolchains.
2017-01-19 14:32:26 -08:00
Alex Crichton e8f9d2d43a travis: Get an emscripten builder online
This commit adds a new entry to the Travis matrix which will execute emscripten
test suites. Along the way it updates a few bits of the test suite to continue
passing on emscripten, such as:

* Ignoring i128/u128 tests as they're presumably just not working (didn't
  investigate as to why)
* Disabling a few process tests (not working on emscripten)
* Ignore some num tests in libstd (#39119)
* Fix some warnings when compiling
2017-01-19 13:54:19 -08:00
Michael Woerister 5f118b954e travis: Gate on some minimal support for incremental compilation.
This commit adds a travis job that builds a stage2 compiler in
incremental mode (but with empty incremental compilation cache).
Building incrementally with an empty cache makes sure that the
compiler doesn't crash in dependency tracking during bootstrapping.
2017-01-18 12:06:22 -05:00
Alex Crichton 1080a69b01 travis: Pass --enable-llvm-static-stdcpp
All our releases are compiled with this, so let's be sure to do so whenever
`DEPLOY` is set. This'll ensure that we don't have dynamic dependencies on
libstdc++ which LLVM depends on, but instead we link it all statically to have
more portable binaries.
2017-01-17 08:51:03 -08:00
Alex Crichton 0618580235 travis: Pass --release-channel=nightly on deploy
This commit passes the `--release-channel=nightly` flag to all images which have
the `DEPLOY` flag set. This means that we'll name artifacts and the compiler
appropriately.

This reworks a bit how arguments are passed, but for now doesn't change what's
already being passed. Eventually we'll want to avoid enabling debug assertions
and llvm assertions for *all* releases, but I figure we can tackle that a little
bit more down the road.
2017-01-16 22:26:21 -08:00
Alex Crichton 6b23cc48db travis: Expand the `cross` linux image
This expands the `cross` travis matrix entry with a few more targets that our
nightlies are building:

* x86_64-rumprun-netbsd
* arm-unknown-linux-musleabi
* arm-unknown-linux-musleabihf
* armv7-unknown-linux-musleabihf
* mips-unknown-linux-musl
* mipsel-unknown-linux-musl

This commit doesn't compile custom toolchains like our current cross-image does,
but instead compiles musl manually and then compiles libunwind manually (like
x86_64) for use for the ARM targets and just uses openwrt toolchains for the
mips targets.
2017-01-16 18:50:01 -08:00
Alex Crichton 00d51ee822 travis: Mirror some NetBSD artifacts
This mirrors a few artifacts that have been flaky to download recently
on our own S3 bucket, which has historically been more reliable.

Closes #39097
2017-01-16 10:06:54 -08:00
Alex Crichton 6162637762 travis: Add i586 linux and i686 musl
This commit expands the existing x86_64-musl entry in the Travis matrix to also
build/test i586-unknown-linux-gnu and i686-unknown-linux-musl.

cc #38531
Closes #39053
2017-01-15 18:40:57 -08:00
bors ff591b6dc0 Auto merge of #39042 - alexcrichton:upload-more, r=brson
travis: Expand dist builder coverage

This commit adds six new travis matrix entires for doing cross-compiled
distribution builds of the compiler. The support added in #38731 allows us to
quickly compile a complete suite of distribution artifacts for cross-compiled
platforms, and currently each matrix entry (when fully cached) clocks in around
an hour to finish. Note that a full test run typically takes about two hours
right now.

With further optimizations coming down the pike in #39026 this commit also
starts doubling up cross-compiled distribution builders on each matrix entry. We
initially planned to do one build per entry, but it's looking like we may be
able to get by with more than one in each entry. Depending on how long these
builds take we may even be able to up it to three, but we'll start with two
first.

This commit then completes the suite of cross-compiled compilers that we're
going to compile, adding it for a whole litany of platforms detailed in the
changes to the docker files here. The existing `cross` image is also trimmed
down quite a bit to avoid duplicate work, and we'll eventually provision it for
far more cross compilation as well.

Note that the gcc toolchains installed to compile most of these compilers are
inappropriate for actualy distribution. The glibc they pull in is much newer
than we'd like, so before we turn nightlies off we'll need to tweak these docker
files to custom build toolchains like the current `linux-cross` docker image
does.
2017-01-15 23:49:24 +00:00
Alex Crichton a6d88b023a travis: Expand dist builder coverage
This commit adds six new travis matrix entires for doing cross-compiled
distribution builds of the compiler. The support added in #38731 allows us to
quickly compile a complete suite of distribution artifacts for cross-compiled
platforms, and currently each matrix entry (when fully cached) clocks in around
an hour to finish. Note that a full test run typically takes about two hours
right now.

With further optimizations coming down the pike in #39026 this commit also
starts doubling up cross-compiled distribution builders on each matrix entry. We
initially planned to do one build per entry, but it's looking like we may be
able to get by with more than one in each entry. Depending on how long these
builds take we may even be able to up it to three, but we'll start with two
first.

This commit then completes the suite of cross-compiled compilers that we're
going to compile, adding it for a whole litany of platforms detailed in the
changes to the docker files here. The existing `cross` image is also trimmed
down quite a bit to avoid duplicate work, and we'll eventually provision it for
far more cross compilation as well.

Note that the gcc toolchains installed to compile most of these compilers are
inappropriate for actualy distribution. The glibc they pull in is much newer
than we'd like, so before we turn nightlies off we'll need to tweak these docker
files to custom build toolchains like the current `linux-cross` docker image
does.
2017-01-15 10:14:43 -08:00
Aidan Hobson Sayers 8539ce8416 Remove strictly-unnecessary flags for docker 2017-01-13 18:05:06 +00:00
Alex Crichton 318767266f travis: Start uploading artifacts on commits
This commit starts adding the infrastructure for uploading release artifacts
from AppVeyor/Travis on each commit. The idea is that eventually we'll upload a
full release to AppVeyor/Travis in accordance with plans [outlined earlier].

Right now this configures Travis/Appveyor to upload all tarballs in the `dist`
directory, and various images are updated to actually produce tarballs in these
directories. These are nowhere near ready to be actual release artifacts, but
this should allow us to play around with it and test it out. Once this commit
lands we should start seeing artifacts uploaded on each commit.

[outlined earlier]: https://internals.rust-lang.org/t/rust-ci-release-infrastructure-changes/4489
2017-01-12 15:29:04 -08:00
Alex Crichton 1a040b36cb rustbuild: Quickly `dist` cross-host compilers
This commit optimizes the compile time for creating tarballs of cross-host
compilers and as a proof of concept adds two to the standard Travis matrix. Much
of this commit is further refactoring and refining of the `step.rs` definitions
along with the interpretation of `--target` and `--host` flags. This has gotten
confusing enough that I've also added a small test suite to
`src/bootstrap/step.rs` to ensure what we're doing works and doesn't regress.

After this commit when you execute:

    ./x.py dist --host $MY_HOST --target $MY_HOST

the build system will compile two compilers. The first is for the build platform
and the second is for the host platform. This second compiler is then packaged
up and placed into `build/dist` and is ready to go. With a fully cached LLVM and
docker image I was able to create a cross-host compiler in around 20 minutes
locally.

Eventually we plan to add a whole litany of cross-host entries to the Travis
matrix, but for now we're just adding a few before we eat up all the extra
capacity.

cc #38531
2017-01-04 11:41:16 -08:00
Alex Crichton 4781eb315b travis: Add a distcheck target
This commit adds a new entry to the Travis matrix which performs a "distcheck",
which basically means that we create a tarball, extract that tarball, and then
build/test inside there. This ensures that the tarballs we produce are actually
able to be built/tested!

Along the way this also updates the rustbuild distcheck definition to propagate
the configure args from the top-level invocation.

Closes #38691
2016-12-30 09:36:23 -08:00
Alex Crichton 3eb459ff5f Merge branch 'aux-tests' of https://github.com/alexcrichton/rust into rollup 2016-12-29 17:29:32 -08:00
Alex Crichton 6ccf039a2c Rollup merge of #38632 - alexcrichton:trim-travis, r=japaric
Trim down Travis docker images slightly

Two things we no longer need:

* ccache, we now use sccache
* A `/tmp/obj` dir no longer used
2016-12-29 17:26:26 -08:00
Alex Crichton 9bb3543885 Rollup merge of #38631 - alexcrichton:supafast, r=brson
rustbuild: Compile rustc twice, not thrice

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 two 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-29 17:26:25 -08:00
Alex Crichton 900dd8a7b9 rustbuild: Don't run pretty tests by default
This commit relegates all pretty tests to not get run by default and rather get
run as part of an "aux" test suite. This "aux" suite is renamed from the old
"cargotest" suite to just collect tests that don't need to run everywhere but
should at least pass on Unix/Windows.
2016-12-29 09:55:16 -08:00
Alex Crichton 7046fea5be rustbuild: Compile rustc twice, not thrice
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-28 14:49:00 -08:00
Alex Crichton 03d4fc564e travis: Remove extraneous /tmp/obj dirs
These are no longer used when running containers and tests.
2016-12-26 23:04:39 -08:00
Alex Crichton fd97f5df15 travis: Don't install ccache in containers
We no longer use it, we use sccache
2016-12-26 23:03:20 -08:00
Alex Crichton 35420b0ccb travis: Attempt to fix Android flakiness
There's been some flaky runs on Travis where the Android emulator is having
problems staying alive... presumably? For example:

* https://travis-ci.org/rust-lang/rust/jobs/186736745

This commit spawns the emulator in the same way as buildbot with `nohup` to hope
that it goes into the background successfully, followed by a `wait-for-device`
command. I'm not actually sure if this'll fix the problems we're seeing, but I
figure it can't hurt to test out.
2016-12-26 11:17:19 -08:00
Alex Crichton 6b8dda5c7e Merge branch 'local-sccache' of https://github.com/alexcrichton/rust into rollup 2016-12-20 12:59:14 -08:00
Alex Crichton cae98cae4f travis: Support local sccache if not on bots
This commit configures local sccache directory to get used if you're running
builds locally to enjoy the benefits of caching when running inside the
containers.
2016-12-19 11:59:44 -08:00
Alex Crichton 488359eba1 travis: Fix the cargotest bot
Recently the Cargo revision running on cargotest was updated in #38051, and the
updated version of Cargo pulls in the openssl-sys 0.9 crate instead of the old
openssl-sys 0.7 crate. The 0.9 release of openssl-sys has slightly different
requirements and logic for detecting OpenSSL, namely it requires `pkg-config` to
be present on Linux typically.

This commit fixes this problem by installing pkg-config in the cargotest
container that's running on the bots. This in turn should hopefully fix the
build script and allow it to find the already-installed local OpenSSL libraries.
2016-12-19 11:40:36 -08:00
Alex Crichton 96a5fc76dc rustbuild: Add sccache support
This commit adds support for sccache, a ccache-like compiler which works on MSVC
and stores results into an S3 bucket. This also switches over all Travis and
AppVeyor automation to using sccache to ensure a shared and unified cache over
time which can be shared across builders.

The support for sccache manifests as a new `--enable-sccache` option which
instructs us to configure LLVM differently to use a 'sccache' binary instead of
a 'ccache' binary. All docker images for Travis builds are updated to download
Mozilla's tooltool builds of sccache onto various containers and systems.
Additionally a new `rust-lang-ci-sccache` bucket is configured to hold all of
our ccache goodies.
2016-12-14 15:40:18 -08:00
Alex Crichton 5e991e0afb Fix travis builds
After reading some articles [1] [2] yesterday about Docker and the "init"
process I got to thinking about the problems that we've been seeing on Travis.
The basic problem is that a Linux system may need an "init" process to work
properly when processes become zombies. Docker by default doesn't handle this
and the root process typically isn't an init process, so this can occasionally
cause quite a few problems.

We've been seeing spurious errors on Travis inside containers which look like
OOM and such, but my guess is that zombie processes were being reparented to the
top-level shell. The shell didn't expect the zombies and then behaved very
strangely.

This commit fixes these problems by using Yelp's "dumb-init" program [2] as the
init process in all of our containers. This ensures that there's a valid init
ready to reap children when they're reparented, which our test suite apparently
generates a bunch of throughout the tests and such.

[1]: https://blog.phusion.nl/2015/01/20/docker-and-the-pid-1-zombie-reaping-problem/
[2]: https://engineeringblog.yelp.com/2016/01/dumb-init-an-init-for-docker.html
2016-12-13 00:13:14 -08:00
Alex Crichton 0e272de69f mk: Switch rustbuild to the default build system
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-12-07 00:30:23 -08:00
Alex Crichton 008cc2d999 Move all Linux/OSX CI infastructure to Travis
This commit configures our `.travis.yml` to test the full suite of tests we have
on Buildbot right now. A whole mess of docker images are added to the `src/ci`
directory which represent all the build environments for each configuration.
Each of these environments is then configured in `.travis.yml` to run on the
auto branch.

Note that the full matrix of tests aren't intended to be run on all PRs.
Instead, we continue to run only one entry in the matrix, forcing all others to
finish quickly. Only the `auto` branch should run the full matrix of builds.

Also note that the infrastructure hasn't quite been allocated yet to the
rust-lang/rust repository, so everything is disabled for now except for the one
build that happens on PRs. Once that infrastructure is allocated though we can
enable this and let it fly!

Notable modifications from the current test suite today:

* Android tests are run in rustbuild instead of the makefiles, for whatever
  reason I couldn't get the makefiles to work on Travis.
* A debuginfo test was updated to work with the current version of the Android
  NDK.
* Some dependencies in `mk/tests.mk` were fixed to allow running tests in
  parallel.
2016-11-11 07:36:40 -08:00