Commit graph

60090 commits

Author SHA1 Message Date
bors
07412c8d25 Auto merge of #38736 - xen0n:save-the-save-analysis, r=alexcrichton
rustbuild: save the save analysis

Fixes #38734. ~~call me the nightly firefighter~~

r? @alexcrichton
2017-01-01 00:27:35 +00:00
bors
90c80e0c4d Auto merge of #38708 - alexcrichton:add-distcheck, r=brson
Gate on distcheck on Travis

This commit adds a new entry to the Travis matrix to gate on distcheck, the illustrious test process that has historically taken *8 hours* to complete and also breaks all the time on nightly. By adding it to Travis we should hope to never see nightly breakage (like https://github.com/rust-lang/rust/issues/38690) because of this ever again!

"But wait, surely we can't wait 8 hours for all PRs!" you might be thinking, and you are indeed correct. The distcheck added here is much more optimized for speed than the old buildbot instances for a number of reasons:

* We're not building *two host compilers* beforehand. The current distcheck bot does a cross for i686 Linux and x86_64 Linux before it actually runs distcheck, building 6 compilers and LLVM twice. None of this is done in parallel as well (e.g. `-j1`). Not doing any of this work will be a huge win!
* We're using sccache to compile LLVM, so it should be much faster. Distcheck on the bots didn't cache LLVM well and rebuilt it every time.

All in all, this version of "distcheck" should be exactly like other matrix entries that run tests except that it's a *little* slower to start as it has to create the source tarball then rebuild the build system in the distcheck dir. Overall this should be well under the 2 hours that Android is currently taking anyway.

Closes https://github.com/rust-lang/rust/issues/38691
2016-12-31 22:08:32 +00:00
bors
38bd207626 Auto merge of #38482 - est31:i128, r=eddyb
i128 and u128 support

Brings i128 and u128 support to nightly rust, behind a feature flag. The goal of this PR is to do the bulk of the work for 128 bit integer support. Smaller but just as tricky features needed for stabilisation like 128 bit enum discriminants are left for future PRs.

Rebased version of  #37900, which in turn was a rebase + improvement of #35954 . Sadly I couldn't reopen #37900 due to github. There goes my premium position in the homu queue...

[plugin-breaking-change]

cc #35118 (tracking issue)
2016-12-31 18:54:31 +00:00
est31
29e01af6a6 Fix iabs and add some more tests 2016-12-31 18:19:06 +01:00
bors
6185c54452 Auto merge of #38737 - keeperofdakeys:proc-macro-derive-Dec-16, r=jseyfried
Fix panic when using a macros 1.1 custom derive on a struct containing a macro invocation

Fixes #38706

r? @jseyfried
2016-12-31 16:49:27 +00:00
Wang Xuerui
e46d2d8ca2
rustbuild: fix save-analysis not being saved for 2-stage builds 2016-12-31 23:07:55 +08:00
bors
ca0cc27ab6 Auto merge of #38709 - alexcrichton:check-xsv, r=nikomatsakis
cargotest: Add xsv to tested crates

This was intended to land in #37149 but I ended up backing it out to land the
rollup (#38697) last night as I was itching to do so. This morning though xsv
has been fixed now (BurntSushi/xsv#53) so we should be able to add it!
2016-12-31 12:44:32 +00:00
bors
9a07f3e236 Auto merge of #38702 - philipc:debuginfo-lldb, r=alexcrichton
rustbuild: allow running debuginfo-lldb tests on linux
2016-12-31 10:39:46 +00:00
bors
f29a9a2192 Auto merge of #38667 - alexcrichton:stage0-tools, r=brson
rustbuild: Compile all support tools in stage0

This commit changes all tools and such to get compiled in stage0, not in
later stages. The purpose of this commit is to cut down dependencies on later
stages for future modifications to the build system. Notably we're going to be
adding builders that produce a full suite of cross-compiled artifacts for a
particular host, and that shouldn't compile the `x86_64-unknown-linux-gnu`
compiler more than once. Currently dependencies on, for example, the error index
end up compiling the `x86_64-unknown-linux-gnu` compiler more than necessary.

As a result here we move many dependencies on these tools to being produced by a
stage0 compiler, not a stage1+ compiler. None of these tools actually need to be
staged at all, so they'll exhibit consistent behavior across the stages.
2016-12-31 08:21:59 +00:00
Josh Driver
e9b5839918 Style fixes 2016-12-31 17:55:59 +10:30
Josh Driver
22f788c644 Stop macro calls in structs for proc_macro_derive from panicing 2016-12-31 17:19:23 +10:30
Wang Xuerui
8d5b91a19f
rustbuild: check if compiler is final stage wrt the full bootstrap setting 2016-12-31 14:29:34 +08:00
bors
8c547a021e Auto merge of #38729 - alexcrichton:android-steps, r=brson
rustbuild: Add more deps on android-copy-libs

The android-copy-libs step is crucial for running tests on the Android target as
it copies necessary scripts and such to the emulator. We must run that before
running any tests there, but we erroneously only did it for compiletest test
suites!
2016-12-31 04:44:52 +00:00
Alex Crichton
cf8fde1441 rustbuild: Add more deps on android-copy-libs
The android-copy-libs step is crucial for running tests on the Android target as
it copies necessary scripts and such to the emulator. We must run that before
running any tests there, but we erroneously only did it for compiletest test
suites!
2016-12-30 18:55:31 -08:00
Simonas Kazlauskas
ee69cd7925 Calculate discriminant bounds within 64 bits
Since discriminants do not support i128 yet, lets just calculate the boundaries within the 64 bits
that are supported. This also avoids an issue with bootstrapping on 32 bit systems due to #38727.
2016-12-31 04:55:29 +02:00
bors
b68d3293e3 Auto merge of #38601 - schulzch:master, r=brson
Partial fix for #38489.

Fixes script name resolution for windows by invoking `emcc.bat` instead of `emcc`, etc.

Remaining issue:
```
Traceback (most recent call last):
  File "C:\Program Files\Emscripten\emscripten\1.35.0\\emcc", line 1309, in <module>
    final = shared.Building.llvm_opt(final, link_opts, DEFAULT_FINAL)
  File "C:\Program Files\Emscripten\emscripten\1.35.0\tools\shared.py", line 1471, in llvm_opt
    assert os.path.exists(target), 'Failed to run llvm optimizations: ' + output
AssertionError: Failed to run llvm optimizations:
```
2016-12-31 00:50:46 +00:00
bors
6dcf51aae6 Auto merge of #38701 - karpinski:rustllvm-style, r=brson
Making code style consistent for src/rustllvm (#38688)

Part of #38688

r? @brson
2016-12-30 22:43:44 +00:00
bors
6c9bb42ecc Auto merge of #38658 - alexcrichton:less-docs, r=nikomatsakis
std: Don't build docs for misc facade crates

Retain the same behavior as stable.

Closes #38319
2016-12-30 18:24:27 +00:00
Alex Crichton
a8535ce9d1 std: Don't build docs for misc facade crates
Retain the same behavior as stable.

Closes #38319
2016-12-30 10:00:33 -08:00
Alex Crichton
73b708a72f cargotest: Add xsv to tested crates
This was intended to land in #37149 but I ended up backing it out to land the
rollup (#38697) last night as I was itching to do so. This morning though xsv
has been fixed now (BurntSushi/xsv#53) so we should be able to add it!
2016-12-30 09:56:43 -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
d0881eaec7 rustbuild: Fix source tarballs and the vendor dir
The source tarball creation step would attempt to skip a number of files that we
want to ignore ourselves, but once we've hit the vendor directory we don't want
to skip anything so be sure to vendor everything inside that directory.

Closes #38690
2016-12-30 09:36:22 -08:00
Alex Crichton
254876ee73 rustbuild: Compile all support tools in stage0
This commit changes all tools and such to get compiled in stage0, not in
later stages. The purpose of this commit is to cut down dependencies on later
stages for future modifications to the build system. Notably we're going to be
adding builders that produce a full suite of cross-compiled artifacts for a
particular host, and that shouldn't compile the `x86_64-unknown-linux-gnu`
compiler more than once. Currently dependencies on, for example, the error index
end up compiling the `x86_64-unknown-linux-gnu` compiler more than necessary.

As a result here we move many dependencies on these tools to being produced by a
stage0 compiler, not a stage1+ compiler. None of these tools actually need to be
staged at all, so they'll exhibit consistent behavior across the stages.
2016-12-30 09:06:57 -08:00
karpinski
72ebc02f13 Switching from NULL to nullptr in src/rustllvm. 2016-12-30 16:37:05 +01:00
karpinski
c72d859e4f Ran clang-format on src/rustllvm with llvm as the coding style. 2016-12-30 16:36:50 +01:00
est31
6b359635ec Fix warning when compiling on 64 bit Linux
Code is much simpler now as well.
2016-12-30 15:19:51 +01:00
est31
d166ee9664 Add test to ensure unadjusted stays unstable 2016-12-30 15:19:51 +01:00
Simonas Kazlauskas
86ce3a2f7c Further and hopefully final Windows fixes 2016-12-30 15:19:50 +01:00
est31
ee6256b1ff More windows fixes 2016-12-30 15:17:30 +01:00
est31
9842d27e9c Fix build 2016-12-30 15:17:30 +01:00
Simonas Kazlauskas
5a853b0422 The windows special-cases only apply to x64 2016-12-30 15:17:30 +01:00
Simonas Kazlauskas
e0e53773e3 Fix a return type 2016-12-30 15:17:30 +01:00
Simonas Kazlauskas
208c8f58b2 Fix sign-extension in stage1 compiler 2016-12-30 15:17:30 +01:00
est31
0a481fe5d2 Fix rebase fallout and compilation fixes 2016-12-30 15:17:30 +01:00
est31
dd10c5a503 Feature gate: 1.16.0 instead of 1.15.0 2016-12-30 15:17:30 +01:00
est31
8cbe725d34 Fix rebase fallout 2016-12-30 15:17:29 +01:00
est31
01dcb7fe6c Tidy 2016-12-30 15:17:29 +01:00
est31
c3e3bc0058 Fix another windows ABI mistake
...this time with the float intrinsics.
2016-12-30 15:17:29 +01:00
est31
d71223a6c5 intrinsics: try to return everything via {u,i}128ret to match LLVM
on suggestion by nagisa.
2016-12-30 15:17:29 +01:00
est31
92163f1c5e Windows x64 ABI requires i128 params to be passed as reference 2016-12-30 15:17:29 +01:00
est31
ca73affe8d Tidy 2016-12-30 15:17:29 +01:00
est31
53ff50a94f Port to wrapping_* and unchecked_* operations
Otherwise, we codegen panic calls which create problems with debug assertions turned on.
2016-12-30 15:17:28 +01:00
est31
3be141f1b4 Remove unimplemented() function 2016-12-30 15:17:28 +01:00
est31
92e6c53a25 libcompiler_builtins: don't codegen dead code call to eh_personality
There was a linker error on 32 bit platforms with optimisations turned off,
complaining that there was an undefined reference to "rust_eh_personality",
when compiling the rustc_const_math as stage1 artifact.

Apparently the compiler_builtins crate includes a call to "rust_eh_personality".
If compiled for 64 bits, this call doesn't appear, which explains why the linker
error only happens on 32 bit platforms, and optimisations will get it removed
on 32 bit as well.

There were two origins of the call:
    1. A for loop where apparently the compiler wasn't sure
       whether next() could panic or not, and therefore generated a landing
       pad for the worst case. The minimal reproducible example is "for _ in 0..sr { }".
    2. A default impl of uabs where the compiler apparently wasn't sure either
       whether iabs() could panic or not. Many thanks to nagisa for
       contributing the fix.

This commit also puts extern "C" to the intrinsics, as this is generally a
good thing to do.
2016-12-30 15:17:28 +01:00
est31
3e2046214c Try to fix some things
* shift so that no panics are generated (otherwise results in linker error)
* no_std as insurance to not get into issues with errors like "cannot satisfy dependencies so `rustc_i128` only shows up once" (pure guessing here, but it doesn't hurt...)
2016-12-30 15:17:28 +01:00
est31
317810d4c4 Always use Rust based intrinsics on Windows
The check inside compiler-rt file int_types.h to #define CRT_HAS_128BIT
looks like:

 #if (defined(__LP64__) || defined(__wasm__)) && \
     !(defined(__mips__) && defined(__clang__))
 #define CRT_HAS_128BIT
 #endif

Windows uses LLP64 instead of LP64, so it doesn't ship with the C based
intrinsics.

Also, add libcompiler_builtins to the list of crates that may have platform
specific checks (like the ones we just added).
2016-12-30 15:17:28 +01:00
est31
c79aba71d5 40 -> 39, as ceil(log10(2^128)) == 39
just as ceil(log10(2^64)) == 20
2016-12-30 15:17:28 +01:00
est31
3b34f90bc1 Move from RUSTC_CRATES to TARGET_CRATES 2016-12-30 15:17:28 +01:00
est31
13d49f5299 Fix warning on 64 bit 2016-12-30 15:17:28 +01:00
est31
2715367f08 intrinsics : uabs and iabs 2016-12-30 15:17:28 +01:00