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

Explicitly link kernel32.lib from alloc #101643

Merged
merged 1 commit into from
Sep 11, 2022

Conversation

ChrisDenton
Copy link
Contributor

No description provided.

@rustbot rustbot added the T-libs Relevant to the library team, which will review and decide on the PR/issue. label Sep 10, 2022
@rustbot
Copy link
Collaborator

rustbot commented Sep 10, 2022

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with @rustbot label +T-libs-api -T-libs to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

@rust-highfive
Copy link
Collaborator

r? @thomcc

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 10, 2022
@ChrisDenton ChrisDenton added the O-windows Operating system: Windows label Sep 10, 2022
@klensy
Copy link
Contributor

klensy commented Sep 10, 2022

There is some reason for it, yes? :-)

@bjorn3
Copy link
Member

bjorn3 commented Sep 10, 2022

rust-lang/backtrace-rs#482 is a similar PR to backtrace-rs. The following reasons are listed there:

Currently backtrace depends on something else to link kernel32.lib, which is usually a safe assumption. However, it may become more of a problem once raw-dylib is stable and used by the standard library and other crates.

Using #[link] also allows calling into the function directly instead of going through a jump stub.

@ChrisDenton
Copy link
Contributor Author

Yes, sorry for being terse. That last reason is also why sys/windows/c.rs was changed to have #[link] attributes on the extern blocks. For people familiar with MSVC C/C++ this makes the imported functions have the equivalent of dllimport .

@thomcc
Copy link
Member

thomcc commented Sep 10, 2022

Looks fine. Initially I thought this meant liballoc which I'd have been opposed to.

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Sep 10, 2022

📌 Commit 931e851 has been approved by thomcc

It is now in the queue for this repository.

@bors bors 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 Sep 10, 2022
compiler-errors added a commit to compiler-errors/rust that referenced this pull request Sep 10, 2022
…=thomcc

Explicitly link kernel32.lib from alloc
@bors
Copy link
Contributor

bors commented Sep 11, 2022

⌛ Testing commit 931e851 with merge abd4d2e...

@bors
Copy link
Contributor

bors commented Sep 11, 2022

☀️ Test successful - checks-actions
Approved by: thomcc
Pushing abd4d2e to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 11, 2022
@bors bors merged commit abd4d2e into rust-lang:master Sep 11, 2022
@rustbot rustbot added this to the 1.65.0 milestone Sep 11, 2022
@ChrisDenton ChrisDenton deleted the alloc-link-kernel32 branch September 11, 2022 05:02
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (abd4d2e): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.3% [-3.8%, -3.0%] 6
All ❌✅ (primary) - - 0

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.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.8% [-2.3%, -1.2%] 2
All ❌✅ (primary) - - 0

Cycles

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.

mean1 range count2
Regressions ❌
(primary)
1.7% [1.7%, 1.7%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.7% [1.7%, 1.7%] 1

Footnotes

  1. the arithmetic mean of the percent change 2 3

  2. number of relevant changes 2 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. O-windows Operating system: Windows S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants