{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreifylusmy2rp7pmbdr6qvmcvlv2uadyqwdumx3fqlq75iv3ojtw5ze",
    "uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3ml65s7r7idh2"
  },
  "path": "/t/pre-rfc-target-glibc-proposal-to-add-native-support-for-glibc-versions-for-the-gnu-targets/24225#post_6",
  "publishedAt": "2026-05-06T07:10:55.000Z",
  "site": "https://internals.rust-lang.org",
  "tags": [
    "perhaps -T or -M"
  ],
  "textContent": "For a more substantive point: It’s odd that you propose two different ways to specify the glibc deployment target (triple suffix and `-C` argument), especially when they are both different from how Apple deployment targets are specified (environment variable).\n\nIn my opinion, though, the fact that rustc checks an environment variable on Apple targets feels like a hack. Compilers don’t normally accept options via environment variable, and currently Cargo doesn’t even know about the environment variable and won’t trigger rebuilds if it changes. The choice of environment variable was not arbitrary – Clang actually does check that same environment variable, as one of multiple different ways it supports to pass in a deployment target – but I think we should deprecate it in favor of something more explicit.\n\nIn other words, I would suggest picking one new mechanism, and adding support for it for both glibc and Apple targets.\n\nA triple suffix would have the benefit of matching a _different_ one of the ways Clang supports to pass in a deployment target. It would also make intuitive sense in that different OS versions are literally different target platforms.\n\nBut for Rust it might fit in better for the deployment target to be a “target modifier” of the sort that Linux people are currently adding zillions of. Those are too complicated to be stuffed into the triple, so they will be using separate arguments – probably under a new top-level option, perhaps -T or -M.",
  "title": "[Pre-RFC] target-glibc: Proposal to add native support for GLIBC versions for the -gnu targets"
}