Skip to content

Rollup of 6 pull requests - #118178

Merged
bors merged 17 commits into
rust-lang:masterfrom
compiler-errors:rollup-0i11w85
Nov 22, 2023
Merged

Rollup of 6 pull requests#118178
bors merged 17 commits into
rust-lang:masterfrom
compiler-errors:rollup-0i11w85

Conversation

@compiler-errors

Copy link
Copy Markdown
Contributor

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

ecnelisesand others added 17 commits November 21, 2023 01:17
`x clippy compiler -Aclippy::all -Wclippy::unnecessary_cast --fix`
with some manual review to ensure every fix is correct.
In the future Windows will enable Control-flow Enforcement Technology
(CET aka Shadow Stacks). To protect the path where the context is
updated during exception handling, the binary is required to enumerate
valid unwind entrypoints in a dedicated section which is validated when
the context is being set during exception handling.
The required support for EHCONT has already been merged into LLVM,
long ago. This change adds the Rust codegen option to enable it.
Reference:
* https://reviews.llvm.org/D40223
This also adds a new `ehcont-guard` option to the bootstrap config which
enables EHCont Guard when building std.
Add support for global allocation in smir
Add APIs to StableMir to support global allocation. Before this change, StableMir users had no API available to retrieve Allocation provenance information. They had to resource to internal APIs instead.
One example is retrieving the Allocation of an `&str`. See test for an example on how the API can be used.
…wesleywiser
Enable Rust to use the EHCont security feature of Windows
In the future Windows will enable Control-flow Enforcement Technology (CET aka Shadow Stacks). To protect the path where the context is updated during exception handling, the binary is required to enumerate valid unwind entrypoints in a dedicated section which is validated when the context is being set during exception handling.
The required support for EHCONT Guard has already been merged into LLVM, long ago. This change simply adds the Rust codegen option to enable it.
Relevant LLVM change: https://reviews.llvm.org/D40223
This also adds a new `ehcont-guard` option to the bootstrap config which enables EHCont Guard when building std.
We at Microsoft have been using this feature for a significant period of time; we are confident that the LLVM feature, when enabled, generates well-formed code.
We currently enable EHCONT using a codegen feature, but I'm certainly open to refactoring this to be a target feature instead, or to use any appropriate mechanism to enable it.
Tighten up link attributes for llvm-wrapper bindings
Fixesrust-lang#118084 by moving all of the declarations of symbols from `llvm_rust` into a separate extern block with `#[link(name = "llvm-wrapper", kind = "static")]`.
This also renames `LLVMTimeTraceProfiler*` to `LLVMRustTimeTraceProfiler*` because those are functions from `llvm_rust`.
r? tmiasko
…ffleLapkin
Fix some unnecessary casts
`x clippy compiler -Aclippy::all -Wclippy::unnecessary_cast --fix` with some manual review to ensure every fix is correct.
…on-opaques, r=lcnr
Allow defining opaques in `check_coroutine_obligations`
In the new trait solver, when an obligation stalls on an unresolved coroutine witness, we will stash away the *root* obligation, even if the stalled obligation is only a distant descendent of the root obligation, since the new solver is purely recursive.
This means that we may need to reprocess alias-relate obligations (and others) which may define opaque types in the new solver. Currently, we use the coroutine's def id as the defining anchor in `check_coroutine_obligations`, which will allow defining no opaque types, resulting in errors like:
```
error[E0271]: type mismatch resolving `{coroutine@<source>:6:5: 6:17} <: impl Clone`
--> <source>:6:5
|
6 | / move |_: ()| {
7 | | let () = yield ();
8 | | }
| |_____^ types differ
```
So this PR fixes the defining anchor and does the same trick as `check_opaque_well_formed`, where we manually compare opaques that were defined against their hidden types to make sure they weren't defined differently when processing these stalled coroutine obligations.
r? `@lcnr` cc `@cjgillot`
@rustbotrustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Nov 22, 2023
@compiler-errors

Copy link
Copy Markdown
ContributorAuthor

@bors r+ rollup=never p=6

@bors

bors commented Nov 22, 2023

Copy link
Copy Markdown
Collaborator

📌 Commit 4ec548a has been approved by compiler-errors

It is now in the queue for this repository.

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 22, 2023
@bors

bors commented Nov 22, 2023

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 4ec548a with merge 06d1afe...

@bors

bors commented Nov 22, 2023

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: compiler-errors
Pushing 06d1afe to master...

@bors

bors commented Nov 22, 2023

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: compiler-errors
Pushing 06d1afe to master...

@borsbors added merged-by-bors This PR was explicitly merged by bors. labels Nov 22, 2023
@bors
bors merged commit 06d1afe into rust-lang:masterNov 22, 2023
@rustbotrustbot added this to the 1.76.0 milestone Nov 22, 2023
@rust-timer

Copy link
Copy Markdown
Collaborator

📌 Perf builds for each rolled up PR:

PR#MessagePerf Build Sha
#118012Add support for global allocation in smirc5fd82d113aa9c3e68a0858247b3b529e00d87e5 (link)
#118013Enable Rust to use the EHCont security feature of Windowsc9ba734989b5db1c9c1129803f5ae3270e17a6ac (link)
#118100Enable profiler in dist-powerpc64-linux59bf38d7116295c2dd067db01b4ad3dcb5eea277 (link)
#118142Tighten up link attributes for llvm-wrapper bindings3bc61c7cd8a70b4c7d0546ad6f13e9a7dba11ba1 (link)
#118147Fix some unnecessary casts6e417f18d56306305b85b2973e59c7f5b2fc95b8 (link)
#118161Allow defining opaques in check_coroutine_obligationse2770772220bc9fcdc143f920c8629ed20d7407f (link)

previous master: 6d2b84b3ed

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (06d1afe): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

meanrangecount
Regressions ❌
(primary)
2.9%[2.2%, 3.5%]2
Regressions ❌
(secondary)
2.2%[2.2%, 2.2%]1
Improvements ✅
(primary)
-0.9%[-0.9%, -0.9%]1
Improvements ✅
(secondary)
--0
All ❌✅ (primary)1.6%[-0.9%, 3.5%]3

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 675.132s -> 675.709s (0.09%)
Artifact size: 313.79 MiB -> 313.73 MiB (-0.02%)

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-testsuiteArea: The testsuite used to check the correctness of rustcmerged-by-borsThis PR was explicitly merged by bors.rollupA PR which is a rollupS-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-infraRelevant to the infrastructure team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants

@compiler-errors@bors@rust-timer@rustbot@ecnelises@saethlin@Noratrieb@sivadeilra@celinval