Skip to content

Support -C no-split-stack regardless of target triple #16980

Closed
@kmcallister

Description

@kmcallister

See #14394, which was closed on the grounds that this should be determined solely by the target triple.

I want -C no-split-stack for my experiments making really tiny Linux binaries in Rust. In this case the target is the usual x86_64-unknown-linux-gnu, and rustc is built in the usual way for the platform.

It also seems useful for writing C libraries in Rust. We won't necessarily have __morestack available, and people who are already using C are more likely to want to compromise on this particular facet of memory safety.

This is a pretty big pain point — I'm currently running sed on the LLVM IR to fix it! There may be a more involved solution but the original PR was closed months ago and I'd like to have the simple fix ASAP. If people are okay with -C no-split-stack, I could revive the code from the PR. Or we could make it something like --unsafe-codegen-options no-split-stack.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-codegenArea: Code generation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions