Commit e93e023
[release/10.0] Apply changes for building with clang-21 (#121124)
## Customer Impact
- [x] Customer reported
- [ ] Found internally
These issues were reported in
#119706 as problems with
clang-21 on Fedora 43. The investigation uncovered that clang introduced
a potentially breaking change in clang-20 that we do not currently
consume. These build changes impact VMR related builds when linux
distrobutions performing source build adopt clang-21.
clang-20 breaking change log -
https://releases.llvm.org/20.1.0/tools/clang/docs/ReleaseNotes.html#potentially-breaking-changes.
This PR contains the minimal changes needed to fix issues from the
following PRs #120644 and
#120775.
## Regression
- [x] Yes
- [ ] No
Moving to the new clang-21 compiler will cause the runtime to crash.
This is a regression from using .NET 10 and the default compiler of
clang-19.
## Testing
This has been validated using various legs and examples to demonstrate
the usage of undefined behavior these flags convert into "defined"
behavior in C/C++.
## Risk
Low. This makes clang-21 more permissive and is limited to non official
product builds.
---------
Co-authored-by: Jan Kotas <jkotas@microsoft.com>1 parent d8c1745 commit e93e023
File tree
4 files changed
+17
-8
lines changed- eng/native
- src
- coreclr/debug/di
- mono
4 files changed
+17
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
540 | 540 | | |
541 | 541 | | |
542 | 542 | | |
543 | | - | |
| 543 | + | |
| 544 | + | |
544 | 545 | | |
545 | | - | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
546 | 551 | | |
547 | 552 | | |
548 | 553 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6397 | 6397 | | |
6398 | 6398 | | |
6399 | 6399 | | |
6400 | | - | |
6401 | | - | |
| 6400 | + | |
| 6401 | + | |
6402 | 6402 | | |
6403 | 6403 | | |
6404 | 6404 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
782 | 782 | | |
783 | 783 | | |
784 | 784 | | |
785 | | - | |
| 785 | + | |
786 | 786 | | |
787 | 787 | | |
788 | 788 | | |
| |||
886 | 886 | | |
887 | 887 | | |
888 | 888 | | |
889 | | - | |
| 889 | + | |
890 | 890 | | |
891 | 891 | | |
892 | 892 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
532 | 532 | | |
533 | 533 | | |
534 | 534 | | |
535 | | - | |
536 | | - | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
537 | 541 | | |
538 | 542 | | |
539 | 543 | | |
| |||
0 commit comments