zwuis wrote:

#196505 fixed an ABI issue and was shipped in Clang 23, which introduced an ABI 
break relative to Clang 22. #210305 added a gate that allows users to restore 
the pre-#196505 ABI behavior, but that change did not make it into the Clang 23 
release. Backporting #210305 (this PR) avoids an unconditional ABI break for 
Clang 23 users.

Status quo:

- Clang 23: unconditional ABI break compared to Clang 22.
- Clang 24: conditional ABI break compared to Clang 22, controlled by the 
`-fclang-abi-compat` option.

With this backport:

- Clang 23: behaves the same as Clang 24 (conditional ABI break).

---

Not sure if release notes can be added in this PR.

<details>

<summary>If can</summary>

Add the following to `clang/docs/ReleaseNotes.md`, under the `ABI Changes in 
This Version` section.
```md
- For `x86_64-windows-msvc` targets, Clang now aligns global variables using 
the MSVC size‑based alignment scheme instead of the x86‑64 psABI "large array" 
promotion rule. This makes alignment behavior fully compatible with MSVC and 
fixes incorrect over‑alignment / under‑alignment of globals.
  To ease the transition, `-fclang-abi-compat=22` restores the legacy behavior. 
(#196071, #171855)
```

</details>

https://github.com/llvm/llvm-project/pull/212122
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to