Skip to content

Tracking issue for all the ways in which -C compiler flags can alter the ABI #131837

Open

Description

@RalfJung

If a -C flag alters the ABI, mixing crates built with different flags causes UB. This issue is gathering all the ways in which this can happen, so that we can figure out what to do with them. The general goal is to make it impossible to alter these flags without realizing that they are "special" and need to be set consistently across all crates. Ideally rustc can even check that they are set consistently, though that will not cover dynamic linking.

Flags that are sus:

  • -Cno-redzone could potentially be a problem
  • Probably -Clink-arg(s) can also do bad shenanigans... but it can't really affect ABI, can it? The ABI is already baked into the object files at this point.

This list might be incomplete!

Activity

  1. added
    needs-triage
    on Oct 17, 2024
  2. changed the title [-]Tracking issue for all the ways in which -C flags can alter the ABI[/-] [+]Tracking issue for all the ways in which -C compiler flags can alter the ABI[/+] on Oct 17, 2024
  3. added
    T-compiler
    C-tracking-issue
    A-ABI
    A-target-feature
    and removed
    needs-triage
    on Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ABIA-target-featureC-tracking-issueT-compiler

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions