Commit Graph
6 Commits
Author SHA1 Message Date
hai007 d0b258971d Remove the coroutines workaround from Nearby and drop experimental/coroutines.
In Prod LLVM release branch 515643669.1 ( cl/517696539 ) the experimental coroutines implementation is dropped. The `experimental/coroutines` header is removed.

Nearby doesn't use coroutines, but it uses libraries that depend on the existence of coroutine function definitions. Specifically, WinRT needs certain coroutine function definitions in order to compile.

Ordinarily, WinRT relied on the coroutine function definitions provided in the MSVC STL' `experimental/coroutines` header. The introduction of libc++ complicated this dependency for Nearby, because libc++' `experimental/coroutines` header took the place of the MSVC version, and (correctly, for C++17) provided none of the coroutine function definitions.

To resolve these issues, we implemented a patch of WinRT. The patch provided placeholder definitions, which allowed WinRT to pass compilation. This patch was submitted in cl/495104919. The patch was necessary to enable the Nearby migration from MSVC STL to libc++.

--

The removal of `experimental/coroutines` from libc++ makes this patch unnecessary. However, the patch will not compile without libc++' `experimental/coroutines` header.

The presence of libc++' `experimental/coroutines` header had prevented the corresponding MSVC STL' header from defining the functions for which the patch makes placeholders. Without the libc++' `experimental/coroutines` header, the MSVC STL header is employed and makes these definitions. The patch then redefines these functions, which causes a compilation failure.

--

This CL makes two changes: 1) It eliminates the patch, and 2) It eliminates the libc++ `experimental/coroutines` file from the Lexan libc++ distribution. This allows Nearby to function identically before and after the release of Lexan 515643669.1.

This change prevents a break from occurring when Lexan 515643669.1 is released.

PiperOrigin-RevId: 518119913
2023-03-20 17:20:47 -07:00
hai007 dab0ead924 Explicitly initialize atomic value; change its type to unsigned.
PiperOrigin-RevId: 501935970
2023-01-13 14:12:44 -08:00
hai007 7855176718 Fix a typo in base-no-coroutines.patch and re-apply the patch.
PiperOrigin-RevId: 495888291
2022-12-16 09:10:21 -08:00
hai007 c5cb0e1d39 Insert placeholder declarations into winrt/base.h.
PiperOrigin-RevId: 495104919
2022-12-13 13:09:29 -08:00
jfcarroll 28da839987 Latest update for winrt
PiperOrigin-RevId: 452591835
2022-06-02 12:05:19 -07:00
hais f5fcd35ced nearby sdk refactor
PiperOrigin-RevId: 425434260
2022-02-02 11:56:39 -08:00