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

Mark symbols as weak on Windows and Apple as well #660

Closed
wants to merge 1 commit into from

Conversation

ZequanWu
Copy link

@ZequanWu ZequanWu commented Aug 5, 2024

No description provided.

@tgross35
Copy link
Contributor

tgross35 commented Aug 5, 2024

Some discussion on weak linkage for macos and windows https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/compiler_builtins.20undefined.20symbols/near/434550992 (unrelated to the failure).

@aeubanks
Copy link

aeubanks commented Aug 8, 2024

I'm not an expert in weak linkage for macos and windows and have heard that it's weird, but still does sorta work, as evidenced by this patch fixing some duplicate symbol issues in our builds where we also link LLVM compiler-rt builtins (that were previously working with the weak-builtins feature)

there are more places in src/macros.rs that have this same win/apple weak linkage check, those should probably be consistent

@Amanieu
Copy link
Member

Amanieu commented Aug 8, 2024

Weak symbols are broken on windows-gnu targets, which is why we originally didn't enable weak symbols on Windows. Is that a target that you are using?

@aeubanks
Copy link

aeubanks commented Aug 8, 2024

we're using the win msvc targets, not the win gnu targets. if people have complained about win gnu before, maybe just restrict non-weak linkage to win gnu?

as for apple, are there known issues with weak linkage? again, that configuration was working for us before

@tgross35
Copy link
Contributor

I am going to close this as superseded by #672, which makes the symbols weak on everything but Windows GNU. This matches what we had before #598 for the string.h functions.

@tgross35 tgross35 closed this Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants