Skip to content

Conversation

@llvm-beanz
Copy link
Collaborator

@llvm-beanz llvm-beanz commented Nov 18, 2025

This replaces a few uses of _countof where we already have constant expressions for sizes with the constant expressions, uses std::size in other places, and adds a missing include to <cstdlib>.

Chromium encountered a build failure due to these issues with the latest libc++.

These aren't really useful since we have constant expressions for the
size in each case already, but depending on _countof makes this fragile
to implementation details of the C++ standard library.

Chromium encountered a build failure due to this dependency with the
latest libc++.
@llvm-beanz llvm-beanz changed the title [NFC] Remove uses of _countof from header [NFC] Fix build issues with newer libcxx Nov 18, 2025
Copy link
Collaborator

@amaiorano amaiorano left a comment

Choose a reason for hiding this comment

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

Thanks!

@llvm-beanz llvm-beanz enabled auto-merge (squash) November 18, 2025 16:20
@amaiorano
Copy link
Collaborator

Is the build failure a flake? Is there a way to kick off another build?

@damyanp damyanp disabled auto-merge November 18, 2025 19:37
@damyanp
Copy link
Member

damyanp commented Nov 18, 2025

Is the build failure a flake? Is there a way to kick off another build?

It looks like the gcc / debug builds are pretty consistently running out of disk space. We're looking in ways to mitigate this. For this change I'll force the merge accepting the unrelated build failure.

@damyanp damyanp merged commit 33aac08 into microsoft:main Nov 18, 2025
12 of 14 checks passed
@github-project-automation github-project-automation bot moved this from New to Done in HLSL Roadmap Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants