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

[WIP] Use weak linkage instead of compiler generated shims #134522

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bjorn3
Copy link
Member

@bjorn3 bjorn3 commented Dec 19, 2024

This is still keeping the allocator shim for the oom handler and the __rust_no_alloc_shim_is_unstable symbol for now.

TODO: Update comments everywhere, test on macOS and Windows and write a better PR description why we want this. Also prevent codegen of weak symbols when there is a non-weak definition of the same symbol in the same codegen unit.

@rustbot
Copy link
Collaborator

rustbot commented Dec 19, 2024

r? @fee1-dead

rustbot has assigned @fee1-dead.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Dec 19, 2024
@rust-log-analyzer

This comment has been minimized.

This is still keeping the allocator shim for the oom handler and the
__rust_no_alloc_shim_is_unstable symbol for now.

TODO: Update comments everywhere and test on macOS and Windows
@bjorn3 bjorn3 force-pushed the weak_linkage_allocator branch from f4f6936 to 93bd5d3 Compare December 19, 2024 16:38
@rust-log-analyzer
Copy link
Collaborator

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
....................................................................i....

failures:

---- library/core/src/alloc/global.rs - alloc::global::GlobalAlloc (line 22) stdout ----
error: the `#[global_allocator]` in this crate conflicts with global allocator in: std
error: aborting due to 1 previous error

Couldn't compile the test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. 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.

4 participants