Commit Graph

60154 Commits

Author SHA1 Message Date
Guillaume Gomez
3312febf22 Add missing example for Thread struct 2016-12-31 13:10:44 +01: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
Jorge Aparicio
728ec85e9a sparc64-linux support 2016-12-30 20:46:19 -05: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
Clar Charr
c903210f68 TrustedLen for Empty and Once. 2016-12-30 15:29:17 -05:00
Curtis McEnroe
8d88bbc4e8
Add links to methods on all slice iterator struct docs 2016-12-30 13:55:38 -05: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
Jeremy Soller
57950faeb6 Add socket timeout and ttl support 2016-12-30 10:38:53 -07: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
est31
dc14a108ae Fix intrinsics and expand tests 2016-12-30 15:17:27 +01:00
est31
85ec09187c Make rustdoc aware of the primitive i128 type
Many thanks to ollie27 for spotting all the places.
2016-12-30 15:17:27 +01:00