Skip to content

Update guidelines for C++ standard library usage and build against libc++ w/ libstdc++ ABI for linux arm/arm64/x64 - #132347

Merged
jkoritzinsky merged 10 commits into
dotnet:mainfrom
jkoritzinsky:cxx-use-12
Oct 9, 2026
Merged

jkoritzinsky merged 10 commits into
dotnet:mainfrom
jkoritzinsky:cxx-use-12

Conversation

@jkoritzinsky

@jkoritzinsky jkoritzinsky commented Aug 14, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #101088 and #101773

Update our build pipelines to build against a serviceable C++ standard library and update our guidelines to allow such usage.

dotnet/dotnet PR at dotnet/dotnet#8608

…bc++ w/ libstdc++ ABI for linux arm/arm64/x64
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 6 pipeline(s).
10 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Linux build matrix to request a specific C++ standard library/ABI configuration (libc++ + libstdc++ ABI) for selected Linux legs, and updates the CoreCLR coding guidelines to reflect the intended use of C/C++ standard headers/types under the new build setup.

Changes:

  • Add cxxStandardLibrary, cxxStandardLibraryStatic, and cxxAbiLibrary job parameters to Linux arm/arm64/x64 (and linux_x64_sanitizer) entries in the platform matrix.
  • Update clr-code-guide.md guidance around standard header usage, Linux C++ library setup, and DAC/cDAC constraints.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
eng/pipelines/common/platform-matrix.yml Adds C++ stdlib/ABI selection parameters to specific Linux build matrix legs.
docs/coding-guidelines/clr-code-guide.md Revises CoreCLR guidance on standard headers/types and clarifies DAC/cDAC restrictions.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 8ca91663-a7d4-41ba-86ec-f907bec4de34
Comment thread src/coreclr/utilcode/cxxexception.cpp Resolved
jkoritzinsky and others added 2 commits August 24, 2026 10:32
Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 8ca91663-a7d4-41ba-86ec-f907bec4de34
@jkoritzinsky
jkoritzinsky marked this pull request as ready for review August 27, 2026 00:01
Copilot AI review requested due to automatic review settings August 27, 2026 00:01
@jkoritzinsky

Copy link
Copy Markdown
Member Author

The dotnet/dotnet PR has passed, so marking that one and this one ready for review.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 6 pipeline(s).
10 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Comment thread src/coreclr/utilcode/cxxexception.cpp Resolved
Comment thread src/coreclr/vm/excep.cpp Resolved
Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 8ca91663-a7d4-41ba-86ec-f907bec4de34
Copilot AI review requested due to automatic review settings August 27, 2026 23:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Suppressed comments (2)

src/coreclr/pal/tests/palsuite/threading/QueryThreadCycleTime/test1/test1.cpp:79

  • trial is a signed LONG64 and the code explicitly checks trial < 0, but the message uses PRIu64 (unsigned). That will print negative values incorrectly (and is undefined behavior on some platforms). Use the signed format macro and cast to the corresponding int64_t type.
        if (trial < 0){
            printf("Negative value %" PRIu64 " measured", trial);
        }

src/coreclr/pal/tests/palsuite/threading/QueryThreadCycleTime/test1/test1.cpp:88

  • These values are LONG64 (signed), but the format string was switched to PRIu64 (unsigned). This can produce incorrect output and varargs type mismatches. Use PRId64 and cast the divided results to int64_t.
        Fail("ERROR: The measured time (%" PRIu64 " millisecs) was not within Delta %" PRIu64 " "
            "of the expected time (%" PRIu64 " millisecs).\n",
             (Actual / MSEC_TO_NSEC), (Delta / MSEC_TO_NSEC), (Expected / MSEC_TO_NSEC));

Copilot AI review requested due to automatic review settings August 28, 2026 21:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Comment thread src/coreclr/utilcode/cxxexception.cpp Resolved
Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 8ca91663-a7d4-41ba-86ec-f907bec4de34
Comment thread src/coreclr/utilcode/cxxexception.cpp Resolved
Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 8ca91663-a7d4-41ba-86ec-f907bec4de34
Comment thread src/coreclr/utilcode/cxxexception.cpp Resolved
Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 8ca91663-a7d4-41ba-86ec-f907bec4de34
@jkoritzinsky

Copy link
Copy Markdown
Member Author

/ba-g tensor failure is #135056

@jkoritzinsky
jkoritzinsky merged commit ab4f945 into dotnet:main Oct 9, 2026
203 of 207 checks passed
@github-project-automation github-project-automation Bot moved this to Done in AppModel Oct 9, 2026
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Oct 13, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

Status: Done
Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants