Skip to content

Conversation

@philnik777
Copy link
Contributor

No description provided.

@medismailben
Copy link
Member

@philnik777 #131156 (comment)

I think all the stage1 tests have passed. Can we land this ?

@philnik777 philnik777 marked this pull request as ready for review May 20, 2025 06:25
@philnik777 philnik777 requested a review from a team as a code owner May 20, 2025 06:25
@philnik777 philnik777 merged commit 3e4c9dc into llvm:main May 20, 2025
47 of 54 checks passed
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label May 20, 2025
@llvmbot
Copy link
Member

llvmbot commented May 20, 2025

@llvm/pr-subscribers-libcxx

Author: Nikolas Klauser (philnik777)

Changes

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

1 Files Affected:

  • (modified) libcxx/include/__functional/function.h (+4-2)
diff --git a/libcxx/include/__functional/function.h b/libcxx/include/__functional/function.h
index 5264af30d60d9..d9f857ae24cef 100644
--- a/libcxx/include/__functional/function.h
+++ b/libcxx/include/__functional/function.h
@@ -752,8 +752,9 @@ class __policy_func<_Rp(_ArgTypes...)> {
 
 #  if _LIBCPP_HAS_BLOCKS_RUNTIME
 
-extern "C" void* _Block_copy(const void*);
-extern "C" void _Block_release(const void*);
+_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
+_LIBCPP_EXPORTED_FROM_ABI extern "C" void* _Block_copy(const void*);
+_LIBCPP_EXPORTED_FROM_ABI extern "C" void _Block_release(const void*);
 
 template <class _Rp1, class... _ArgTypes1, class _Alloc, class _Rp, class... _ArgTypes>
 class __func<_Rp1 (^)(_ArgTypes1...), _Alloc, _Rp(_ArgTypes...)> : public __base<_Rp(_ArgTypes...)> {
@@ -826,6 +827,7 @@ class __func<_Rp1 (^)(_ArgTypes1...), _Alloc, _Rp(_ArgTypes...)> : public __base
   }
 #    endif // _LIBCPP_HAS_RTTI
 };
+_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
 
 #  endif // _LIBCPP_HAS_EXTENSION_BLOCKS
 

jyknight added a commit that referenced this pull request May 28, 2025
…BCPP_HIDE_FROM_ABI everywhere (#131156)" (#141756)

This reverts commit c861fe8.

Unfortunately, this use of hidden visibility attributes causes
user-defined specializations of standard-library types to also be marked
hidden by default, which is incorrect. See discussion thread on #131156.

...and also reverts the follow-up commits:

Revert "[libc++] Add explicit ABI annotations to functions from the block runtime declared in <__functional/function.h> (#140592)"
This reverts commit 3e4c9dc.

Revert "[libc++] Make ABI annotations explicit for windows-specific code (#140507)"
This reverts commit f73287e.

Revert "[libc++][NFC] Replace a few "namespace std" with the correct macro (#140510)"
This reverts commit 1d411f2.
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

None yet

Development

Successfully merging this pull request may close these issues.

3 participants