Skip to content

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

Open
@bjorn3

Description

@bjorn3

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-linkageArea: linking into static, shared libraries and binariesA-thread-localsArea: Thread local storage (TLS)C-bugCategory: This is a bug.E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleE-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions