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 5 pull requests #66949

Closed
wants to merge 30 commits into from
Closed

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Dec 2, 2019

Successful merges:

Failed merges:

r? @ghost

eddyb and others added 30 commits November 27, 2019 09:28
although, not sure why this works - it wasn't needed before
Configure sanitize option when compiling with a sanitizer to make
it possible to execute different code depending on whether given
sanitizer is enabled or not.
rustc: split FnAbi's into definitions/direct calls ("of_instance") and indirect calls ("of_fn_ptr").

After this PR:
* `InstanceDef::Virtual` is only used for "direct" virtual calls, and shims around those calls use `InstanceDef::ReifyShim` (i.e. for `<dyn Trait as Trait>::f as fn(_)`)
  * this could easily be done for intrinsics as well, to allow their reification, but I didn't do it
* `FnAbi::of_instance` is **always** used for declaring/defining an `fn`, and for direct calls to an `fn`
  * this is great for e.g. rust-lang#65881 (`#[track_caller]`), which can introduce the "caller location" argument into "codegen signatures" by only changing `FnAbi::of_instance`, after this PR
* `FnAbi::of_fn_ptr` is used primarily for indirect calls, i.e. to `fn` pointers
  * *not* virtual calls (which use `FnAbi::of_instance` with `InstanceDef::Virtual`)
  * there's also a couple uses where the `rustc_codegen_llvm` needs to declare (i.e. FFI-import) an LLVM function that has no Rust declaration available at all
    * at least one of them could probably be a "weak lang item" instead

As there are many steps, this PR is best reviewed commit by commit - some of which arguably should be in their own PRs, I may have gotten carried away a bit.

cc @nagisa @rkruppe @oli-obk @anp
Conditional compilation for sanitizers

Configure sanitize option when compiling with a sanitizer to make
it possible to execute different code depending on whether given
sanitizer is enabled or not.
…oli-obk

handle diverging functions forwarding their return place

Fixes rust-lang/miri#1075: the shim around diverging closures turned into function pointers actually "obtains" a return place inside a diverging function, but just uses it as the return place for a diverging callee. Handle this by using NULL places.

This is kind of a hack as it breaks our invariant that all places are dereferencable, but we'd eventually let raw pointers break that anyway I assume so that seems fine.

r? @oli-obk
rustbuild fixes

When upgrading Debian's rustc to 1.38 I needed these patches:

(1) In order to cross-compile rustc 1.38 and take it through the full rustbuild process including install, I needed the first patch.

(2) In order to build rustc 1.38 using rustc 1.38 itself I need to set --cap-lints warn, otherwise I get this error:

~~~~
error: unnecessary `unsafe` block
   --> src/bootstrap/builder.rs:148:19
    |
148 |             name: unsafe { ::std::intrinsics::type_name::<S>() },
    |                   ^^^^^^ unnecessary `unsafe` block
    |
note: lint level defined here
   --> src/bootstrap/lib.rs:107:9
    |
107 | #![deny(warnings, rust_2018_idioms, unused_lifetimes)]
    |         ^^^^^^^^
    = note: `#[deny(unused_unsafe)]` implied by `#[deny(warnings)]`

error: aborting due to previous error

error: could not compile `bootstrap`.

~~~~

In order to set --cap-lints warn however, I need bootstrap.py not to clobber RUSTFLAGS. (This worked previously, not sure if it was broken intentionally but we would like support for it.)
…wjasper

rustc_mir: use nicer path printing for #[rustc_regions] NLL tests.

Similar to rust-lang#66850, spotted while working on rust-lang#66907.

r? @matthewjasper
@RalfJung
Copy link
Member Author

RalfJung commented Dec 2, 2019

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Dec 2, 2019

📌 Commit 76b50ba has been approved by RalfJung

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Dec 2, 2019
@bors
Copy link
Contributor

bors commented Dec 2, 2019

⌛ Testing commit 76b50ba with merge 8ae5a1b90a620bf9dd5730db14e471ff1253f95e...

@rust-highfive
Copy link
Collaborator

The job mingw-check of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2019-12-02T07:59:00.0867876Z     Checking rustc_codegen_ssa v0.0.0 (/checkout/src/librustc_codegen_ssa)
2019-12-02T07:59:02.6071671Z error: lifetime may not live long enough
2019-12-02T07:59:02.6072268Z    --> src/librustc_codegen_ssa/mir/mod.rs:177:25
2019-12-02T07:59:02.6072595Z     |
2019-12-02T07:59:02.6073006Z 122 | pub fn codegen_mir<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
2019-12-02T07:59:02.6073486Z     |                    --  ---- lifetime `'tcx` defined here
2019-12-02T07:59:02.6074231Z     |                    lifetime `'a` defined here
2019-12-02T07:59:02.6074501Z ...
2019-12-02T07:59:02.6074501Z ...
2019-12-02T07:59:02.6074862Z 177 |     let memory_locals = analyze::non_ssa_locals(&fx);
2019-12-02T07:59:02.6075328Z     |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'tcx` must outlive `'a`
2019-12-02T07:59:03.7333326Z error: aborting due to previous error
2019-12-02T07:59:03.7338050Z 
2019-12-02T07:59:03.7641912Z error: could not compile `rustc_codegen_ssa`.
2019-12-02T07:59:03.7664012Z warning: build failed, waiting for other jobs to finish...
---
2019-12-02T07:59:10.0540152Z   local time: Mon Dec  2 07:59:10 UTC 2019
2019-12-02T07:59:10.2049540Z   network time: Mon, 02 Dec 2019 07:59:10 GMT
2019-12-02T07:59:10.2054236Z == end clock drift check ==
2019-12-02T07:59:11.5846390Z 
2019-12-02T07:59:11.5946719Z ##[error]Bash exited with code '1'.
2019-12-02T07:59:11.5978027Z ##[section]Starting: Checkout
2019-12-02T07:59:11.5979962Z ==============================================================================
2019-12-02T07:59:11.5980077Z Task         : Get sources
2019-12-02T07:59:11.5980164Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@bors
Copy link
Contributor

bors commented Dec 2, 2019

💔 Test failed - checks-azure

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Dec 2, 2019
@RalfJung RalfJung closed this Dec 2, 2019
@RalfJung RalfJung deleted the rollup-p7ny8pm branch December 2, 2019 08:08
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2019-12-02T07:48:32.7523148Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-12-02T07:48:32.7540182Z ##[command]git config gc.auto 0
2019-12-02T07:48:32.7546848Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-12-02T07:48:32.7604457Z ##[command]git config --get-all http.proxy
2019-12-02T07:48:32.7607233Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/66949/merge:refs/remotes/pull/66949/merge
---
2019-12-02T08:13:44.6227728Z    Compiling rustc_codegen_ssa v0.0.0 (/checkout/src/librustc_codegen_ssa)
2019-12-02T08:13:47.3343212Z error: lifetime may not live long enough
2019-12-02T08:13:47.3343710Z    --> src/librustc_codegen_ssa/mir/mod.rs:177:25
2019-12-02T08:13:47.3344446Z     |
2019-12-02T08:13:47.3344857Z 122 | pub fn codegen_mir<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
2019-12-02T08:13:47.3345300Z     |                    --  ---- lifetime `'tcx` defined here
2019-12-02T08:13:47.3345968Z     |                    lifetime `'a` defined here
2019-12-02T08:13:47.3346206Z ...
2019-12-02T08:13:47.3346206Z ...
2019-12-02T08:13:47.3346556Z 177 |     let memory_locals = analyze::non_ssa_locals(&fx);
2019-12-02T08:13:47.3351149Z     |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'tcx` must outlive `'a`
2019-12-02T08:13:48.5685136Z error: aborting due to previous error
2019-12-02T08:13:48.5691711Z 
2019-12-02T08:13:48.6163181Z error: could not compile `rustc_codegen_ssa`.
2019-12-02T08:13:48.6182982Z warning: build failed, waiting for other jobs to finish...
---
2019-12-02T08:14:08.1782343Z   local time: Mon Dec  2 08:14:08 UTC 2019
2019-12-02T08:14:08.1782388Z   network time: Mon, 02 Dec 2019 08:14:08 GMT
2019-12-02T08:14:08.1782456Z == end clock drift check ==
2019-12-02T08:14:08.9104238Z 
2019-12-02T08:14:08.9207036Z ##[error]Bash exited with code '1'.
2019-12-02T08:14:08.9255414Z ##[section]Starting: Checkout
2019-12-02T08:14:08.9257137Z ==============================================================================
2019-12-02T08:14:08.9257206Z Task         : Get sources
2019-12-02T08:14:08.9257250Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@JohnTitor JohnTitor added the rollup A PR which is a rollup label Dec 5, 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 S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants