[libcxx-commits] [libcxx] [libc++] Introduce a new attribute keyword for Clang improves compatibility with Mingw-GCC (PR #141040)
Tomohiro Kashiwada via libcxx-commits
libcxx-commits at lists.llvm.org
Fri May 23 21:01:36 PDT 2025
kikairoya wrote:
> Opposite should success too, but I haven't tested yet.
With msys2-ucrt64 toolchain, `std::ostream::sentry` in g++-built libc++.dll can be used by both of clang++ and g++ after applying this patch.
The libc++ built by
```
> ASM=gcc CC=gcc CXX=g++ cmake -Bbuild-runtime-mingw64 -Sruntimes -DCMAKE_BUILD_TYPE=Release "-DLLVM_ENABLE_RUNTIMES=libcxx;libcxxabi;libunwind" -DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON -DLIBCXX_EXTRA_SITE_DEFINES="__USE_MINGW_ANSI_STDIO=1" -DLIBCXXABI_ENABLE_SHARED=OFF -DLIBCXXABI_USE_LLVM_UNWINDER=ON -DLIBUNWIND_ENABLE_SHARED=OFF -DLLVM_ENABLE_LLD=ON
```
with requiring a patch https://github.com/llvm/llvm-project/pull/141328 and comment out here because lack of `aligned_alloc`. https://github.com/llvm/llvm-project/blob/f0ff2bea75f45a72143ac7fcd16a1199eb5ebf6e/libcxx/include/cstdlib#L152
https://github.com/llvm/llvm-project/pull/141040
More information about the libcxx-commits
mailing list