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

Rustbuild compiles proc macros with -Ztls-model=inital-exec when cross-compiling #92976

Open
bjorn3 opened this issue Jan 16, 2022 · 1 comment
Labels
A-bootstrap A-linkage A-thread-locals C-bug E-needs-test

Comments

@bjorn3
Copy link
Contributor

bjorn3 commented Jan 16, 2022

Proc macros are dlopen'ed. -Ztls-model=initial-exec is not allowed for dlopen'ed dynamic libraries. Only for dynamic libraries declared directly or indirectly as DT_NEEDED of the main executable. While at least glibc reserves a bit of space just in case someone tries to dlopen a dynamic library compiled with the initial-exec tls model, this space is limited and running out of it will cause a failure to load.

cc https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/bypassing.20llvm-libunwind.20build.20on.20musl/near/268196922

@bjorn3 bjorn3 added A-linkage A-bootstrap A-thread-locals C-bug labels Jan 16, 2022
@Mark-Simulacrum
Copy link
Member

Mark-Simulacrum commented Aug 20, 2022

#100536 makes progress here for a subset of proc-macro dependencies; it's not an exhaustive list though and we don't have tests verifying we're doing the right thing here for now. It would be good to add those in the future.

@Mark-Simulacrum Mark-Simulacrum added the E-needs-test label Aug 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-bootstrap A-linkage A-thread-locals C-bug E-needs-test
Projects
None yet
Development

No branches or pull requests

2 participants