Skip to content

release/18.x: [libcxx] [modules] Add _LIBCPP_USING_IF_EXISTS on aligned_alloc (#89827) #89894

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 25, 2024

Conversation

llvmbot
Copy link
Member

@llvmbot llvmbot commented Apr 24, 2024

Backport 91526d6

Requested by: @mstorsjo

@llvmbot llvmbot requested a review from a team as a code owner April 24, 2024 08:51
@llvmbot llvmbot added this to the LLVM 18.X Release milestone Apr 24, 2024
@llvmbot
Copy link
Member Author

llvmbot commented Apr 24, 2024

@mordante What do you think about merging this PR to the release branch?

@llvmbot llvmbot requested a review from mordante April 24, 2024 08:51
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Apr 24, 2024
@llvmbot
Copy link
Member Author

llvmbot commented Apr 24, 2024

@llvm/pr-subscribers-libcxx

Author: None (llvmbot)

Changes

Backport 91526d6

Requested by: @mstorsjo


Full diff: https://github.com/llvm/llvm-project/pull/89894.diff

1 Files Affected:

  • (modified) libcxx/modules/std.compat/cstdlib.inc (+1-1)
diff --git a/libcxx/modules/std.compat/cstdlib.inc b/libcxx/modules/std.compat/cstdlib.inc
index a45a0a1caf8ba9..4783cbf5162390 100644
--- a/libcxx/modules/std.compat/cstdlib.inc
+++ b/libcxx/modules/std.compat/cstdlib.inc
@@ -25,7 +25,7 @@ export {
   using ::system;
 
   // [c.malloc], C library memory allocation
-  using ::aligned_alloc;
+  using ::aligned_alloc _LIBCPP_USING_IF_EXISTS;
   using ::calloc;
   using ::free;
   using ::malloc;

@tstellar
Copy link
Collaborator

Can we ignore the libcxx test failure?

@ldionne
Copy link
Member

ldionne commented Apr 25, 2024

Can we ignore the libcxx test failure?

Yes. It turns out to be extremely difficult to keep the release branch CI working and the main branch CI working at the same time. I mean it mostly works, except for annoyances like this.

…#89827)

This is missing e.g. on Windows. With this change, it's possible to make
the libcxx std module work on mingw-w64 (although that requires a few
fixes to those headers).

In the regular cstdlib header, we have _LIBCPP_USING_IF_EXISTS flagged
on every single reexported function (since
a9c9183), but the modules seem to only
have _LIBCPP_USING_IF_EXISTS set on a few individual functions, so far.

(cherry picked from commit 91526d6)
@tstellar tstellar merged commit b9b7381 into llvm:release/18.x Apr 25, 2024
8 of 9 checks passed
@tstellar
Copy link
Collaborator

tstellar commented May 1, 2024

@mstorsjo (or anyone else). If you would like to add a note about this fix in the release notes (completely optional). Please reply to this comment with a one or two sentence description of the fix. When you are done, please add the release:note label to this PR.

@mordante
Copy link
Member

mordante commented May 2, 2024

I don't feel like this needs a release note.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
Development

Successfully merging this pull request may close these issues.

5 participants