Skip to content

Commit aab28ef

Browse files
author
cqwrteur
committed
Fix compilation issues with clang without msvc linker
Fix i686 compilations Use SIZE_MAX <= UINT_LEAST32_MAX to ensure it is 32 bit target instead of 64 bit fix link2 for msvc since it needs link2 use link2 for WINRT_GetActivationFactory it is WINRT_IMPL_LINK2 for gcc and clang avoid dllimport for arm64ec since i do not know how the symbol works import runtimeobject.lib by default i messed up with gcc and clang for i686 fixed
1 parent fa079fb commit aab28ef

File tree

2 files changed

+126
-82
lines changed

2 files changed

+126
-82
lines changed

strings/base_coroutine_foundation.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,9 @@ namespace winrt::impl
484484
if (m_status.load(std::memory_order_relaxed) == AsyncStatus::Started)
485485
{
486486
m_status.store(AsyncStatus::Canceled, std::memory_order_relaxed);
487+
#ifndef _LIBCPP_ABI_MICROSOFT
487488
m_exception = std::make_exception_ptr(hresult_canceled());
489+
#endif
488490
cancel = std::move(m_cancel);
489491
}
490492
}
@@ -605,6 +607,9 @@ namespace winrt::impl
605607

606608
void unhandled_exception() noexcept
607609
{
610+
#ifdef _LIBCPP_ABI_MICROSOFT
611+
::std::abort();
612+
#else
608613
slim_lock_guard const guard(m_lock);
609614
WINRT_ASSERT(m_status.load(std::memory_order_relaxed) == AsyncStatus::Started || m_status.load(std::memory_order_relaxed) == AsyncStatus::Canceled);
610615
m_exception = std::current_exception();
@@ -621,6 +626,7 @@ namespace winrt::impl
621626
{
622627
m_status.store(AsyncStatus::Error, std::memory_order_relaxed);
623628
}
629+
#endif
624630
}
625631

626632
template <typename Expression>
@@ -678,7 +684,9 @@ namespace winrt::impl
678684
}
679685
}
680686

687+
#ifndef _LIBCPP_ABI_MICROSOFT
681688
std::exception_ptr m_exception{};
689+
#endif
682690
slim_mutex m_lock;
683691
async_completed_handler_t<AsyncInterface> m_completed;
684692
winrt::delegate<> m_cancel;

0 commit comments

Comments
 (0)