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

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

Open
RalfJung opened this issue Oct 17, 2024 · 0 comments
Open
Labels
A-ABI Area: Concerning the application binary interface (ABI) A-target-feature Area: Enabling/disabling target features like AVX, Neon, etc. C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@RalfJung
Copy link
Member

RalfJung commented Oct 17, 2024

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.
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Oct 17, 2024
@RalfJung RalfJung 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 Oct 17, 2024
@jieyouxu jieyouxu added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. A-ABI Area: Concerning the application binary interface (ABI) A-target-feature Area: Enabling/disabling target features like AVX, Neon, etc. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ABI Area: Concerning the application binary interface (ABI) A-target-feature Area: Enabling/disabling target features like AVX, Neon, etc. C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants