Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 29 pull requests #40089

Closed
wants to merge 74 commits into from
Closed

Rollup of 29 pull requests #40089

wants to merge 74 commits into from

Conversation

eddyb
Copy link
Member

@eddyb eddyb commented Feb 25, 2017

jackpot51 and others added 30 commits February 8, 2017 20:01
This is a simple way to workaround the debugging issues caused by the rustc
wrapper used in the bootstrap process. Namely, it uses some obscure environment
variables and you can’t just copy the failed command and run it in the shell or
debugger to examine the failure more closely.

With `--on-fail` its possible to run an arbitrary command within exactly the
same environment under which rustc failed. Theres’s multiple ways to use this
new flag:

$ python x.py build --stage=1 --on-fail=env

    would print a list of environment variables and the failed command, so a
    few copy-pastes and you now can run the same rust in your shell outside the
    bootstrap system.

$ python x.py build --stage=1 --on-fail=bash

    Is a more useful variation of the command above in that it launches a whole
    shell with environment already in place! All that’s left to do is copy-paste
    the command just above the shell prompt!

Fixes rust-lang#38686
Fixes rust-lang#38221
* Update bootstrap to recognize the cputype 'sparcv9' (used on Solaris)
* Change to never use -fomit-frame-pointer on Solaris or for sparc
* Adds rust target sparcv9-sun-solaris

Fixes rust-lang#39901
The mx_handle_wait_* syscalls in Magenta were renamed to
mx_object_wait. The syscall is used in the Magenta/Fuchsia
implementation of std::process, to wait on child processes.

In addition, this patch enables the use of the system provided
libbacktrace library on Fuchsia targets. Symbolization is not yet
working, but at least it allows printing hex addresses in a backtrace
and makes building succeed when the backtrace feature is not disabled.
This generated an ugly error with fakeroot before.
Give LLVM much more information about vtable pointers. Without the extra
information, LLVM has to be rather pessimistic about vtables, preventing
a number of obvious optimisations.

* Makes the vtable pointer argument noalias and readonly.
* Marks loads of the vtable pointer as nonnull.
* Marks load from the vtable with `!invariant.load` metadata.

Fixes rust-lang#39992
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.
The mitigations for rust-lang#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 rust-lang#39979
This doesn't belong in rustbuild itself, and now that we have only rustbuild we
can move this out of the build system.
Add the `?Sized` bound as we don't require the type to be sized.

Closes rust-lang#40011
The readdir_r function is deprecated on newer Posix systems because of
various problems, and not implemented at all for Fuchsia. There are
already implementations using both, and this patch switches Fuchsia
over to the readdir-based one.

Fixes rust-lang#40021 for Fuchsia, but that issue also contains discussion of
what should happen for other Posix systems.
In addition to defining and handling the new option, we also add a
method on librustc::Session for determining the necessity of overflow
checks.  This method provides a single point to sort out the three (!)
different ways for turning on overflow checks: -C debug-assertions, -C
overflow-checks, and -Z force-overflow-checks.

Fixes rust-lang#33134.
Update the implementation of name_bytes to use the owned string (which
is thread safe). Also bump the src/liblibc submodule now that's merged.
eddyb added 20 commits February 25, 2017 12:24
…ried

Provide suggestions for unknown macros imported with `use`

cc rust-lang#30197

r? @jseyfried
Fix compilation on Redox

This updates the Redox sys module to fix compilation.

The functions peek and peek_from are added to TcpStream and UdpSocket as stubs. The sys::backtrace module is now included correctly
…komatsakis

check_match: don't treat privately uninhabited types as uninhabited

Fixes rust-lang#38972, which is a regression in 1.16 from @canndrew's patchset.

r? @nikomatsakis

beta-nominating because regression.
Simplify/fix adaptive hashmap

Please see rust-lang#38368 (comment) for context.

The shift length math is broken. It turns out that checking for the shift length is complicated. Using simulations it's possible to see that a value of 2000 will only get probabilities down to ~1e-7 when the hashmap load factor is 90% (rust goes up to 90.9% as of today). That's probably not good enough to go into the stdlib with pluggable hashers.

So this PR simplify the adaptive behavior to only consider displacement, which is much safer and very useful by itself.

There's two comments because one of them is already being tested to be merged by bors.
Set metadata for vtable-related loads

Give LLVM much more information about vtable pointers. Without the extra
information, LLVM has to be rather pessimistic about vtables, preventing
a number of obvious optimisations.

* Makes the vtable pointer argument noalias and readonly.
* Marks loads of the vtable pointer as nonnull.
* Marks load from the vtable with `!invariant.load` metadata.

Fixes rust-lang#39992
travis: Compile a more compatible libc.a for musl

The mitigations for rust-lang#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 rust-lang#39979
…ckler

std: Relax UnwindSafe impl for Unique

Add the `?Sized` bound as we don't require the type to be sized.

Closes rust-lang#40011
Switch Fuchsia to readdir (instead of readdir_r)

The readdir_r function is deprecated on newer Posix systems because of
various problems, and not implemented at all for Fuchsia. There are
already implementations using both, and this patch switches Fuchsia
over to the readdir-based one.

Fixes rust-lang#40021 for Fuchsia, but that issue also contains discussion of
what should happen for other Posix systems.
Implement non-capturing closure to fn coercion

Implements non capturing closure coercion ([RFC 1558](https://github.com/rust-lang/rfcs/blob/master/text/1558-closure-to-fn-coercion.md)).

cc tracking issue rust-lang#39817
Add save-analysis data to nightly manifests.

For use by RLS.

r? @alexcrichton
Added test for inclusive_range_syntax in compile-fail test suite

Fixes rust-lang#39059
r? @est31

Forgot to leave a comment on the issue, hopefully nobody else is working on this one!
…hton

add `-C overflow-checks` option

In addition to defining and handling the new option, we also add a method on librustc::Session for determining the necessity of overflow checks.  This method provides a single point to sort out the three (!) different ways for turning on overflow checks: -C debug-assertions, -C overflow-checks, and -Z force-overflow-checks.

I was seeing a [run-pass/issue-28950.rs](https://github.com/rust-lang/rust/blob/b1363a73ede57ae595f3a1be2bb75d308ba4f7f6/src/test/run-pass/issue-28950.rs) failure on my machine with these patches, but I was also seeing the failure without the changes to the core compiler.  We'll see what travis says.

Fixes rust-lang#33134.  r? @alexcrichton
…woerister

detect "bootstrap outputs" when serializing the dep-graph

Fixes rust-lang#39828.

r? @michaelwoerister
trans: don't ICE when trying to create ADT trans-items

ADTs are translated in-place from rustc_trans::callee, so no trans-items
are needed.

This fix will be superseded by the shimmir branch, but I prefer not to
backport that to beta.

Fixes rust-lang#39823.

Beta-nominating because regression.

r? @michaelwoerister
Add Gankro's table to nomicon/src/phantom-data.md

Original: rust-lang#30069 (comment)

Testing confirms that:

  - `PhantomData<fn() -> T>` does not actually enable drop checking.
  - `PhantomData<fn(T) -> T>` is neither variant nor contravariant.
Move COMPILER_TESTS.md out of the root directory

See rust-lang#39896.

r? @brson
@rust-highfive
Copy link
Collaborator

r? @arielb1

(rust_highfive has picked a reviewer for you, use r? to override)

@eddyb
Copy link
Member Author

eddyb commented Feb 25, 2017

@bors r+ p=1000

@bors
Copy link
Contributor

bors commented Feb 25, 2017

📌 Commit 9e919ad has been approved by eddyb

@bors
Copy link
Contributor

bors commented Feb 25, 2017

⌛ Testing commit 9e919ad with merge 85c3bc7...

@bors
Copy link
Contributor

bors commented Feb 25, 2017

💔 Test failed - status-travis

@eddyb eddyb closed this Feb 25, 2017
@eddyb eddyb deleted the rollup branch February 25, 2017 12:11
@Centril Centril added the rollup A PR which is a rollup label Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup
Projects
None yet
Development

Successfully merging this pull request may close these issues.